Skip to content

ChiDistribution ​

The chi distribution with kk degrees of freedom — the distribution of χk2\sqrt{\chi^2_k}.

ChiDistribution(k)an inert distribution object — carries kk, unevaluated.
Typed signatures
TypePackageApplies
(real<0..>) -> distributionstatisticsalways

Domain: Statistics

Details
  • PDF(x)=21−k/2xk−1e−x2/2/Γ(k/2)PDF(x) = 2^{1-k/2}x^{k-1}e^{-x^2/2}/\Gamma(k/2) for x≥0x \geq 0.
  • CDF(x)=P(k/2,x2/2)CDF(x) = P(k/2, x^2/2) via GammaRegularized (same convention as ChiSquareDistribution), clamped to 00 below x=0x=0.
  • Mean=2 Γ((k+1)/2)/Γ(k/2)Mean = \sqrt{2}\,\Gamma((k+1)/2)/\Gamma(k/2), Variance=k−Mean2Variance = k - Mean^2, both exact.
  • RandomVariate samples V\sqrt{V} for an independent ChiSquareDistribution(kk) draw VV.

Examples

Basic #
live ↗
InPDF⁡(ChiDistribution(3),1)\operatorname{PDF}(\mathrm{ChiDistribution}(3), 1)Out22Γ(32)e\frac{\sqrt{2}}{2Γ(\frac{3}{2})\sqrt{e}}
live ↗
InCDF⁡(ChiDistribution(3),1)\operatorname{CDF}(\mathrm{ChiDistribution}(3), 1)Out1−GammaRegularized⁡(32,12)1-\operatorname{GammaRegularized}(\frac{3}{2}, \frac{1}{2})
live ↗
Inmean(ChiDistribution(3))\mathrm{mean}(\mathrm{ChiDistribution}(3))Out2Γ(2)Γ(32)\frac{\sqrt{2}Γ(2)}{Γ(\frac{3}{2})}
About
Examples3

See also: ChiSquareDistribution, MaxwellDistribution, RayleighDistribution, PDF, CDF