Math 2.0

concept

Chi-squared test

Summary

A chi-squared test is a hypothesis test whose test statistic has approximately a chi-squared distribution under the null hypothesis. The main example is Pearson's chi-squared test for counts in categories. For observed counts O1,…,OkO_1, \dots, O_k and expected counts E1,…,EkE_1, \dots, E_k under H0H_0, Pearson's statistic is χ2=∑i=1k(Oi−Ei)2Ei.\chi^2 = \sum_{i=1}^{k} \frac{(O_i - E_i)^2}{E_i}. One rejects H0H_0 when χ2\chi^2 is large.

Remarks

In the goodness-of-fit test, H0H_0 fixes the probabilities of the kk categories. For a large sample, χ2\chi^2 has approximately the law χk−12\chi^2_{k - 1} under H0H_0. In the test of independence for an r×cr \times c contingency table, H0H_0 states that the two categorical variables are independent. Then EijE_{ij} is (row total ×\times column total) / nn, and the law is approximately χ(r−1)(c−1)2\chi^2_{(r-1)(c-1)}. The approximation is poor when expected counts are small. A common rule asks for Ei≥5E_i \ge 5 in each cell. For small tables, Fisher's exact test is an alternative. Karl Pearson introduced the test in 1900.

Explanations

L1 human

The chi-squared test compares the counts that you observe with the counts that a hypothesis predicts. If the squared differences, scaled by the predictions, add up to a large number, the hypothesis does not fit the data.

What this node needs for W2
  • edge defines in: at least one definition (0 of 1)
  • edge instance_of in: at least two examples (0 of 2)
  • edge not_instance_of in: at least one non-example (0 of 1)
  • edge specializes both: the more general notions and the special cases (0 of 1)

The writing levels say how complete the text of a node is. They do not measure its truth.

Sources

  1. Web https://en.wikipedia.org/wiki/Chi-squared_test, Pearson's chi-squared test
  2. Web https://en.wikipedia.org/wiki/Chi-squared_test, Example chi-squared test for categorical data