TOPICS
Search

Chi-Squared Test


Let the probabilities of various classes in a distribution be p_1, p_2, ..., p_k, with observed frequencies m_1, m_2, ..., m_k. The quantity

 chi_s^2=sum_(i=1)^k((m_i-Np_i)^2)/(Np_i)
(1)

is therefore a measure of the deviation of a sample from expectation, where N is the sample size. Karl Pearson proved that the limiting distribution of chi_s^2 is a chi-squared distribution (Kenney and Keeping 1951, pp. 114-116).

The probability that the distribution assumes a value of chi^2 greater than the measured value chi_s^2 is then given by

P(chi^2>=chi_s^2)=int_(chi_s^2)^inftyf(chi^2)d(chi^2)
(2)
=1/2int_(chi_s^2)^infty(((chi^2)/2)^((k-3)/2))/(Gamma((k-1)/2))e^(-chi^2/2)d(chi^2)
(3)
=(Gamma((k-1)/2,1/2chi_s^2))/(Gamma((k-1)/2)).
(4)

There are some subtleties involved in using the chi^2 test to fit curves (Kenney and Keeping 1951, pp. 118-119). When fitting a one-parameter solution using chi^2, the best-fit parameter value can be found by calculating chi^2 at three points, plotting against the parameter values of these points, then finding the minimum of a parabola fit through the points (Cuzzi 1972, pp. 162-168).


See also

Chi-Squared Distribution, Significance Test Explore this topic in the MathWorld classroom

Explore with Wolfram|Alpha

References

Cuzzi, J. The Subsurface Nature of Mercury and Mars from Thermal Microwave Emission. Ph.D. Thesis. Pasadena, CA: California Institute of Technology, 1972.Kenney, J. F. and Keeping, E. S. Mathematics of Statistics, Pt. 2, 2nd ed. Princeton, NJ: Van Nostrand, 1951.

Referenced on Wolfram|Alpha

Chi-Squared Test

Cite this as:

Weisstein, Eric W. "Chi-Squared Test." From MathWorld--A Wolfram Web Resource. https://mathworld.wolfram.com/Chi-SquaredTest.html

Subject classifications