# How to result in moment generating function of Weibull distribution?

So I'm trying to get the Weibull distribution moment generating function

$$\sum_{n=0}^\infty \frac{t^n \lambda^n}{n!} \Gamma(1+n/k)$$

(which can be found here https://en.wikipedia.org/wiki/Weibull_distribution)

I'm trying to do it with the definition of moment generating functions, but I can't get to that result. If $X$ has $\mathrm{Weibull}(\lambda, k)$ distribution, then its PDF is

$$f(x) = \begin{cases} \frac{k}{\lambda}(\frac{x}{\lambda})^{k-1} e^{(-x/\lambda)^k}, & \text{if x\ge0} \\ 0, & \text{if x<0} \end{cases}$$

And its moment generating function should be

$$M(t)=E(e^{tX})=\int_0^\infty e^{tx}\frac{k}{\lambda} \left(\frac{x}{\lambda}\right)^{k-1} e^{-(x/\lambda)^k} dx$$

but I can't get this form from Wikipedia. I have tried many different variable changes, etc., but without good result.

I appreciate any help leading to that form.

## 2 Answers

\begin{align} M(t) &= E(e^{tX}) = \int_0^\infty e^{tx}\frac{k}{\lambda} \left(\frac{x}{\lambda}\right)^{k-1} e^{-(x/\lambda)^k} dx &\\ &= \int_0^\infty e^{\lambda tu} ku^{k-1} e^{-u^k} du &\qquad(\text{with }u=x/\lambda\text{, for }\lambda>0) \\ &= \int_0^\infty e^{\lambda tx^{1/k}} e^{-x} dx &\qquad(\text{with }x=u^k\text{, for }k>0) \\ &= \int_0^\infty \sum_{n=0}^\infty {(\lambda t)^n\over n!} x^{n/k} e^{-x} dx \\ &= \sum_{n=0}^\infty {(\lambda t)^n\over n!} \int_0^\infty x^{n/k} e^{-x} dx \\ &= \sum_{n=0}^\infty {\lambda^n t^n \over n!} \Gamma\left({n\over k}+1\right) \end{align} from definitions with two substitutions (as indicated), the series expansion (for $e^{\lambda tx^{1/k}}$), and integrating term by term (with the definition of the Gamma function).

Let $X \sim \operatorname{Weibull}(k, \lambda)$ such that $$F_X(x) = 1 - e^{-(x/\lambda)^k}, \quad x > 0,$$ as described. Then we observe that $$X = \lambda (Y/\lambda)^{1/k},$$ or equivalently, $$(Y/\lambda) = (X/\lambda)^k,$$ where $Y \sim \operatorname{Exponential}(\lambda)$ with $$F_Y(y) = 1 - e^{-y/\lambda}, \quad y > 0.$$ So $X$ can be obtained through a suitable transformation of an exponential distribution. Now recall that the MGF of $Y$ is $$M_Y(y) = \operatorname{E}[e^{tY}] = \int_{y=0}^\infty \frac{1}{\lambda} e^{ty} e^{-y/\lambda} \, dy = \frac{1}{1 - \lambda t} \int_{y=0}^\infty (\lambda^{-1} - t)e^{-y(\lambda^{-1} - t)} \, dy = \frac{1}{1-\lambda t}.$$ Thus $$\operatorname{E}[Y^m] = M_Y^{(m)}(0) = \left[m! \lambda^m (1-\lambda t)^{-(m+1)} \right]_{t=0} = m! \lambda^m,$$ which generalizes to non-integer moments as $$\operatorname{E}[Y^m] = \Gamma(m+1) \lambda^m, \quad m > -1.$$ Now we see that $$\operatorname{E}[X^m] = \operatorname{E}[(\lambda (Y/\lambda)^{1/k})^m] = (\lambda^{m(1 - 1/k)}) \operatorname{E}[Y^{m/k}] = \lambda^{m(1-1/k)} \Gamma(1 + m/k) \lambda^{m/k} = \lambda^m \Gamma(1 + m/k).$$ Since $$M_X(t) = \sum_{n=0}^\infty \frac{M_X^{(n)}(0)}{n!} t^n = \sum_{n=0}^\infty \frac{\operatorname{E}[X^n]}{n!} t^n,$$ it follows $$M_X(t) = \sum_{n=0}^\infty \frac{\lambda^n \Gamma(1 + n/k)}{n!} t^n,$$ which concludes the proof.

• So much thanks to you! Btw where does that equality come after "Since" – DudeWithProblem97 Mar 24 '16 at 19:06
• @DudeWithProblem97 The first equality in that equation is the (Taylor) series expansion about $t = 0$ of the function $M_X(t)$. The second equality arises from the fact that $$\operatorname{E}[e^{tX}] = \operatorname{E}\left[\sum_{n=0}^\infty \frac{(tX)^n}{n!} \right] = \sum_{n=0}^\infty \frac{\operatorname{E}[X^n]}{n!} t^n.$$ – heropup Mar 24 '16 at 19:50
• Thanks, you made my day. :) – DudeWithProblem97 Mar 24 '16 at 20:01
• @DudeWithProblem97 Please accept the answer and/or upvote it if it has addressed your question to your satisfaction. – heropup Mar 24 '16 at 20:08