In probability theory and statistics, the χ2-distribution with k degrees of freedom is the distribution of a sum of the squares of k independent standard normal random variables. The chi-squared distribution χk2 is a special case of the gamma distribution and the univariate Wishart distribution. Specifically if X∼χk2 then X∼Gamma(α=k2,θ=2) (where α is the shape parameter and θ the scale parameter of the gamma distribution) and X∼W1(1,k). The scaled chi-squared distribution s2χk2 is a reparametrization of the gamma distribution and the univariate Wishart distribution. Specifically if X∼s2χk2 then X∼Gamma(α=k2,θ=2s2) and X∼W1(s2,k). The chi-squared distribution is one of the most widely used probability distributions in inferential statistics, notably in hypothesis testing and in construction of confidence intervals. This distribution is sometimes called the central chi-squared distribution, a special case of the more general noncentral chi-squared distribution. The chi-squared distribution is used in the common chi-squared tests for goodness of fit of an observed distribution to a theoretical one, the independence of two criteria of classification of qualitative data, and in finding the confidence interval for estimating the population standard deviation of a normal distribution from a sample standard deviation. Many other statistical tests also use this distribution, such as Friedman's analysis of variance by ranks.
Definitions If Z1, ..., Zk are independent, standard normal random variables, then the sum of their squares, X =∑i=1kZi2, is distributed according to the chi-squared distribution with k degrees of freedom. This is usually denoted as X ∼ χ2(k) or X ∼ χk2. The chi-squared distribution has one parameter: a positive integer k that specifies the number of degrees of freedom (the number of random variables Zi being summed).
Introduction The chi-squared distribution is used primarily in hypothesis testing, and to a lesser extent for confidence intervals for population variance when the underlying distribution is normal. Unlike more widely known distributions such as the normal distribution and the exponential distribution, the chi-squared distribution is not as often applied in the direct modeling of natural phenomena. It arises in the following hypothesis tests, among others:
Chi-squared test of independence in contingency tables Chi-squared test of goodness of fit of observed data to hypothetical distributions Likelihood-ratio test for nested models Log-rank test in survival analysis Cochran–Mantel–Haenszel test for stratified contingency tables Wald test Score test It is also a component of the definition of the t-distribution and the F-distribution used in t-tests, analysis of variance, and regression analysis. The primary reason for which the chi-squared distribution is extensively used in hypothesis testing is its relationship to the normal distribution. Many hypothesis tests use a test statistic, such as the t-statistic in a t-test. For these hypothesis tests, as the sample size, n, increases, the sampling distribution of the test statistic approaches the normal distribution (central limit theorem). Because the test statistic (such as t) is asymptotically normally distributed, provided the sample size is sufficiently large, the distribution used for hypothesis testing may be approximated by a normal distribution. Testing hypotheses using a normal distribution is well understood and relatively easy. The simplest chi-squared distribution is the square of a standard normal distribution. So wherever a normal distribution could be used for a hypothesis test, a chi-squared distribution could be used. Suppose that Z is a random variable sampled from the standard normal distribution, where the mean is 0 and the variance is 1: Z∼N(0,1). Now, consider the random variable X=Z2. The distribution of the random variable X is an example of a chi-squared distribution: X ∼ χ12. The subscript 1 indicates that this particular chi-squared distribution is constructed from only 1 standard normal distribution. A chi-squared distribution constructed by squaring a single standard normal distribution is said to have 1 degree of freedom. Thus, as the sample size for a hypothesis test increases, the distribution of the test statistic approaches a normal distribution. Just as extreme values of the normal distribution have low probability (and give small p-values), extreme values of the chi-squared distribution have low probability. An additional reason that the chi-squared distribution is widely used is that it turns up as the large sample distribution of generalized likelihood ratio tests (LRT). LRTs have several desirable properties; in particular, simple LRTs commonly provide the highest power to reject the null hypothesis (Neyman–Pearson lemma) and this leads also to optimality properties of generalised LRTs. However, the normal and chi-squared approximations are only valid asymptotically. For this reason, it is preferable to use the t distribution rather than the normal approximation or the chi-squared approximation for a small sample size. Similarly, in analyses of contingency tables, the chi-squared approximation will be poor for a small sample size, and it is preferable to use Fisher's exact test. Ramsey shows that the exact binomial test is always more powerful than the normal approximation. Lancaster shows the connections among the binomial, normal, and chi-squared distributions, as follows. De Moivre and Laplace established that a binomial distribution could be approximated by a normal distribution. Specifically they showed the asymptotic normality of the random variable χ=m−NpNpq where m is the observed number of successes in N trials, where the probability of success is p, and q=1−p. Squaring both sides of the equation gives χ2=(m−Np)2Npq Using N=Np+N(1−p), N=m+(N−m), and q=1−p, this equation can be rewritten as χ2=(m−Np)2Np+(N−m−Nq)2Nq The expression on the right is of the form that Karl Pearson would generalize to the form χ2=∑i=1n(Oi−Ei)2Ei where
… excerpt ends here. Continue reading the full article.




