Using the moment generating function to find the first two moments $E(X)$ and $E(X^2)$

1.5k Views Asked by At

Wondering if someone could explain the following solution given by my lecture.

We are given that the probability generating function for a distribution is $e^{\mu(t-1)}$ and now must use this to find the moment generating function and then derive the first two moments $E(X)$ and $E(X^2)$.

So this is the solution:

$M_X(t)=E(e^{tX})=G_X(e^t)=e^{\mu(e^t-1)}$

$E(X)=M'_X(t)|_{t=0}=\mu$

I don't understand this step... if we are differentiating $M_X(t)$ then setting $t=0$ then how is it possible to find $\mu$ as the answer?

My lecturers notes are fairly vague so any help would be greatly appreciated!

2

There are 2 best solutions below

2
On BEST ANSWER

Think about expanding the definition of the MGF: $$ E[e^{tX}] = E\left[1+tX+\frac{t^2}{2}X^2+\dotsc\right] = E[1]+tE[X] + \frac{t^2}{2}E[X^2] + \dotsc. $$ The first term is $1$, the second is what we want. We can get that by differentiating and setting $t=0$.

Alternatively, suppose we can pass a derivative with respect to $t$ inside the expectation. Then $$ M_X'(t) = \frac{d}{dt}E[e^{tX}] = E\left[ \frac{d}{dt} e^{tX} \right] = E\left[ X e^{tX} \right]. $$ Putting $t=0$ then gives $$ M_X'(0) = E[Xe^0]=E[X]. $$

0
On

You have, by definition, \begin{eqnarray*} M_{X}(t)&=&E(e^{tX})=E\left[1 + tX + \dfrac{t^2}{2!}X^2+ \frac{t^3}{3!}X^{3}+\cdots\right]\\ M_{X}^{'}(t)&=&E\left[X + t X^2+ \frac{3t^2}{2!}X^{3}+\cdots\right]\\ M_{X}^{''}(t)&=&E\left[ X^2+ t X^{3}+\cdots\right]\\ M_{X}^{'}(0)&=&E(X).\\ M_{X}^{''}(0)&=&E(X^2). \end{eqnarray*}