What's wrong with my calculation? $\mathrm E[X^3]$ where $X\sim N(0,1)$

56 Views Asked by At

Let $X\sim N(0,1)$, compute $\mathrm E[X^3]$:

My attempt:

$$ \mathrm E[X^3]=\int_{-\infty}^{\infty}x^3\frac{1}{\sqrt{2\pi}}e^{-\frac{x^2}{2}}\mathrm d x \\ x^2=t \Rightarrow \mathrm dx=\frac{\mathrm dt}{2x}\\ \mathrm E[X^3]=\frac{1}{\sqrt{2\pi}}\int_{0}^{\infty} t\frac{1}{2}e^{-\frac{t}{2}}\mathrm dt=\frac{1}{\sqrt{2\pi}}E[Y] \\ Y\sim \exp(\frac{1}{2}) \\ \Rightarrow \mathrm E[X^3]=\frac{1}{\sqrt{2\pi}}\frac{1!}{0.5^1}=\frac{2}{\sqrt{2\pi}} $$

I used the fact that if $X\sim \exp(\lambda)$ then $\mathrm E[X^n]=\dfrac{n!}{\lambda^n}$

But the actual is result is $0$! Why is that? what am I missing here??

Thanks.

2

There are 2 best solutions below

0
On BEST ANSWER

Your change of variables is off. If you want to reason on integral (though drhab reasonning is much simpler) :

$$ E[X^3]=\int_{-\infty}^{+\infty} x^3\frac{1}{\sqrt{2\pi}}e^{-x^2/2}dx$$ $$ E[X^3]=\int_{-\infty}^{0} x^3\frac{1}{\sqrt{2\pi}}e^{-x^2/2}dx + \int_{0}^{+\infty} x^3\frac{1}{\sqrt{2\pi}}e^{-x^2/2}dx$$ Applying the change of variable $x\mapsto -x$ in the first integral, step by step $$ E[X^3]=\int_{+\infty}^{0} (-x)^3\frac{1}{\sqrt{2\pi}}e^{-x^2/2}(-dx) + \int_{0}^{+\infty} x^3\frac{1}{\sqrt{2\pi}}e^{-x^2/2}dx$$ $$ E[X^3]=\int_{+\infty}^{0} x^3\frac{1}{\sqrt{2\pi}}e^{-x^2/2}dx + \int_{0}^{+\infty} x^3\frac{1}{\sqrt{2\pi}}e^{-x^2/2}dx$$ $$ E[X^3]=-\int_{0}^{+\infty} x^3\frac{1}{\sqrt{2\pi}}e^{-x^2/2}dx + \int_{0}^{+\infty} x^3\frac{1}{\sqrt{2\pi}}e^{-x^2/2}dx$$ $$E[X^3]=0$$

0
On

Your change of variable is valid, but not as regards the integration range.

If $x$ runs from $-\infty$ to $\infty$, $t:=x^2$ runs from $\infty$ to $0$ then back to $\infty$, and the two contributions cancel each other.

The good news is that your one-sided integral, from $0$ to $\infty$ is correct.