From Wikibooks, open books for an open world
< Statistics‎ | Distributions
Jump to: navigation, search

Chi-square DistributionEdit

Probability density function
Chi-square pdf.svg
Cumulative distribution function
Notation \chi^2(k)\! or \chi^2_k\!
Parameters k \in \mathbb{N}~~ (known as "degrees of freedom")
Support x ∈ [0, +∞)
PDF \frac{1}{2^{\frac{k}{2}}\Gamma\left(\frac{k}{2}\right)}\; x^{\frac{k}{2}-1} e^{-\frac{x}{2}}\,
CDF \frac{1}{\Gamma\left(\frac{k}{2}\right)}\;\gamma\left(\frac{k}{2},\,\frac{x}{2}\right)
Mean k
Median \approx k\bigg(1-\frac{2}{9k}\bigg)^3
Mode max{ k − 2, 0 }
Variance 2k
Skewness \scriptstyle\sqrt{8/k}\,
Ex. kurtosis 12 / k
Entropy \frac{k}{2}\!+\!\ln(2\Gamma(k/2))\!+\!(1\!-\!k/2)\psi(k/2)
MGF (1 − 2 t)k/2   for  t  < ½
CF (1 − 2 it)k/2      [1]

Chi-square distribution is related to normal distribution. A chi-square statistic is the sum of a number of independent and standard normal random variables.

Assume that we have n number of random variables Z, that are normally distributed. Therefore, we can write  Z \sim N(0,1) . If we square Z such that  Z^2 , then we get the chi-square distribution  Z^2 \sim \chi_{1}^2 . If we sum n number of  \chi_{1}^2 , we can write

Y = Z_1^2 + Z_2^2 + ... + Z_n^2 \sim \chi_{n}^2

One example could be that we want to know whether the weight of a set of eight apples is normally distributed. Chi-square distribution can be used to test for this. Assume that the apples weigh 88, 93, 110, 76, 78, 121, 92 and 86 grams, and we have knowledge of the mean and the standard deviation weight of all apples. We obtain the normally distributed Z values by subtracting the mean weight (93) and divide by the standard deviation (15.41). For example, the first apple has Z-score  Z_1 = \frac{88-93}{15.41} = -0.3245 using four decimal points. Square all the Z values, then taking the sum yields a Chi-squared distributed random variable with mean 8 and variance 16.

Now when we have the value of the chi-square statistic Y, we compare it to the critical value of the chi-square distribution at n = 8 degrees of freedom and 95% level of significance which can found in a Chi-square statistical table. The null hypothesis is that the sample of apples is normally distributed. It is rejected if the value of the test statistic is higher than the critical value.

The chi-square distribution is a special case of the gamma distribution, where a=2 and p=k/2. The probability density function is:

\frac{1}{2^{k/2}\Gamma(k/2)}\; x^{k/2-1} e^{-x/2}\quad x\geq 0,\,k \in [1,2,...]

Summary statisticsEdit

The mean of a chi-squared is k

The variance of a chi-squared is 2k

For the proof of these, see the gamma distribution.

External linksEdit