McNemar's test
For matched pairs or repeated measures — tests whether two paired proportions differ significantly. Only discordant pairs (b and c) contribute to the test.
| Test B + | Test B − | Total | |
|---|---|---|---|
| Test A + | 95 | ||
| Test A − | 105 | ||
| Total | 85 | 115 | 200 |
a = both positive (concordant) · b = A+/B− (discordant) · c = A−/B+ (discordant) · d = both negative (concordant)
McNemar's test is used when the same subjects are measured twice (e.g., before/after, two diagnostic tests on the same patients). The test statistic uses only the discordant pairs — cells b and c — because concordant pairs (both positive or both negative) carry no information about whether the two conditions differ.
The continuity-corrected version is preferred when b + c < 25. For very small discordant counts, consider an exact binomial test (H₀: P(b) = 0.5 among discordant pairs).