I'm having a hard time computing the variance of the standard normal distribution($u=0$ and $\sigma=1$). $$Var(X)=\int_{-\infty}^{\infty}x^2 e^{-x^2/2}dx$$ I want to substitute $y -> -x^2/2$
Which means I should get to $$Var(X)=\int_{-\infty}^{\infty}-ye^ydy$$
But this doesn't compute to 1 and I'm stuck here. Am I doing something wrong ? Could someone show me the right way to compute the proof, step by step ?
If you substitute $y\gets x^2/2$ you must also substitute $\mathsf d y \gets x~\mathsf d x$
$$\int x\,\mathrm e^{-x^2/2}\cdot x~\mathsf d x= \int \sqrt{y\,}~\mathrm e^{-y}~\mathsf d y$$
PS: you must also look at the interval of integration and whether any folding may happen.
PPS: Also the density function for $X\sim\mathcal N(0,1^2)$ is $f_X(x)=\frac 1{\sqrt{2\pi}}\mathrm e^{-x^2/2}$