Chi-square distribution

Jump to: navigation, search
Probability density function
Chi-square distributionPDF.png
Cumulative distribution function
Chi-square distributionCDF.png
Parameters <math>k > 0\,</math> degrees of freedom
Support <math>x \in [0; +\infty)\,</math>
Probability density function (pdf) <math>\frac{(1/2)^{k/2
Cumulative distribution function (cdf) {{{cdf}}}
Mean {{{mean}}}
Median {{{median}}}
Mode {{{mode}}}
Variance {{{variance}}}
Skewness {{{skewness}}}
Excess kurtosis {{{kurtosis}}}
Entropy {{{entropy}}}
Moment-generating function (mgf) {{{mgf}}}
Characteristic function {{{char}}}
{\Gamma(k/2)} x^{k/2 - 1} e^{-x/2}\,</math>|
 cdf        =<math>\frac{\gamma(k/2,x/2)}{\Gamma(k/2)}\,</math>|
 mean       =<math>k\,</math>|
 median     =approximately <math>k-2/3\,</math>|
 mode       =<math>k-2\,</math> if <math>k\geq 2\,</math>|
 variance   =<math>2\,k\,</math>|
 skewness   =<math>\sqrt{8/k}\,</math>|
 kurtosis   =<math>12/k\,</math>|
 entropy    =<math>\frac{k}{2}\!+\!\ln(2\Gamma(k/2))\!+\!(1\!-\!k/2)\psi(k/2)</math>|
 mgf        =<math>(1-2\,t)^{-k/2}</math> for <math>2\,t<1\,</math>|
 char       =<math>(1-2\,i\,t)^{-k/2}\,</math>


In probability theory and statistics, the chi-square distribution (also chi-squared or <math>\chi^2</math>  distribution) is one of the most widely used theoretical probability distributions in inferential statistics, i.e. in statistical significance tests. It is useful because, under reasonable assumptions, easily calculated quantities can be proven to have distributions that approximate to the chi-square distribution if the null hypothesis is true.

If <math>X_i</math> are k independent, normally distributed random variables with mean 0 and variance 1, then the random variable

<math>Q = \sum_{i=1}^k X_i^2</math>

is distributed according to the chi-square distribution. This is usually written


The chi-square distribution has one parameter: <math>k</math> - a positive integer that specifies the number of degrees of freedom (i.e. the number of <math>X_i</math>)

The chi-square distribution is a special case of the gamma distribution.

The best-known situations in which the chi-square distribution is used are the common chi-square tests for goodness of fit of an observed distribution to a theoretical one, and of the independence of two criteria of classification of qualitative data. However, many other statistical tests lead to a use of this distribution. One example is Friedman's analysis of variance by ranks.


Probability density function

A probability density function of the chi-square distribution is


f(x;k)= \begin{cases}\displaystyle \frac{1}{2^{k/2}\Gamma(k/2)}\,x^{k/2 - 1} e^{-x/2}&\text{for }x>0,\\ 0&\text{for }x\le0, \end{cases} </math>

where <math>\Gamma</math> denotes the Gamma function, which takes particular values at the half-integers.

Cumulative distribution function

Its cumulative distribution function is:

<math>F(x;k)=\frac{\gamma(k/2,x/2)}{\Gamma(k/2)} = P(k/2, x/2)</math>

where <math>\gamma(k,z)</math> is the lower incomplete Gamma function and <math>P(k, z)</math> is the regularized Gamma function.

Tables of this distribution — usually in its cumulative form — are widely available and the function is included in many spreadsheets and all statistical packages.

Characteristic function

The characteristic function of the Chi-square distribution is



The chi-square distribution has numerous applications in inferential statistics, for instance in chi-square tests and in estimating variances. It enters the problem of estimating the mean of a normally distributed population and the problem of estimating the slope of a regression line via its role in Student's t-distribution. It enters all analysis of variance problems via its role in the F-distribution, which is the distribution of the ratio of two independent chi-squared random variables divided by their respective degrees of freedom.

Normal approximation

If <math>X\sim\chi^2_k</math>, then as <math>k</math> tends to infinity, the distribution of <math>X</math> tends to normality. However, the tendency is slow (the skewness is <math>\sqrt{8/k}</math> and the kurtosis excess is <math>12/k</math>) and two transformations are commonly considered, each of which approaches normality faster than <math>X</math> itself:

Fisher emprically showed that <math>\sqrt{2X}</math> is approximately normally distributed with mean <math>\sqrt{2k-1}</math> and unit variance. It is possible to arrive at the same normal approximation result by using moment matching. To see this, consider the mean and the variance of a Chi-distributed random variable <math>z=\sqrt{X}</math>, which are given by <math>\mu_z= \sqrt{2} \frac{\Gamma\left(k/2+1/2\right)}{\Gamma\left(k/2 \right)}</math> and <math>\sigma_z^2= k-\mu_z^2</math>, where <math>\Gamma(\cdot)</math> is the Gamma function. The particular ratio of the Gamma functions in <math>\mu_z </math> has the following series expansion [1]: <math>\frac{\Gamma\left(N+1/2\right)}{\Gamma\left(N \right)}=\sqrt{N}\left(1-\frac{1}{8N}+ \frac{1}{128N^2}+\frac{5}{1024N^3}-\frac{21}{32768N^4}+\ldots\right).</math> When <math>N\gg 1</math>, this ratio can be approximated as follows: <math> \frac{\Gamma\left(N+1/2\right)}{\Gamma\left(N \right)}\approx\sqrt{N}\left(1-\frac{1}{8N}\right)\approx\sqrt{N}\left(1-\frac{1}{4N}\right)^{0.5}=\sqrt{N-1/4}. </math> Then, simple moment matching results in the following approximation of <math>z</math>: <math> z\sim{\mathcal N}\left(\sqrt{k-1/2}, \frac{1}{2}\right)</math>, from which it follows that <math> \sqrt{2X}\sim{\mathcal N}\left(\sqrt{2k-1}, 1\right)</math>.

Wilson and Hilferty showed in 1931 that <math>\sqrt[3]{X/k}</math> is approximately normally distributed with mean <math>1-2/(9k)</math> and variance <math>2/(9k)</math>.

The expected value of a random variable having chi-square distribution with <math>k</math> degrees of freedom is <math>k</math> and the variance is <math>2k</math>. The median is given approximately by


Note that 2 degrees of freedom lead to an exponential distribution.

Information entropy

The information entropy is given by


H = \int_{-\infty}^\infty f(x;k)\ln(f(x;k)) dx = \frac{k}{2} + \ln

 2 \Gamma

+ \left(1 - \frac{k}{2}\right) \psi(k/2). </math>

where <math>\psi(x)</math> is the Digamma function.

Related distributions

  • <math>X \sim \mathrm{Exponential}(\lambda = \frac{1}{2})</math> is an exponential distribution if <math>X \sim \chi_2^2</math> (with 2 degrees of freedom).
  • <math>Y \sim \chi_k^2</math> is a chi-square distribution if <math>Y = \sum_{m=1}^k X_m^2</math> for <math>X_i \sim N(0,1)</math> independent that are normally distributed.
  • If the <math>X_i\sim N(\mu_i,1)</math> have nonzero means, then <math>Y = \sum_{m=1}^k X_m^2</math> is drawn from a noncentral chi-square distribution.
  • The chi-square distribution <math>X \sim \chi^2_\nu</math> is a special case of the gamma distribution, in that <math>X \sim \textrm{Gamma}(\tfrac{\nu}{2}, 2)</math>.
  • <math>Y \sim \mathrm{F}(\nu_1, \nu_2)</math> is an F-distribution if <math>Y = \frac{X_1 / \nu_1}{X_2 / \nu_2}</math> where <math>X_1 \sim \chi_{\nu_1}^2</math> and <math>X_2 \sim \chi_{\nu_2}^2</math> are independent with their respective degrees of freedom.
  • <math>Y \sim \chi^2(\bar{\nu})</math> is a chi-square distribution if <math>Y = \sum_{m=1}^N X_m</math> where <math>X_m \sim \chi^2(\nu_m)</math> are independent and <math>\bar{\nu} = \sum_{m=1}^N \nu_m</math>.
  • if <math>X</math> is chi-square distributed, then <math>\sqrt{X}</math> is chi distributed.
  • in particular, if <math>X \sim \chi_2^2</math> (chi-square with 2 degrees of freedom), then <math>\sqrt{X}</math> is Rayleigh distributed.
  • if <math>X_1, \dots, X_n</math> are i.i.d. <math>N(\mu,\sigma^2)</math> random variables, then <math>\sum_{i=1}^n(X_i - \bar X)^2 \sim \sigma^2 \chi^2_{n-1}</math> where <math>\bar X = \frac{1}{n} \sum_{i=1}^n X_i</math>.
  • if <math>X \sim \mathrm{SkewLogistic}(\frac{1}{2})\,</math>, then <math>\mathrm{log}(1 + e^{-X}) \sim \chi_2^2\,</math>
Various chi and chi-square distributions
Name Statistic
chi-square distribution <math>\sum_{i=1}^k \frac{\left(X_i-\mu_i\right)^2}{\sigma_i}</math>
noncentral chi-square distribution <math>\sum_{i=1}^k \left(\frac{X_i}{\sigma_i}\right)^2</math>
chi distribution <math>\sqrt{\sum_{i=1}^k \left(\frac{X_i-\mu_i}{\sigma_i}\right)^2}</math>
noncentral chi distribution <math>\sqrt{\sum_{i=1}^k \left(\frac{X_i}{\sigma_i}\right)^2}</math>

See also

External links

ca:Distribució khi quadrat

cs:Χ² rozdělení de:Chi-Quadrat-Verteilungit:Variabile casuale chi quadro nl:Chi-kwadraatverdelingsimple:Chi-square distribution su:Sebaran chi-kuadrat fi:Khii toiseen -jakauma sv:Chitvåfördelning

Navigation WikiDoc | WikiPatient | Up To Date Pages | Recently Edited Pages | Recently Added Pictures

Table of Contents In Alphabetical Order | By Individual Diseases | Signs and Symptoms | Physical Examination | Lab Tests | Drugs

Editor Tools Become an Editor | Editors Help Menu | Create a Page | Edit a Page | Upload a Picture or File | Printable version | Permanent link | Maintain Pages | What Pages Link Here
There is no pharmaceutical or device industry support for this site and we need your viewer supported Donations | Editorial Board | Governance | Licensing | Disclaimers | Avoid Plagiarism | Policies