# How can I compute $\mathbb{E}[Z^4]$ where $Z\sim N(0,1)$

Let $Z\sim N(0,1)$ and $Y=a+bZ+cZ^2$. I want to compute the variance of $Y$. This is what I did: $$\operatorname{Var}(Y)=0+b^2\operatorname{Var}(Z)+c^2\operatorname{Var}(Z^2)=b^2+c^2\operatorname{Var}(Z^2)$$ To get $\operatorname{Var}(Z^2)$, I tried to use the definition $\operatorname{Var}(Z^2)=\mathbb{E}[Z^4]-\mathbb{E}[Z^2]^2$ But im having with this part. If this was a odd for example $\mathbb{E}[Z^3]$ you can say that because of the symmetry of the normal distribution $\mathbb{E}[Z^3]=0$, but in this is pair.

Thank you

• Tried to google this, and the only answer that i found integration or using the moment generating function. But i dont think this is the way to solve the problem, probably there is a easiest way. Jul 20, 2016 at 18:23
• The formula $$\operatorname{Var}(a+bZ+cZ^2)=0+b^2\operatorname{Var}(Z)+c^2\operatorname{Var}(Z^2)$$ happens to hold but one wonders if the OP would not be under the illusion that the reason why it holds would be that in full generality the variance of the sum is the sum of the variances...
– Did
Jul 20, 2016 at 19:59

Integrate $\int_0^\infty x^4 e^{-x^2/2}\; dx$ by parts using $u = x^3$, $dv = x e^{-x^2/2}\; dx$. Or change variables with $x = \sqrt{t}$ and use properties of the Gamma function.

• thanks, but i dont understand why your using the $e^{-x^2/2}$ Jul 20, 2016 at 18:48
• @neto333 The Gaussian pdf with variance $1$ is proportional to $e^{-x^2/2}$.
– Ian
Jul 20, 2016 at 19:02

If you have seen the Moment Generating Function, we can solve this by using it.

We have $$\mathbf{E}(e^{tZ}) = e^{\frac{t^2}{2}}.$$ By equating the coefficient of $t^4$, we have $$\frac1{24}\mathbf{E}(Z^4) = \frac18.$$

This gives $\mathbf{E}(Z^4)=3$.

• Sorry, but where is $t^4$ Jul 20, 2016 at 19:35
• can you please explain me a little bit more this. Thank you :D. Jul 20, 2016 at 19:45
• Use Maclaurin series for $e^x$, use it both LHS and RHS. Then use linearity of expectation. Jul 20, 2016 at 19:55

$$\mathbb{E}[Z^4]=\frac{1}{\sqrt{2\pi}}\int_{-\infty}^{\infty}z^4e^{\large-\frac{z^2}{2}}dz=\frac{2}{\sqrt{2\pi}}\int_{0}^{\infty}z^4e^{\large-\frac{z^2}{2}}dz$$ set $\frac{z^2}{2}=u$, we have $z\,dz=du$ and $z^3=2\sqrt{2}u\sqrt{u}$, thus $$\mathbb{E}[Z^4]=\frac{4}{\sqrt{\pi}}\int_{0}^{\infty}u\sqrt{u}\,e^{-u}du=\frac{4}{\sqrt{\pi}}\Gamma\left(\frac{5}{2}\right)=\frac{4}{\sqrt{\pi}}\times \frac32 \times \frac 12\Gamma\left(\frac{1}{2}\right)=3$$ please check this link

Note $$\Gamma\left(\frac{1}{2}\right)=\sqrt{\pi}$$ Generally $$\mathbb{E}[Z^{2k}]=\frac{(2k)!}{2^k k!}$$

It can be shown that $$\lim_{z\to \pm \infty} g(z)\exp\left(-\frac12z^2\right) = 0 \implies \mathsf{E}[g'(Z)] = \mathsf{E}[Zg(Z)]$$

This can be done with integration by parts, letting $$u = g(z)$$. Thus,

$$\mathsf{E}[Z^4] = \mathsf{E}[Z \cdot Z^3] = \mathsf{E}[3Z^2] = \mathsf{E}[Z \cdot3Z] = \mathsf{E}[3] = 3$$