1
$\begingroup$

Consider a random variable $X$ whose probability density function is given by $$f_{X}(x) = \frac{\lambda}{2}\exp(-\lambda|x-\mu|)\quad\text{for}\quad x\in\textbf{R}, \lambda > 0,\,\,\text{and}\,\,\mu\in\textbf{R}$$

Determine its moment generating function, $\textbf{E}(X)$ and $\textbf{Var}(X)$.

MY SOLUTION

According to the definition of moment generating function, we obtain the following result \begin{align*} M_{X}(t) & = \frac{\lambda}{2}\int_{-\infty}^{+\infty}e^{tx}\exp(-\lambda|x-\mu|)\mathrm{d}x = \frac{\lambda}{2}\int_{-\infty}^{+\infty}\exp(tx-\lambda|x-\mu|)\mathrm{d}x\\\\ & = \frac{\lambda}{2}\int_{-\infty}^{\mu}\exp(tx-\lambda(\mu -x))\mathrm{d}x + \frac{\lambda}{2}\int_{\mu}^{+\infty}\exp(tx-\lambda(x-\mu))\mathrm{d}x\\\\ & = \frac{\lambda}{2}\int_{-\infty}^{\mu}\exp((t+\lambda)x-\lambda\mu))\mathrm{d}x + \frac{\lambda}{2}\int_{\mu}^{+\infty}\exp((t-\lambda)x+\lambda\mu)\mathrm{d}x\\\\ \end{align*}

Then I get stuck. Could someone shed some light on the problem?

$\endgroup$
  • $\begingroup$ You're almost there. You just need to integrate something the form $\exp(ax)\,dx$. $\endgroup$ – Jim Ferry Feb 5 at 22:03
  • $\begingroup$ How can someone ensure the given integrals converge? I may be wrong, but this is why I got stuck. $\endgroup$ – user1337 Feb 5 at 22:08
  • 1
    $\begingroup$ You'll want $t-\lambda > 0$ for the first integral and $t + \lambda < 0$ for the second. Uh oh, that doesn't leave you many values of $t$, does it? Looks like a sign error. Try going back and decomposing the absolute value cases more carefully. $\endgroup$ – Jim Ferry Feb 5 at 22:50
  • $\begingroup$ Indeed you have written $|x-\mu|$ incorrectly over the split regions. Reinspect the signs. $\endgroup$ – Nap D. Lover Feb 6 at 0:14
  • $\begingroup$ I have edited my answer in accordance to your comments. However, I have the same problem related to convergence. What am I doing wrong? $\endgroup$ – user1337 Feb 6 at 0:47
2
$\begingroup$

Use a substitution to break the integral at zero as usual:

\begin{align} E\left[e^{tX}\right]&=\frac{\lambda}{2}\int_{\mathbb R}e^{tx}e^{-\lambda|x-\mu|}\,dx \\\\&=\frac{1}{2}\int_{\mathbb R}\exp\left[t\left(\mu+\frac{y}{\lambda}\right)-|y|\right]\,dy\qquad\qquad,\,\small\text{ substituting }\lambda(x-\mu)=y \\\\&=\frac{e^{\mu t}}{2}\int_{\mathbb R}e^{ty/\lambda-|y|}\,dy \\\\&=\frac{e^{\mu t}}{2}\left[\int_{-\infty}^0 e^{y(1+t/\lambda)}\,dy+\int_0^\infty e^{-y(1-t/\lambda)}\,dy\right] \\\\&=\frac{e^{\mu t}}{2}\left[\underbrace{\int_0^\infty e^{-z(1+t/\lambda)}\,dz}_{\text{ converges for }1+\frac{t}{\lambda}>0}+\underbrace{\int_0^\infty e^{-y(1-t/\lambda)}\,dy}_{\text{ converges for }1-\frac{t}{\lambda}>0}\right] \\\\&=\frac{e^{\mu t}}{2}\left[\frac{1}{1+\frac{t}{\lambda}}+\frac{1}{1-\frac{t}{\lambda}}\right]\qquad\qquad\qquad,\,|t|<\lambda \end{align}

So finally, $$\boxed{E\left[e^{tX}\right]=e^{\mu t}\left(1-\frac{t^2}{\lambda^2}\right)^{-1}}\qquad,\,|t|<\lambda$$

$\endgroup$
  • $\begingroup$ Very nice approach! Do you have any idea why my answer doesn't work? $\endgroup$ – user1337 Feb 6 at 19:24
  • $\begingroup$ @APC89 You did not finish your answer, so how come you know it doesn't work? Anyway, I think it is better to standardize the variable so that the convergence is easy to spot using the gamma function. $\endgroup$ – StubbornAtom Feb 6 at 19:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.