Half-Normal Distribution Calculator

Enter a non-negative x and the scale σ to evaluate the half-normal distribution.

Result

0.301137
0.546745
1.595769

How it is calculated

For a point x ≥ 0 and a scale σ > 0 the tool returns three numbers with six decimals. Density: f(x) = √2 ÷ (σ√π) × exp(−x² ÷ (2σ²)). Cumulative probability: F(x) = erf(x ÷ (σ√2)). Mean: σ × √(2/π). Here σ is the scale of the underlying normal distribution, not the standard deviation of the half-normal itself. The error function is computed with a polynomial approximation (Abramowitz and Stegun 7.1.26) accurate to about seven decimal places, so the sixth decimal of the CDF may differ by one unit from an exact table. Negative x, or σ of zero or less, gives no result. The mean does not depend on x.

Worked example

Take x = 1.5 and σ = 2. Density: √2 ÷ (2 × √π) = 0.398942, and exp(−2.25 ÷ 8) = exp(−0.28125) = 0.754840, so f = 0.398942 × 0.754840 = 0.301137. CDF: z = 1.5 ÷ (2 × √2) = 0.530330, erf(0.530330) = 0.546745, so about 54.7% of the distribution lies below 1.5. Mean: 2 × 0.797885 = 1.595769. The density is not a probability; only the CDF is.

Try this example →

Common mistakes

  • Entering the standard deviation of the half-normal as σ: the scale is that of the original normal, and the half-normal's own standard deviation is smaller (σ√(1 − 2/π)).
  • Reading the density value as the probability of x: f(x) is a height, and can even exceed 1 when σ is small.
  • Entering a negative x: the distribution has no mass below zero, so the tool refuses it; take the absolute value of the measurement first.
  • Using the mean as the center of the data: the mean is σ × 0.7979, not σ and not 0.
  • Expecting the upper tail: the CDF is the probability of a value up to x, so the chance of exceeding x is 1 minus the CDF.

Sources

About this calculator

The half-normal distribution is what you get by folding a normal distribution centered at zero over onto its positive side — equivalently, it's the distribution of |Z| when Z follows a normal distribution N(0, σ²). It has a single scale parameter σ, probability density function f(x) = √(2/π)/σ · exp(−x²/(2σ²)) for x ≥ 0, and mean σ√(2/π) — always positive by construction, unlike the parent normal distribution.

This calculator evaluates the PDF, cumulative probability (CDF), and mean of the half-normal distribution for a chosen x and σ. It shows up wherever a quantity is naturally non-negative but arises from folding or taking the absolute value of an underlying normal process: modeling measurement or manufacturing error magnitudes (where only the size of a deviation matters, not its sign), reliability and survival analysis, and as a common prior distribution for standard-deviation parameters in Bayesian statistics because it's supported only on positive values.

Was this helpful?

You can pick up to 3 reactions.

Note from the editors

A reassuring check is to set x equal to sigma. With x = 2 and sigma = 2 the cumulative value is 0.682689, the familiar rule that about 68% of a normal curve lies within one sigma, because here the half-normal is simply the absolute value of that curve. The density in the same row, 0.241971, is a height, not a probability. Which quantity are you modeling with it: error magnitudes, waiting times, or a prior?

Comments

  • Be the first to comment.

Popular calculators

All Calculators