Moment generating function for $\frac{1}{2\theta}e^{-|x|/\theta}$

530 Views Asked by At

Let $X$ be the random variable with pdf $\frac{1}{2\theta}e^{-|x|/\theta}$ with $\theta>0$. I want to find its moment generating function. I think I’ve found it but when I try to use it to find the second moment something must have gone wrong. I calculate it as:

$$\int_{-\infty}^\infty e^{-tx}\frac{1}{2\theta}e^{-|x|/\theta} = \frac{1}{2\theta}\left( \int_{-\infty}^0 e^{-tx+x/\theta}dx+ \int_0^\infty e^{-tx-x/\theta}dx \right)$$

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

$$ = \frac{1}{2\theta}\left(\frac{1}{1/\theta-t}-\frac{1}{1/\theta+t}(0-1)\right) $$

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

I justify that this all works out if $t$ is chosen in an interval about 0 no larger in radius than $1/\theta$. Now Evaluating at $t=0$ tells me the expectation of $X$ is 1, sounds good. But if I compute the derivative to find the second moment,

$$M_X’(t)=\frac{1}{2}\left(-\frac{1}{(1-t\theta)^2}(-\theta)-\frac{1}{1+t\theta)^2}(\theta)\right) $$

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

Evaluated with $t=0$ this gives that $E[X^2]=0$ which cannot be correct. Yet the MGF seemed valid in a domain around 0, and infinitely differentiable in that domain, no?

1

There are 1 best solutions below

0
On

Although I posted a comment referring you to another answer, it is worth pointing out that $M_X'(0) = \operatorname{E}[X]$, not $\operatorname{E}[X^2]$. The general formula is $$\operatorname{E}[X^k] = \left[ \frac{d^k M_X}{dt^k} \right]_{t=0}.$$ This means that we must always have $M_X(0) = 1$ whenever $M_X$ is defined in a neighborhood of $0$, since $X^0 = 1$.