<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">\documentclass[a4paper,12pt]{article}
\begin{document}
\parindent=0pt

{\bf Question}

Suppose that $X$ follows the exponential distribution, i.e.
$f(x)=e^{-x},\ x&gt;0$.  Obtain the mgf of this distribution and show
that $E(X^k)=k!$ where $k$ is a positive integer.  Verify this
result using direct integration.

\medskip

{\bf Answer}

\begin{eqnarray*} M_X(t) &amp; = &amp; E(e^{tX})\\ &amp; = &amp; \int_0^\infty
e^{tx} e^{-x} \,dx\\ &amp; = &amp; \frac{1}{1-t},\ \ \ t&lt;1\\ &amp; = &amp; 1 + t +
t^2 + t^3 + ...\ {\rm valid\ for}\ |t|&lt;1.\ \end{eqnarray*}

However
\begin{eqnarray*} E(X^k) &amp; = &amp; \left.\frac{d^k
M_X(t)}{dt^k}\right|_{t=0}\\ &amp; = &amp; \left.k! + \frac{(k+1)!}{1!}t +
\frac{(k+1)!}{2!}t^2 +... \right|_{t=0}\\ &amp; = &amp; k! \end{eqnarray*}

(See this by taking k=1,2,3, and so on)


Alternative:
\begin{eqnarray*} E(X^k)&amp;=&amp;\int_0^{\infty}x^k e^{-x} f(x) \,dx\\ &amp; =
&amp; \left.-x^k e^{-x}\right|_0^\infty + \int_0^\infty k
x^{k-1}e^{-x} \,dx\ \ [{\rm Integration\ by\ parts}]\\ &amp; = &amp;
k\int_0^\infty x^{k-1}e^{-x} \,dx\\ &amp; \vdots &amp; \\ &amp; = &amp; k!
\int_0^\infty e^{-x} \,dx\\ &amp; = &amp; k! \end{eqnarray*}
\end{document}
</pre></body></html>