[Math] How to derive the expected value of even powers of a standard normal random variable

expectationnormal distributionprobability

I am trying to prove that, for a standard normal random variable $Z \sim N(0,1)$, ${\mathbb E}[z^n]=n!!$ for even values of $n$. What I'm doing is integrating the p.d.f. of $Z$ which is $\frac{1}{\sqrt{2\pi}}exp(-x^2/2)$, i.e.,

$${\mathbb E}[z^n] = \frac{1}{\sqrt{2\pi}}\int_{-\infty}^{\infty}x^n exp(-x^2/2)$$

While trying to use integration by parts, I'm unable to get either function into a form where the above reduces to some sort of a recurrence relation. Can you help?

Best Answer

\begin{align*} {\mathbb E}[z^n] &= \frac{1}{\sqrt{2\pi}}\int_{-\infty}^{\infty}x^n exp(-x^2/2)\\ &=\frac{1}{\sqrt{2\pi}}\left[(n-1)x^{n-2}xe^{-x^2/2}\right]^{\infty}_{-\infty}-\frac{1}{\sqrt{2\pi}}\int_{-\infty}^{\infty}-(n-1)x^{n-2}e^{-x^2/2}dx\\ &=\frac{1}{\sqrt{2\pi}}\int_{-\infty}^{\infty}(n-1)x^{n-2}e^{-x^2/2}dx\\ &=\frac{1}{\sqrt{2\pi}}\int_{-\infty}^{\infty}(n-1)!!e^{-x^2/2}dx\\ &= (n-1)!! \end{align*}