Chi distribution

In probability theory and statistics, the chi distribution is a continuous probability distribution. The distribution usually arises when a k-dimensional vector's orthogonal components are independent and each follow a standard normal distribution. The length of the vector will then have a chi distribution. The most familiar example is the Maxwell distribution of (normalized) molecular speeds which is a chi distribution with 3 degrees of freedom. If $$X_i$$ are k independent, normally distributed random variables with means $$\mu_i$$ and standard deviations $$\sigma_i$$, then the statistic


 * $$Z = \sqrt{\sum_1^k \left(\frac{X_i-\mu_i}{\sigma_i}\right)^2}$$

is distributed according to the chi distribution. The chi distribution has one parameter: $$k$$ which specifies the number of degrees of freedom (i.e. the number of $$X_i$$).

Properties
The probability density function is


 * $$f(x;k) = \frac{2^{1-k/2}x^{k-1}e^{-x^2/2}}{\Gamma(k/2)}$$

where $$\Gamma(z)$$ is the Gamma function. The cumulative distribution function is given by:


 * $$F(x;k)=P(k/2,x^2/2)\,$$

where $$P(k,x)$$ is the regularized Gamma function. The moment generating function is given by:


 * $$M(t)=M\left(\frac{k}{2},\frac{1}{2},\frac{t^2}{2}\right)+$$
 * $$t\sqrt{2}\,\frac{\Gamma((k+1)/2)}{\Gamma(k/2)}

M\left(\frac{k+1}{2},\frac{3}{2},\frac{t^2}{2}\right)$$

where $$M(a,b,z)$$ is Kummer's confluent hypergeometric function. The raw moments are then given by:


 * $$\mu_j=2^{j/2}\frac{\Gamma((k+j)/2)}{\Gamma(k/2)}$$

where $$\Gamma(z)$$ is the Gamma function. The first few raw moments are:


 * $$\mu_1=\sqrt{2}\,\,\frac{\Gamma((k\!+\!1)/2)}{\Gamma(k/2)}$$
 * $$\mu_2=k\,$$
 * $$\mu_3=2\sqrt{2}\,\,\frac{\Gamma((k\!+\!3)/2)}{\Gamma(k/2)}=(k+1)\mu_1$$
 * $$\mu_4=(k)(k+2)\,$$
 * $$\mu_5=4\sqrt{2}\,\,\frac{\Gamma((k\!+\!5)/2)}{\Gamma(k/2)}=(k+1)(k+3)\mu_1$$
 * $$\mu_6=(k)(k+2)(k+4)\,$$

where the rightmost expressions are derived using the recurrence relationship for the Gamma function:


 * $$\Gamma(x+1)=x\Gamma(x)\,$$

From these expressions we may derive the following relationships:

Mean: $$\mu=\sqrt{2}\,\,\frac{\Gamma((k+1)/2)}{\Gamma(k/2)}$$

Variance: $$\sigma^2=k-\mu^2\,$$

Skewness: $$\gamma_1=\frac{\mu}{\sigma^3}\,(1-2\sigma^2)$$

Kurtosis excess: $$\gamma_2=\frac{2}{\sigma^2}(1-\mu\sigma\gamma_1-\sigma^2)$$

The characteristic function is given by:


 * $$\varphi(t;k)=M\left(\frac{k}{2},\frac{1}{2},\frac{-t^2}{2}\right)+$$
 * $$it\sqrt{2}\,\frac{\Gamma((k+1)/2)}{\Gamma(k/2)}

M\left(\frac{k+1}{2},\frac{3}{2},\frac{-t^2}{2}\right)$$

where again, $$M(a,b,z)$$ is Kummer's confluent hypergeometric function. The entropy is given by:


 * $$S=\ln(\Gamma(k/2))+\frac{1}{2}(k\!-\!\ln(2)\!-\!(k\!-\!1)\psi_0(k/2))$$

where $$\psi_0(z)$$ is the polygamma function.

Related distributions

 * If $$X$$ is chi distributed $$X \sim \chi_k(x)$$ then $$X^2$$ is chi-square distributed: $$X^2 \sim \chi^2_k$$
 * The Rayleigh distribution with $$\sigma=1$$ is a chi distribution with two degrees of freedom.
 * The Maxwell distribution for normalized molecular speeds is a chi distribution with three degrees of freedom.
 * The chi distribution for $$k=1$$ is the half-normal distribution.