how to show $E[|X|]= \sigma$ where $X \sim N(0, \sigma^2)$ let $X \sim N(0, \sigma^2)$ I want to show $$E[|X|]= \sigma$$
thanks for help
 A: Let $Z\sim N(0,1)$ so that $X=\mu+\sigma Z\sim N(\mu,\sigma^2)$.
Then $Y=|X|$  has the Folded Normal Distribution if $\mu\ne 0$ and the Half-Normal Distribution when $\mu=0$.
In your case $Y$ has the Half-Normal Distribution with cdf $F$ and pdf $f$
$$
\begin{align}
 F(y) & = 2 \Phi\left(\frac{y}{\sigma}\right) - 1 = \int_0^y \frac{1}{\sigma} \sqrt{\frac{2}{\pi}} \exp\left(-\frac{x^2}{2 \sigma^2}\right) \, dx, \quad y \in [0, \infty) \\
 f(y) &= \frac{2}{\sigma} \phi\left(\frac{y}{\sigma}\right) = \frac{1}{\sigma} \sqrt{\frac{2}{\pi}} \exp\left(-\frac{y^2}{2 \sigma^2}\right), \quad y \in [0, \infty)
\end{align}
$$
The even order moments of $Y$ are the same as the even order moments of $\sigma Z$: 
$$
\Bbb E(Y^{2n})  = \sigma^{2n}\Bbb E(Z^{2n}) = \sigma^{2n} \frac{(2n)!}{n! 2^n}
$$
using the $n$-th derivative of the mgf $M_Z(t)=e^{t^2/2}$ in $t=0$.
For the odd order moments we have by substituting $y^2/2\sigma^2=z$:
$$
\Bbb E(Y^{2n+1}) = \int_0^\infty y^{2n+1} \sqrt{\tfrac{2}{\pi \sigma^2}} e^{-y^2/2} \, dy = \sigma^{2n+1} 2^n \sqrt{\tfrac{2}{\pi}}\underbrace{\int_0^\infty z^n e^{-z} \, dz}_{\Gamma(n+1)=n!} = \sigma^{2n+1} 2^n \sqrt{\tfrac{2}{\pi}} n!
$$
In particular, we have $\Bbb E(Y) = \sigma \sqrt{2/\pi}$ and $\text{Var}(Y) = \sigma^2(1 - 2 / \pi)$.
A: Hint: $$E[|X|]=\int_{-\infty}^{\infty} |x| \frac{1}{\sigma\sqrt{2\pi}}\, e^{-\frac{x ^2}{2 \sigma^2}} dx=2\int_{0}^{\infty} x \frac{1}{\sigma\sqrt{2\pi}}\, e^{-\frac{x^2}{2 \sigma^2}} dx$$ which is not a difficult integral: try the substitution $y=x^2$.
