1. ## Moment-generating Function

Show that if a random variable has the probability density
$\displaystyle f(x) = {\frac {1}{2}e^{-|x|}}$ for -∞ < x < ∞
its moment-generating function is given by
$\displaystyle Mx(t) = {\frac {1}{1-t{^2}}}$

I know that I need to find the integral, but I am getting confused. Could you please help?!

2. Originally Posted by TheHolly
Show that if a random variable has the probability density
$\displaystyle f(x) = {\frac {1}{2}e^{-|x|}}$ for -∞ < x < ∞
its moment-generating function is given by
$\displaystyle Mx(t) = {\frac {1}{1-t{^2}}}$

I know that I need to find the integral, but I am getting confused. Could you please help?!
By definition:

$\displaystyle M_{X}(t) = \frac{1}{2} \int_{-\infty}^{+\infty} e^{tx} \, e^{-|x|} \, dx$

Substitute |x| = x for x > 0 and |x| = -x for x < 0:

$\displaystyle = \frac{1}{2} \left( \int_{-\infty}^{0} e^{tx} \, e^{x} \, dx + \int^{\infty}_{0} e^{tx} \, e^{-x} \, dx \right)$

$\displaystyle = \frac{1}{2} \left( \int_{-\infty}^{0} e^{(1+t)x} \, dx + \int^{\infty}_{0} e^{-(1-t) x} \, dx \right)$

$\displaystyle = \frac{1}{2} \left( \frac{1}{1 + t} \left[ e^{(1+t)x} \right]_{-\infty}^{0} - \frac{1}{1 - t} \left[ e^{-(1-t)x}\right]_{0}^{+\infty} \right)$

$\displaystyle = \frac{1}{2} \left( \frac{1}{1 + t} + \frac{1}{1 - t} \right)$

and you should be able to finish it off from here.

3. Thank you! Really, after I saw how to break that integral up into two integrals, I was able to solve the rest myself.