Let $X \sim N(0, 1)$. Calculate $E(X^4)$ I simply don't understand how to calculate the expected value of $X$, or $X^4$ for that matter. I tried doing the integral of $yf_x(y)dy$ from negative infinity to positive infinity but I don't know what y is supposed to be in this case or what $f_x(y)$ is supposed to be. Please help.
 A: Let $f(\cdot)$ be the PDF of $N(0,1)$. Note
$$
f'(x)=-x f(x).
$$
By integration by parts,
$$
\int x^4f(x)dx=\int(-x^3)f'(x)dx=\underbrace{(-x^3)f(x)\Big|_{-\infty}^\infty}_0+3\times\underbrace{\int x^2f(x)dx}_{\text{var of }N(0,1)}=3.
$$
A: Let $$g(t) = \int_{-\infty}^{\infty}e^{-tx^2} = \sqrt{\frac{2\pi}{t}}$$
$$g''(t) = \int_{-\infty}^{\infty}x^4e^{-tx^2} = ?$$
So we have 
$$g''(1/2) = \int_{-\infty}^{\infty}x^4e^{-x^2/2} = ? $$
A: First define a random variable $Y\sim\text{Gamma}(p)$ ($p>0$) if $Y$ has density
$$
f_Y(y)=\frac{1}{\Gamma(p)}y^{p-1}e^{-y}\quad (y>0).
$$
It is easy to see that $EY^d=\frac{\Gamma(p+d)}{\Gamma(p)}$ by the definition of the gamma function. 
Now onto the problem. Let $X$ be a standard normal random variable. It is well known that $X^2\sim\chi^2_{(1)}$ or equivalently $X^2/2\sim\text{Gamma}(1/2)$. Write $X^2\stackrel{d}{=}2W$ where $W\sim\text{Gamma}(1/2)$. Then
$$
EX^4=E(2W)^2=2^2EW^2=2^2\frac{\Gamma(1/2+2)}{\Gamma(1/2)}=2^2\left(\frac{1}{2}\right)\left(\frac{1}{2}+1\right)=1(3)=3$$
where we have used the fact that $\Gamma(p+1)=p\Gamma(p)$. We can generalize to compute all even moments of a standard normal. For $k\geq 1$
$$
EX^{2k}=E(2W)^k=2^kEW^k=2^k\frac{\Gamma(1/2+k)}{\Gamma(1/2)}=2^k\left(\frac{1}{2}\right)\left(\frac{1}{2}+1\right)\cdots
\left(\frac{1}{2}+k-1\right).
$$
But we can simplify further to get that
$$
EX^{2k}=1(3)\cdots(2k-1)=\frac{(2k)!}{2^kk!}.
$$
