Clinical Knowledge › Epidemiology and biostatistics › Statistical tests
Chi-squared and Fisher exact tests
The chi-squared (χ²) test and Fisher's exact test compare proportions, asking whether a categorical outcome is associated with a categorical exposure. The Pearson chi-squared test compares observed (O) counts in each cell of a contingency table with the counts expected (E) if there were no association: E = row total × column total ÷ grand total, and χ² = Σ (O − E)² ÷ E, with (rows − 1) × (columns − 1) degrees of freedom. Worked example: influenza in 10/100 vaccinated versus 30/100 unvaccinated adults; each expected count is 20 or 80, χ² = 12.5 on 1 df, P < 0.001, RR 0.33. The approximation needs adequate expected counts; when any expected count in a 2 × 2 table is below 5 the classic rule is to use Fisher's exact test, which calculates exact probabilities from the hypergeometric distribution. Paired binary data need McNemar's test. These tests show whether an association exists; they do not measure its size, so report a risk ratio, odds ratio or risk difference with its 95% CI.
Patient case, mechanism, investigations, management, differentials, exam pearls, flashcards and exam-style questions. Included free with every exam plan (IFOM, MCCQE, AMC, Qatar, MRCP, OET) or a Clinical Knowledge plan.Open the lesson → See plans

Key facts (preview)
- Pearson χ² = Σ (O − E)² ÷ E, where expected count E = row total × column total ÷ grand total
- Degrees of freedom = (rows − 1) × (columns − 1): a 2 × 2 table has 1 df; critical χ² at 5% is 3.84 (1 df), 5.99 (2 df), 9.49 (4 df)
- For a 2 × 2 table, χ² = N(ad − bc)² ÷ [(a + b)(c + d)(a + c)(b + d)] and equals z² from the two-proportion z test
- Assumptions: independent observations, each subject counted once, counts (not percentages), and adequate expected counts
Guideline
SAMPL guidelines for basic statistical reporting (2015), CONSORT 2025 statement and STROBE statement for observational studies (2007)
References
- Lang TA, Altman DG. Basic statistical reporting for articles published in biomedical journals: the 'Statistical Analyses and Methods in the Published Literature' or the SAMPL guidelines. Int J Nurs Stud 2015.
- Hopewell S, Chan AW, Collins GS, et al.. CONSORT 2025 statement: updated guideline for reporting randomised trials. BMJ 2025.
- von Elm E, Altman DG, Egger M, Pocock SJ, Gøtzsche PC, Vandenbroucke JP. The Strengthening the Reporting of Observational Studies in Epidemiology (STROBE) statement: guidelines for reporting observational studies. Lancet 2007.
- McHugh ML. The chi-square test of independence. Biochem Med (Zagreb) 2013.
- Campbell I. Chi-squared and Fisher-Irwin tests of two-by-two tables with small sample recommendations. Stat Med 2007.
- Kim HY. Statistical notes for clinical researchers: chi-squared test and Fisher's exact test. Restor Dent Endod 2017.
Related topics
By Dr Khalid Seidi (B.Sc., M.D.) · MedEd World Clinical Knowledge library. Original teaching content checked against current guidelines (November 2026); confirm the latest local guidance before clinical use. Not a substitute for clinical judgement.