Suppose $X \sim N(0,1)$. Find $\mathrm{E}(X)$ and $\mathrm {Var} (X)$.
I have found $E(X)=0$. It's easy. While calculating variance of $X$ I got $2$ where as the actual answer should be $1$. Here's how I proceed $:$
$$\begin{align*}
\mathrm{Var} (X) &= \frac 1 {\sqrt {2\pi}} \int_{-\infty}^{\infty} x^2 e^{-{\frac {x^2} 2}}\ dx \\
&= \sqrt {\frac 2 {\pi}} \int_{0}^{\infty} x^2 e^{-{\frac {x^2} 2}}\ dx \\
\end{align*}$$ Now taking the substitution $\frac {x^2} 2 = y$ I found that
$$\begin{align*}
\int_{0}^{\infty} x^2 e^{-{\frac {x^2} 2}}\ dx &= \sqrt {2} \int_{0}^{\infty} e^{-y} y^{\frac 1 2}\ dy \\
&= \sqrt {2}\ \Gamma \left ({\frac 3 2} \right) \\
&= \sqrt {\frac {\pi} 2} \\
\end{align*}$$
So $$\begin{align*} \mathrm {Var} (X) &= \sqrt {\frac 2 {\pi}}.\sqrt {\frac {\pi} 2} \\ &= 1 \\ \end{align*}$$
Please check my calculation? Thank you very much.