Chi-square distribution
From Free net encyclopedia
Template:Probability distribution{\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 distribution), or χ2 distribution, is one of the theoretical probability distributions most widely used 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 means <math>\mu_i</math> and variances <math>\sigma_i^2</math>, then the random variable
- <math>Z = \sum_{i=1}^k \left(\frac{X_i-\mu_i}{\sigma_i}\right)^2</math>
is distributed according to the chi-square distribution. This is usually written
- <math>Z\sim\chi^2_k</math>
The chi-square distribution has one parameter: <math>k</math> - a positive integer which 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.
Contents |
Properties
The chi-square probability density function is
- <math>
f(x;k)= \frac{(1/2)^{k/2}}{\Gamma(k/2)} x^{k/2 - 1} e^{-x/2} </math>
where <math>x \ge 0</math> and <math>f(x;k) = 0</math> for <math>x \le 0</math>. Here <math>\Gamma</math> denotes the Gamma function. The cumulative distribution function is:
- <math>F(x;k)=\frac{\gamma(k/2,x/2)}{\Gamma(k/2)}\,</math>
where <math>\gamma(k,z)</math> is the incomplete Gamma function.
Tables of this distribution — usually in its cumulative form — are widely available (see the External links below for online versions), and the function is included in many spreadsheets (for example OpenOffice.org calc or Microsoft Excel) and all statistical packages.
If <math>p</math> independent linear homogeneous constraints are imposed on these variables, the distribution of <math>X</math> conditional on these constraints is <math>\chi^2_{k-p}</math>, justifying the term "degrees of freedom". The characteristic function of the Chi-square distribution is
- <math>\phi(t;k)=(1-2it)^{-k/2}\,</math>
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.
The 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 is <math>12/k</math>) and two transformations are commonly considered, each of which approaches normality faster than <math>X</math> itself:
Fisher showed that <math>\sqrt{2X}</math> is approximately normally distributed with mean <math>\sqrt{2k-1}</math> and unit variance.
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
- <math>k-\frac{2}{3}+\frac{4}{27k}-\frac{8}{729k^2}.</math>
Note that 2 degrees of freedom leads to an exponential distribution.
The information entropy is given by:
- <math>
H = \int_{-\infty}^\infty f(x;k)\ln(f(x;k)) dx = \frac{k}{2} + \ln
\left( 2 \Gamma \left( \frac{k}{2} \right) \right)
+ \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 = 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.
- <math>Y \sim \mathrm{F}(\nu_1, \nu_2)</math> is an F-distribution if <math>Y = (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.
Name | Statistic |
---|---|
chi-square distribution | <math>\sum_{i=1}^k \left(\frac{X_i-\mu_i}{\sigma_i}\right)^2</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
- On-line calculator for the significance of chi-square, in Richard Lowry's statistical website at Vassar College.
- Distribution Calculator Calculates probabilities and critical values for normal, t-, chi2- and F-distribution
- Chi-Square Calculator for critical values of Chi-Square in R. Webster West's applet website at University of South Carolinade:Chi-Quadrat-Verteilung
es:Distribución chi-cuadrado fr:Loi du χ² it:Variabile casuale chi quadro ja:カイ二乗分布 nl:Chi-kwadraatverdeling pl:Rozkład chi kwadrat ru:Хи-квадрат распределение su:Sebaran chi-kuadrat fi:Khii toiseen -jakauma sv:Chitvåfördelning zh:卡方分佈