Density function with absolute value Let $X$ be a random variable distributed with the following density function:
$$f(x)=\frac{1}{2} \exp(-|x-\theta|) \>.$$
Calculate: $$F(t)=\mathbb P[X\leq t], \mathbb E[X] , \mathrm{Var}[X]$$
I have problems calculating $F(t)$ because of the absolute value. I'm doing it by case statements but it just doesn't get me to the right answer.
So it gets to this:
$$
\int_{-\infty}^\infty\frac{1}{2} \exp(-|x-\theta|)\,\mathrm dx $$

The very best thing you can do in solving problems such as these is to sketch the given density function first.  It does not have to be a very accurate sketch: if you drew a peak of $\frac{1}{2}$ at $x=\theta$ and decaying curves on either side, that's good enough! 
Finding $F_X(t)$:


*

*Pick a number $t$ that is smaller than $\theta$ (where that peak is) and remember that $F_X(t)$ is just the area under the exponential curve to the left of $t$. You can find this area by integration.  

*Think why it must be that $F_X(\theta) = \frac{1}{2}$.  

*Pick a $t > \theta$.  Once again, you have to find $F_X(t)$ which is 
the area under the density to the left of $t$.  This is clearly the area to the left of $\theta$ (said area is $\frac{1}{2}$, of course!) plus the area under the curve between $\theta$ and $t$ which you can find by
integration.  Or you can be clever about it and say that the area to the right of
$t = \theta + 5$ must, by symmetry, equal the area to the left of $\theta - 5$, which you found previously. Since the total area is $1$, we have $F_X(\theta+5)=1-F_X(\theta-5)$, or  more generally,
$$F_X(\theta + \alpha) = 1 - F_X(\theta - \alpha).$$
Finding $E[X]$:
Since the pdf is symmetric about $\theta$, it should work out that $E[X]=\theta$
but we do need to check that the integral does not work out to be of the undefined form $\infty-\infty$.
