TITLE: Moment generating function of Erlang Distribution
QUESTION [0 upvotes]: I was looking to show the result for the MGF of the Erlang Distribution, and got stuck whilst computing the integral:
$$\\ \int e^{-st} \frac{\lambda^k t^{k-1}e^{-\lambda t}}{(k-1)!} dt$$ 
I know the result should evaluate to 
$$\\ \left( \frac{\lambda}{\lambda+s}\right)^k  $$  but I am unsure as to how to go about tackling the initial integral. I initially started by integrating by parts, but whilst the (k-1)! term appeared nicely I didn't see how the other terms would cancel/rearrange as required. Any help would be appreciated. Thanks.

REPLY [1 votes]: If $Y\sim\mathrm{Erlang}(k,\lambda)$ then $Y=\sum_{i=1}^k X_i$ where $X_1,\ldots,X_k\stackrel{\mathrm{i.i.d.}}\sim\mathrm{Expo}(\lambda)$. We compute:
\begin{align}
M_{X_1}(t) :&= \mathbb E[e^{tX_1}]\\
&= \int_0^\infty e^{st}\lambda e^{-\lambda s}\ \mathsf ds\\
&= \frac\lambda{\lambda-t}, \ t<\lambda.
\end{align} 
Since the moment-generating function of the sum of independent random variables is the product of their moment-generating functions, it follows readily that
\begin{align}
M_Y(t) :&= \mathbb E[e^{tY}]\\ 
&= \mathbb E[e^{t\sum_{i=1}^k X_i}]\\
&= \prod_{i=1}^k \mathbb E[e^{tX_i}]\\
&= M_{X_1}(t)^k\\
&= \left(\frac\lambda{\lambda-t}\right)^k,\ t<\lambda.
\end{align}
Now, in your integral you used $e^{-st}$ as opposed to $e^{st}$, which would make this the Laplace-Stieltjes transform as opposed to the moment-generating function. That would make the result 
$$
\mathbb E[e^{-tY}] = \left(\frac\lambda{\lambda+t}\right)^k,\ t>-\lambda.
$$
{"set_name": "stack_exchange", "score": 0, "question_id": 3559136}