# Half-normal distribution

The half-normal distribution is the probability distribution of the absolute value of a random variable that is normally distributed with expected value 0 and variance σ2. I.e. if X is normally distributed with mean 0, then Y = |X| is half-normally distributed.

The cumulative distribution function (CDF) is given by

${\displaystyle F_{Y}(y;\sigma )=\int _{0}^{y}{\frac {1}{\sigma }}{\sqrt {\frac {2}{\pi }}}\,\exp \left(-{\frac {x^{2}}{2\sigma ^{2}}}\right)\,dx}$

Using the change-of-variables z = x/σ, the CDF can be written as

${\displaystyle F_{Y}(y;\sigma )=\int _{0}^{y/\sigma }{\sqrt {\frac {2}{\pi }}}\,\exp \left(-{\frac {z^{2}}{2}}\right)dz.}$

The expectation is then given by

${\displaystyle E(y)=\sigma {\sqrt {2/\pi }},}$

The variance is given by

${\displaystyle \operatorname {Var} (y)=\sigma ^{2}\left(1-{\frac {2}{\pi }}\right).}$

Since this is proportional to the variance σ2 of X, σ can be seen as a scale parameter of the new distribution.