ScholarGate
Асистент

Chi-Squared and Fisher Exact Tests

The chi-squared test and Fisher's exact test are the two standard procedures for asking whether two categorical variables in a contingency table are associated or independent. The chi-squared test compares observed cell counts with those expected under independence using a large-sample approximation, while Fisher's exact test computes the probability of the observed table directly and is used when counts are small.

Знайти тему у PaperMindНезабаромFind papers & topics
Tools & resources
Завантажити слайди
Learn & explore
ВідеоНезабаром

Definition

The chi-squared test of association measures the discrepancy between observed and expected cell counts under the null hypothesis of independence, referring the resulting statistic to a chi-squared distribution; Fisher's exact test instead computes, from the hypergeometric distribution with the margins held fixed, the exact probability of tables as or more extreme than the one observed.

Scope

This entry covers Pearson's chi-squared statistic and its degrees of freedom, the expected-count condition that justifies the chi-squared approximation, the continuity (Yates) correction, the logic of Fisher's exact test based on the hypergeometric distribution, and the practical question of when an exact test should replace the approximation. It presents these as tests of association, not as clinical guidance, and notes that they assess whether an association exists, not how large it is.

Core questions

  • Are the two categorical variables in this table independent, or is there evidence of association?
  • How is the chi-squared statistic formed from observed and expected counts, and how many degrees of freedom does it have?
  • When are expected counts too small for the chi-squared approximation to be trusted?
  • How does Fisher's exact test avoid the large-sample approximation, and what does “conditioning on the margins” mean?

Key concepts

  • Observed versus expected counts
  • Pearson chi-squared statistic
  • Degrees of freedom (r-1)(c-1)
  • Large-sample (asymptotic) approximation
  • Expected-count rule of thumb
  • Yates continuity correction
  • Hypergeometric distribution and fixed margins
  • Exact versus asymptotic p-values

Mechanisms

Under independence, each cell's expected count is its row total times its column total divided by the grand total. Pearson's chi-squared statistic sums the squared difference between observed and expected counts divided by the expected count across all cells; for an r×c table this statistic is compared with a chi-squared distribution on (r−1)(c−1) degrees of freedom, the degrees-of-freedom result that Fisher clarified in 1922. The approximation degrades when expected counts are small, prompting a common guideline that expected counts should generally exceed about five; the Yates continuity correction was proposed to improve the 2×2 approximation. Fisher's exact test sidesteps the approximation by treating the row and column margins as fixed and computing, from the hypergeometric distribution, the exact probability of the observed table and of every more extreme table, summing them into a p-value. Because it is exact, it is preferred for sparse tables, though reviews note its conditional, conservative nature and recommend specific choices among the available tests.

Clinical relevance

Whether a study reports that an exposure is or is not associated with an outcome often rests on one of these tests, so understanding what they do — and that a small p-value signals an association but says nothing about its size — is part of appraising health research. These tests are tools for assessing evidence of association and are not a basis for individual diagnostic or treatment decisions.

Epidemiology

The chi-squared and Fisher exact tests are the default significance tests for 2×2 and larger contingency tables across epidemiology and clinical research, accompanying the risk ratios and odds ratios that quantify the same associations. The exact test is routinely invoked for small samples or rare events where the chi-squared approximation is unreliable.

History

Karl Pearson introduced the chi-squared goodness-of-fit statistic in 1900; Fisher's 1922 paper corrected the degrees of freedom for contingency tables, and Fisher later devised the exact test bearing his name for small samples. Yates proposed his continuity correction for 2×2 tables in 1934. The modern recommendation among these and related procedures has been synthesised in methodological reviews and textbooks.

Debates

Exact versus asymptotic tests for small 2×2 tables
Fisher's exact test conditions on both margins and is exact but tends to be conservative, while the uncorrected chi-squared can be anti-conservative for small samples and the Yates correction over-corrects; reviews therefore give nuanced recommendations rather than a single rule.

Key figures

  • Karl Pearson
  • Ronald A. Fisher
  • Frank Yates
  • Alan Agresti

Related topics

Seminal works

  • pearson-1900
  • fisher-1922
  • lydersen-2009

Frequently asked questions

When should Fisher's exact test be used instead of the chi-squared test?
When the table is small or sparse — typically when one or more expected cell counts are low — the chi-squared large-sample approximation can be unreliable, and Fisher's exact test, which computes an exact probability, is preferred.
Does a significant chi-squared test tell me how strong the association is?
No. These tests indicate whether there is evidence of an association; the size of the association is conveyed by a separate effect measure such as a risk ratio or odds ratio, which should be reported alongside the p-value.

Methods for this concept

Related concepts