Chi-square test: observed counts, expected counts and contributions

Which cells contribute to the discrepancy between observations and the hypothesis?

An experiment from Cyril Voyant’s course, running in your browser. Full course and slides (French) · Choose another experiment.

The relationship to understand

χ²=Σ(O−E)²/E. Fair die: E=N/6, 5 degrees of freedom. Independence in a 2×2 table: Eij=RiCj/N, 1 degree of freedom.

Try it and interpret

For 120 throws of a fair die, expect 20 occurrences of each face. Change one face and inspect its contribution. The second example uses the course table 75/25 and 65/35: p≈0.1228 without continuity correction.

Assumptions and limitations

Independent observations, mutually exclusive categories and actual counts. The p-value is asymptotic; small expected counts require particular care and suspend the automatic conclusion here. Failure to reject does not demonstrate fairness or independence.

Go further with the course

This page focuses on one concept. The full chapter (French) contains the reasoning, further examples, slides and FAQ. Demonstration values are computed or constructed within the stated model; they are not new research findings.