expected value calculation for squared normal distribution

This is old, but I feel like an easy derivation is in order.

The variance of any random variable $X$ can be written as $$ V[X] = E[X^2] - (E[X])^2 $$

Solving for the needed quantity gives $$ E[X^2] = V[X] + (E[X])^2 $$

But for our case, $E[X] = 0$, so the answer of $\sigma^2$ is immediate.


The answer is $s = \sigma^2$. The integral you want to evaluate is

$$E[Z^2] = \frac{1}{\sqrt{2 \pi} \sigma} \int_{-\infty}^{\infty} dz \: z^2 \exp{(-\frac{z^2}{2 \sigma^2})}$$