# MGF and moments

#### Jason

##### New member
I have to find the moment generating function and find all the moments of $X\sim N(0,1)$

For the MGF, I have:

$M_X(s)=\displaystyle\int_{-\infty}^{\infty}e^s\frac{e^{x^2/2}}{\sqrt{2\pi}}\,dx = \ldots=e^{s^2/2}$

Next I found that:

$M'_X(0)=E[X]=0$

$M''_X(0)=E[X^2]=1$

$E[X^3]=0$

$E[X^4]=3$

$\ldots$

$E[X^{ODD}]=\{0\}$

$E[X^{EVEN}]=\{1,3,15,105,945,\ldots\}$

Is it enough to write:

$E[X^k]=M_X^{(k)}(0)=\frac{d^k}{ds^k}e^{s^2/2}$

Am I totally off track here? How would I prove this?

Last edited:

#### CaptainBlack

##### Well-known member
I have to find the moment generating function and find all the moments of $X\sim N(0,1)$

For the MGF, I have:

$M_X(s)=\displaystyle\int_{-\infty}^{\infty}e^s\frac{e^{x^2/2}}{\sqrt{2\pi}}\,dx = \ldots=e^{s^2/2}$

Next I found that:

$M'_X(0)=E[X]=0$

$M''_X(0)=E[X^2]=1$

$E[X^3]=0$

$E[X^4]=3$

$\ldots$

$E[X^{ODD}]=\{0\}$

$E[X^{EVEN}]=\{1,3,15,105,945,\ldots\}$

Is it enough to write:

$E[X^k]=M_X^{(k)}(0)=\frac{d^k}{ds^k}e^{s^2/2}$

Am I totally off track here? How would I prove this?
Th $$k$$-th moment is $$k!$$ times coefficient of $$s^k$$ in the MacLauren series expansion of the MGF.

CB