Skip to content

HalfNormalDistribution ​

The half-normal distribution with parameter θ\theta — π/2 ∣Z∣/θ\sqrt{\pi/2}\,|Z|/\theta for a standard normal ZZ.

HalfNormalDistribution(theta)an inert distribution object — carries θ\theta, unevaluated. Wolfram's own parameterization: θ\theta is inversely proportional to scale, not the scale itself.
Typed signatures
TypePackageApplies
(real<0..>) -> distributionstatisticsalways

Domain: Statistics

Details
  • PDF(x)=2θπ e−x2θ2/πPDF(x) = \frac{2\theta}{\pi}\, e^{-x^2\theta^2/\pi} for x≥0x \geq 0.
  • CDF(x)=Erf(xθ/π)CDF(x) = Erf(x\theta/\sqrt{\pi}) via Erf, clamped to 00 below x=0x=0.
  • Mean=1/θMean = 1/\theta, Variance=(π−2)/(2θ2)Variance = (\pi-2)/(2\theta^2), both exact.
  • RandomVariate samples π/2 ∣Z∣/θ\sqrt{\pi/2}\,|Z|/\theta for a standard normal ZZ.
  • θ=π/2\theta=\sqrt{\pi/2} is the standard half-normal ∣Z∣|Z|, the norm of one standard normal.

Examples

Basic #
live ↗
InPDF⁡(HalfNormalDistribution(1),1)\operatorname{PDF}(\mathrm{HalfNormalDistribution}(1), 1)Out1π(2exp⁡(−1π))\frac{1}{π}(2\exp(-\frac{1}{π}))
live ↗
InCDF⁡(HalfNormalDistribution(1),1)\operatorname{CDF}(\mathrm{HalfNormalDistribution}(1), 1)Outerf⁡(1π)\operatorname{erf}(\sqrt{\frac{1}{π}})
live ↗
Inmean(HalfNormalDistribution(1))\mathrm{mean}(\mathrm{HalfNormalDistribution}(1))Out11
live ↗
InVariance(HalfNormalDistribution(1))\mathrm{Variance}(\mathrm{HalfNormalDistribution}(1))Outπ−22\frac{π-2}{2}
live ↗
Inmean(HalfNormalDistribution(2))\mathrm{mean}(\mathrm{HalfNormalDistribution}(2))Out12\frac{1}{2}
live ↗
InVariance(HalfNormalDistribution(2))\mathrm{Variance}(\mathrm{HalfNormalDistribution}(2))Outπ−28\frac{π-2}{8}
About
Examples6
Checked againstWolfram Language 6 agree

See also: ChiDistribution, NormalDistribution, PDF, CDF