McNemar's test
Also known as: McNemar chi-square test, test for correlated proportions, paired binary test, McNemar Testi
McNemar's test is a nonparametric hypothesis test that compares two paired (correlated) binary proportions, such as a yes/no measurement taken on the same subjects before and after an intervention. It was introduced by Quinn McNemar in 1947 and works on the 2×2 table of matched outcomes.
Read the full method
Sign in with a free account to read this section.
Method map
The neighbourhood of related methods — select a node to explore.
When to use it
Use it for paired binary data arranged in a 2×2 table — typically a pre/post design or a matched case-control study where each subject contributes two related yes/no observations. The data must be genuinely paired and dichotomous. A sample of at least about 20 is recommended; when the number of discordant pairs (b + c) is too small the asymptotic chi-square approximation breaks down and an exact binomial test should be used instead.
Strengths & limitations
- Correctly handles the dependence in paired binary measurements that an ordinary chi-square test would ignore.
- Simple to compute from just the two discordant cell counts of a 2×2 table.
- Has an exact binomial form for small samples, so it stays valid when discordant pairs are few.
- Restricted to two conditions and binary outcomes in a single 2×2 table.
- The asymptotic chi-square version becomes unreliable when the discordant total (b + c) is very small.
- Uses no information from the concordant pairs, so subjects who did not change do not contribute to the test.
Frequently asked
How is this different from a regular chi-square test?
The ordinary chi-square test assumes the two samples are independent. McNemar's test is built for paired data — the same subjects measured twice — and focuses only on the discordant pairs, so it accounts for the correlation that the standard test would wrongly ignore.
What if I have very few discordant pairs?
When b + c is small (roughly when the sample is below about 20 or the discordant total is tiny), the chi-square approximation is unreliable. Use the exact binomial version of the test instead, which is valid regardless of sample size.
What about three or more conditions?
McNemar's test handles exactly two paired conditions. For three or more repeated binary measurements on the same subjects, use Cochran's Q test, which is the direct multi-condition extension.
Can I report an effect size?
Yes. The odds ratio b/c summarizes the direction and magnitude of the shift between the two discordant cells, and a confidence interval can be added with an exact 2×2 procedure.
Sources
- McNemar, Q. (1947). Note on the sampling error of the difference between correlated proportions or percentages. Psychometrika, 12(2), 153–157. DOI: 10.1007/BF02295996 ↗
How to cite this page
ScholarGate. (2026, June 1). McNemar's test. ScholarGate. https://scholargate.app/en/statistics/mcnemar-test
Which method?
Set this method beside its closest kin and read them side by side — the library lays the books on the table; the choice is yours.
- Binomial TestStatistics↔ compare
- Chi-square testStatistics↔ compare
- Cochran Q TestStatistics↔ compare
- Paired t-testStatistics↔ compare
- Wilcoxon signed-rank testStatistics↔ compare