Proving $E[X^4]=3σ^4$
Given a random variable $X\sim\mathcal N(0,\sigma^2)$, how can we prove that $E[X^4]=3\sigma^4$? I am having trouble even starting with the proof.
Solution 1:
First with $\sigma=1$, omitting the range $(-\infty,\infty)$ for convenience and integrating twice by parts
$$E[X^4]=\frac{\displaystyle\int x^4e^{-x^2/2}dx}{\displaystyle\int e^{-x^2/2}dx}=\frac{-x^3e^{-x^2/2}+3\displaystyle\int x^2e^{-x^2/2}dx}{\displaystyle\int e^{-x^2/2}dx}=\frac{0-3xe^{-x^2/2}+3\displaystyle\int e^{-x^2/2}dx}{\displaystyle\int e^{-x^2/2}dx}=3.$$
Then by rescaling the variable,
$$3\sigma^4.$$
By observing the pattern, you easily generalize to
$$E[X^{2n}]=(2n-1)!!\sigma^{2n}.$$
Solution 2:
I list some hints below.
The probability density function of a normally distributed random variable with mean $0$ and variance $\sigma^2$ is
\begin{equation} f(x) = \frac{1}{\sqrt{2 \pi \sigma^2}} \mathrm{e}^{-\frac{x^2}{2\sigma^2}}. \end{equation}
In general, you compute an expectation of a continuous random variable as
\begin{equation} \mathbb{E}[g(X)] = \int_{-\infty}^\infty g(x) f(x) \, \mathrm{d}x. \end{equation}
For your particular question we have that $g(x) = x^4$ and therefore
\begin{equation} \mathbb{E}[X^4] = \int_{-\infty}^\infty x^4 f(x) \, \mathrm{d}x = \frac{1}{\sqrt{2 \pi \sigma^2}} \int_{-\infty}^\infty x^4 \mathrm{e}^{-\frac{x^2}{2\sigma^2}} \, \mathrm{d}x. \end{equation}
You can solve this integral by using partial integration a number of times.
An alternative approach is to determine the moment generating function and differentiate. The moment generating function of a continuous random variable $X$ is defined as
\begin{equation} M_X(t) := \mathbb{E}[\mathrm{e}^{tX}] = \int_{-\infty}^\infty \mathrm{e}^{t x} f(x) \, \mathrm{d}x, \quad t \in \mathbb{R}. \end{equation}
For your random variable $X$ we have
\begin{equation} M_X(t) = \frac{1}{\sqrt{2 \pi \sigma^2}} \int_{-\infty}^\infty \mathrm{e}^{t x} \mathrm{e}^{-\frac{x^2}{2\sigma^2}} \, \mathrm{d}x. \end{equation}
Conveniently
\begin{equation} \mathbb{E}[X^n] = \frac{\mathrm{d}^n}{\mathrm{d}t^n} M_X(t) \bigg\vert_{t = 0}. \end{equation}
Solution 3:
@Yves Daoust already has a great answer, but we can omit a round of integration by parts, by just working it out in the most straight-forward way.
Applying integration by parts once, $$ \mathbb{E} (x^4) = \int x^4 \varphi(x) dx = 0 + 3\sigma^2 \int x^2 \varphi(x) dx $$
where $\varphi(x)$ is normal PDF and $\varphi(x) = \frac{1}{\sqrt{2\pi}\sigma} e^{-\frac{x^2}{2\sigma^2}}$
We recognise $\int x^2 \varphi(x) dx = \sigma^2$. So,
$$ \mathbb{E} (x^4) = 3\sigma^2 \sigma^2 = 3 \sigma^4 $$
Solution 4:
The moment generating function of the standard normal $$M_{Z}(t)= e^{t^2/2}$$ has fouth derivative $$M_{Z}''''(t)=3M_{Z}''(t)+tM_{Z}'''(t)$$ Setting $t=0$ results in $E(Z^4) = 3$. Now, $$ E(X^4)=\sigma^4E(Z^4)=3\sigma^4 $$