PLAYGROUND

DISTRIBUTIONS / CONTINUOUS / FOLDED NORMAL

Folded Normal distribution

Profile

The Folded Normal distribution is the absolute value of a possibly shifted normal variable. It turns signed errors into magnitudes and can therefore have mass near zero or a single mode away from the origin.

Feature Reading
Support It takes non-negative values. mu describes the normal before folding and sigma its spread; mu=0 gives the Half Normal case.
Shape If Z is normal, `

Origin and terminology

The construction appears in error theory, signal analysis, and measurements where sign is lost. Its interest lies in the transformation rather than in one unique historical naming event.

In real models

  • absolute errors and residual magnitudes
  • signal intensity when an instrument records amplitude only

Comparisons

Do not replace it automatically with a truncated normal: truncation conditions on positivity, whereas folding sums reflected probabilities.

Folding the line does not erase the original shift

Folded Normal takes the absolute value of a Normal variable whose mean may differ from zero. Negative values reflect onto the positive axis and overlap the positive ones. When the original mean is zero, the result is Half Normal.

As the mean moves away from zero, magnitude tends to concentrate near its absolute value; when the mean is small relative to scale, folding piles density near the origin. Observing magnitude alone loses the original sign and can make mean and spread difficult to separate. The model is natural for absolute errors or one-dimensional amplitudes. Data clipped at zero are different: clipping creates an atom at the bound, while folding reflects probability.

Decision guide

A good candidate when: the observed quantity is the absolute value of a Normal measurement whose latent centre may be nonzero.

Compare it with: Half Normal if the latent centre is zero and Rice if the magnitude combines two Gaussian components. A genuine folding mechanism should be present.

References

  • SciPy reference: scipy.stats.foldnorm — 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.

Folded Normal Distribution: equations and calculator

Distribution defintion

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

Distribution domain

x∈[0,∞)x\in [0,\infty)

Parameters domain and parameters constraints

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

Cumulative distribution function

FX(x)=12[erf(x+μσ2)+erf(x−μσ2)]F_{X}\left(x\right)=\frac{1}{2}\left[\text{erf}\left(\frac{x+\mu}{\sigma\sqrt{2}}\right)+\text{erf}\left(\frac{x-\mu}{\sigma\sqrt{2}}\right)\right]

Probability density function

fX(x)=1σ2π e−(x−μ)22σ2+1σ2π e−(x+μ)22σ2f_{X}\left(x\right)=\frac{1}{\sigma\sqrt{2\pi}} \,e^{ -\frac{(x-\mu)^2}{2\sigma^2} }+\frac{1}{\sigma\sqrt{2\pi}} \,e^{ -\frac{(x+\mu)^2}{2\sigma^2} }

Percent point function/Sample

SampleX(u)=∣μ+σΦ−1(u)∣\text{Sample}_{X}\left(u\right)=\left|\mu+\sigma\Phi^{-1}(u)\right|

Non-central parametric moments

μk′=E[Xk]=∫0∞xkfX(x)dx\mu'_{k}=E[X^k]=\int_{0}^{\infty }x^{k}f_{X}\left(x\right)dx

Parametric mean

Mean(X)=μ1′=σ2π e(−μ2/2σ2)+μ(1−2 Φ(−μσ))\mathrm{Mean}(X)=\mu'_{1}=\sigma \sqrt{\tfrac{2}{\pi}} \,e^{(-\mu^2/2\sigma^2)}+\mu\left(1-2\,\Phi(-\tfrac{\mu}{\sigma})\right)

Parametric variance

Variance(X)=μ2′−μ1′2=μ2+σ2−Mean(X)2\mathrm{Variance}(X)=\mu'_{2}-\mu'^{2}_{1}=\mu^2+\sigma^2-\mathrm{Mean}(X)^{2}

Parametric skewness

Skewness(X)=μ3′−3μ2′μ1′+2μ1′3(μ2′−μ1′2)1.5\mathrm{Skewness}(X)=\frac{\mu'_{3}-3\mu'_{2}\mu'_{1}+2\mu'^{3}_{1}}{(\mu'_{2}-\mu'^{2}_{1})^{1.5}}

Parametric kurtosis

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

Parametric median

Median(X)=∣μ+σΦ−1(1/2)∣\mathrm{Median}(X)=\left|\mu+\sigma\Phi^{-1}\left(1/2\right)\right|

Parametric mode

Mode(X)=arg⁡max⁡xfX(x)\mathrm{Mode}(X)=\arg\max_{x}f_{X}\left(x\right)

Additional information and definitions

Computing an analytic expression for the inverse of the cumulative distribution function is not feasible. Nonetheless, it is possible to generate a random sample from the distribution.
μ:Location parameter\mu:\text{Location parameter}
σ:Scale parameter\sigma:\text{Scale parameter}
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}
ϕ(x):PDF normal standard distribution\phi\left(x\right):\text{PDF normal standard distribution}
Φ−1(x):PPF normal standard distribution\Phi^{-1}\left(x\right):\text{PPF normal standard distribution}