Chi-square test

From Wikipedia, the free encyclopedia

"Chi-square test" is often shorthand for Pearson's chi-square test.

A chi-square test (also chi-squared or χ2  test) is any statistical hypothesis test in which the test statistic has a chi-square distribution when the null hypothesis is true, or any in which the probability distribution of the test statistic (assuming the null hypothesis is true) can be made to approximate a chi-square distribution as closely as desired by making the sample size large enough.

Some examples of chi-squared tests include:

  • Pearson's chi-square test, also known as the chi-square goodness-of-fit test or chi-square test for independence. When mentioned without any modifiers or without other precluding context, this test is usually understood.
  • Yates' chi-square test, also known as Yates' correction for continuity.
  • Mantel-Haenszel chi-square test.
  • Linear-by-linear association chi-square test.
  • The test that the variance of a normally-distributed population has a given value based on a sample variance.

Contents

[edit] Chi-square test for contingency table example

A chi-square test may be applied on a contingency table for testing a null hypothesis of independence of rows and columns.

As an example of the use of the Chi-square test, a fair coin is one where heads and tails are equally likely to turn up after it is flipped. Suppose one is given a coin and asked to test if it is fair. After 100 trials, heads turn up 53 times and tails result 47 times. The following is a Chi-square analysis, where the null hypothesis is that the coin is fair:

Chi-Square calculation of Coin Toss
Heads Tails Total
Observed 53 47 100
Expected 50 50 100
(O  −  E)2 9 9
χ2 = (O − E)2/E 0.18 0.18 0.36

In this case, the test has one degree of freedom and the chi-square value is 0.36. In order to see whether this result is statistically significant, the P-value (the probability of this result not being due to chance) must be calculated or looked up in a chart. The P-value is found to be Prob(χ21 ≥ 0.36) = 0.5485. There is thus a probability of about 55% of seeing data that deviates at least this much from the expected results if indeed the coin is fair. This probability is not considered statistically significant evidence of an unfair coin.

[edit] See also

[edit] External links

[edit] References

  • Greenwood, P.E., Nikulin, M.S. (1996) A guide to chi-squared testing. Wiley, New York. ISBN 047155779X