# Chi distribution

Template:Probability distribution {{ safesubst:#invoke:Unsubst||$N=Unreferenced |date=__DATE__ |$B= {{#invoke:Message box|ambox}} }} In probability theory and statistics, the chi distribution is a continuous probability distribution. It is the distribution of the square root of the sum of squares of independent random variables having a standard normal distribution. The most familiar example is the Maxwell distribution of (normalized) molecular speeds which is a chi distribution with 3 degrees of freedom (one for each spatial coordinate). If ${\displaystyle X_{i}}$ are k independent, normally distributed random variables with means ${\displaystyle \mu _{i}}$ and standard deviations ${\displaystyle \sigma _{i}}$, then the statistic

${\displaystyle Y={\sqrt {\sum _{i=1}^{k}\left({\frac {X_{i}-\mu _{i}}{\sigma _{i}}}\right)^{2}}}}$

is distributed according to the chi distribution. Accordingly, dividing by the mean of the chi distribution (scaled by the square root of n − 1) yields the correction factor in the unbiased estimation of the standard deviation of the normal distribution. The chi distribution has one parameter: ${\displaystyle k}$ which specifies the number of degrees of freedom (i.e. the number of ${\displaystyle X_{i}}$).

## Characterization

### Probability density function

The probability density function is

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

### Cumulative distribution function

The cumulative distribution function is given by:

${\displaystyle F(x;k)=P(k/2,x^{2}/2)\,}$

### Generating functions

#### Moment generating function

The moment generating function is given by:

${\displaystyle M(t)=M\left({\frac {k}{2}},{\frac {1}{2}},{\frac {t^{2}}{2}}\right)+}$
${\displaystyle 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)}$

#### Characteristic function

The characteristic function is given by:

${\displaystyle \varphi (t;k)=M\left({\frac {k}{2}},{\frac {1}{2}},{\frac {-t^{2}}{2}}\right)+}$
${\displaystyle 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, ${\displaystyle M(a,b,z)}$ is Kummer's confluent hypergeometric function.

## Properties

### Moments

The raw moments are then given by:

${\displaystyle \mu _{j}=2^{j/2}{\frac {\Gamma ((k+j)/2)}{\Gamma (k/2)}}}$

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

${\displaystyle \mu _{1}={\sqrt {2}}\,\,{\frac {\Gamma ((k\!+\!1)/2)}{\Gamma (k/2)}}}$
${\displaystyle \mu _{2}=k\,}$
${\displaystyle \mu _{3}=2{\sqrt {2}}\,\,{\frac {\Gamma ((k\!+\!3)/2)}{\Gamma (k/2)}}=(k+1)\mu _{1}}$
${\displaystyle \mu _{4}=(k)(k+2)\,}$
${\displaystyle \mu _{5}=4{\sqrt {2}}\,\,{\frac {\Gamma ((k\!+\!5)/2)}{\Gamma (k/2)}}=(k+1)(k+3)\mu _{1}}$
${\displaystyle \mu _{6}=(k)(k+2)(k+4)\,}$

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

${\displaystyle \Gamma (x+1)=x\Gamma (x)\,}$

From these expressions we may derive the following relationships:

### Entropy

The entropy is given by:

${\displaystyle S=\ln(\Gamma (k/2))+{\frac {1}{2}}(k\!-\!\ln(2)\!-\!(k\!-\!1)\psi _{0}(k/2))}$