A student I'm tutoring came to me with a problem in which he needs to find a closed-form expression in $\sigma$, $E(|Y|)$. $Y$ has a normal distribution with mean $0$ and standard deviation $\sigma$. I know that there is going to be integration involved and that a density function must integrate to $1$. But, for some reason I'm stuck on this problem. Also, just as a reminder the density function for a normal distribution is: $f(y,\mu,\sigma) = \frac{1}{\sigma \sqrt{2\pi}}e^{ \frac{(y-\mu)^2}{2\sigma^2}}$.
Any help would be appreciated.
$$E(|Y|) = \frac1{\sqrt{2 \pi} \sigma} \int_{-\infty}^{\infty} dy \, |y| \, e^{-y^2/(2 \sigma^2)} = \frac{2}{\sqrt{2 \pi} \sigma} \underbrace{\int_{0}^{\infty} dy \, y \, e^{-y^2/(2 \sigma^2)}}_{u=y^2} = \frac1{\sqrt{2 \pi} \sigma}\int_0^{\infty} du \, e^{-u/(2 \sigma^2)} = \sqrt{\frac{2}{\pi}} \sigma$$