PLAYGROUND

DISTRIBUTIONS / CONTINUOUS / HALF NORMAL

Half Normal distribution

The idea in one sentence

Phitter’s Half Normal is a location mu plus the absolute value of a centred Normal variable. It models error magnitudes or amplitudes above a floor when sign is unobserved.

Support and interpretation

Its support begins at mu, and sigma controls spread. It is necessarily nonnegative only when mu ≥ 0; mu shifts the folded result and is not the latent Normal mean.

Its place in the family

It is the centred Folded Normal and can be viewed as chi-square with one degree of freedom after squaring. Rayleigh and Maxwell are analogous radial models in two and three dimensions.

An applied reading

It is a transparent baseline for a magnitude generated by one normal component. If the hidden normal has a non-zero mean, Folded Normal is more appropriate.

Do not treat a Half-Normal standard deviation as the original normal’s sigma without accounting for folding.

The magnitude of an unsigned Normal error

After subtracting mu, Half Normal is the absolute value of a centred Normal variable. This construction leaves one scale parameter and puts the mode at the floor mu. It appears when an instrument records error size but not direction, and as a weakly informative prior for positive scales when mu=0.

The square of (X-mu)/sigma is Chi Square with one degree of freedom. It is also the one-dimensional case of the Chi family, while Rayleigh and Maxwell are magnitudes in two and three dimensions. If the latent Normal has a nonzero mean before taking the absolute value, Folded Normal is appropriate; that effect is not equivalent to shifting the result with mu.

Decision guide

A good candidate when: after subtracting a floor mu, the measurement is the magnitude of one centred Normal error.

Compare it with: Folded Normal when the latent Normal centre may be nonzero and Rayleigh for a two-component magnitude. Inspect mass near the floor.

References

  • SciPy reference: scipy.stats.halfnorm — definition and parameterization
  • Johnson, N. L., Kotz, S. & Balakrishnan, N. (1994). Continuous Univariate Distributions, 2nd ed., Vol. 1. Wiley.
  • Evans, M., Hastings, N. & Peacock, B. (2000). Statistical Distributions, 3rd ed. Wiley.
  • Leone, F. C., Nelson, L. S. & Nottingham, R. B. (1961). The folded normal distribution. Technometrics, 3(4), 543–550.

Half Normal Distribution: equations and calculator

Distribution defintion

X∼HalfNormal(μ,σ)X\sim\mathrm{HalfNormal}\left(\mu,\sigma\right)

Distribution domain

x∈(μ,∞)x\in\left(\mu,\infty\right)

Parameters domain and parameters constraints

μ∈R,σ∈R+\mu\in\mathbb{R},\sigma\in\mathbb{R}^{+}

Cumulative distribution function

FX(x)=2Φ(z(x))−1=erf⁡(z(x)2)F_{X}\left(x\right)=2\Phi\left(z(x)\right)-1=\operatorname{erf}\left(\frac{z(x)}{\sqrt{2}}\right)

Probability density function

fX(x)=2σπexp⁡(−z(x)22)f_{X}\left(x\right)=\frac{\sqrt{2}}{\sigma\sqrt{\pi}}\exp\left(-\frac{z(x)^2}{2}\right)

Percent point function/Sample

FX−1(u)=μ+σΦ−1(1+u2)=μ~+σ2erf⁡−1(u)F^{-1}_{X}\left(u\right)=\mu+\sigma\Phi^{-1}\left(\frac{1+u}{2}\right)=\tilde{\mu}+\sigma\sqrt{2}\operatorname{erf}^{-1}(u)

Non-central parametric moments

μ~k′=E[X~k]=∫0∞xkfX~(x)dx=2n/2Γ(n+12)π\tilde{\mu}'_{k}=E[\tilde{X}^k]=\int_{0}^{\infty}x^{k}f_{\tilde{X}}\left(x\right)dx=\frac{2^{n/2} \Gamma(\frac{n+1}{2})}{\sqrt{\pi}}

Parametric mean

Mean(X)=μ~+σμ~1′=μ~+σ2π\mathrm{Mean}(X)=\tilde{\mu}+\sigma\tilde{\mu}'_{1}=\tilde{\mu}+\sigma\sqrt{\frac{2}{\pi}}

Parametric variance

Variance(X)=σ2(μ~2′−μ~1′2)=σ2(1−2π)\mathrm{Variance}(X)=\sigma^{2}(\tilde{\mu}'_{2}-\tilde{\mu}'^{2}_{1})=\sigma^2\left(1-\frac 2 \pi\right)

Parametric skewness

Skewness(X)=μ~3′−3μ~2′μ~1′+2μ~1′3(μ~2′−μ~1′2)1.5=2(4−π)(π−2)3/2=0.9952717\mathrm{Skewness}(X)=\frac{\tilde{\mu}'_{3}-3\tilde{\mu}'_{2}\tilde{\mu}'_{1}+2\tilde{\mu}'^{3}_{1}}{(\tilde{\mu}'_{2}-\tilde{\mu}'^{2}_{1})^{1.5}}=\frac{\sqrt{2}(4-\pi)}{(\pi-2)^{3/2}}=0.9952717

Parametric kurtosis

Kurtosis(X)=μ~4′−4μ~1′μ~3′+6μ~1′2μ~2′−3μ~1′4(μ~2′−μ~1′2)2=3+8(π−3)(π−2)2=3.869177\mathrm{Kurtosis}(X)=\frac{\tilde{\mu}'_{4}-4\tilde{\mu}'_{1}\tilde{\mu}'_{3}+6\tilde{\mu}'^{2}_{1}\tilde{\mu}'_{2}-3\tilde{\mu}'^{4}_{1}}{(\tilde{\mu}'_{2}-\tilde{\mu}'^{2}_{1})^{2}}=3+\frac{8(\pi-3)}{(\pi-2)^2}= 3.869177

Parametric median

Median(X)=μ+σ2erf⁡−1(1/2)\mathrm{Median}(X)=\mu+\sigma\sqrt{2}\operatorname{erf}^{-1}(1/2)

Parametric mode

Mode(X)=μ\mathrm{Mode}(X)=\mu

Additional information and definitions

X~∼HalfNormal(0,1)\tilde{X}\sim\mathrm{HalfNormal}\left(0,1\right)
μ:Location parameter\mu:\text{Location parameter}
σ:Scale parameter\sigma:\text{Scale parameter}
z(x)=(x−μ)/σz\left(x\right)=\left(x-\mu\right)/\sigma
u:Uniform[0,1] random varibleu:\text{Uniform[0,1] random varible}
Φ(x):CDF normal standard distribution\Phi\left(x\right):\text{CDF normal standard distribution}
Φ−1(x):PPF normal standard distribution\Phi^{-1}\left(x\right):\text{PPF normal standard distribution}
erf(x):Error function\mathrm{erf}(x):\text{Error function}
Γ(x):Gamma function\Gamma\left(x\right):\text{Gamma function}