McNemar Critical Value & Test Statistic Calculator
What Is the McNemar Test?
The McNemar test is a non-parametric procedure for comparing paired binary outcomes. Quinn McNemar introduced it in 1947 to test whether the marginal probabilities of two related dichotomous variables are the same — the formal name for this property is marginal homogeneity.
The most common applications involve repeated measurements on the same participants (a before-after design) or matched pairs where one member receives a treatment and the other serves as the control. In medical research it appears frequently in diagnostic accuracy studies, clinical trials, and vaccine efficacy comparisons.
Key insight: Only the discordant cells matter. Pairs that produce the same outcome under both conditions (concordant pairs) contribute no information about whether change occurred. If b = c, there is no evidence of systematic change regardless of how large a and d are.
McNemar Chi-Square Critical Value Table (df = 1)
The McNemar statistic follows a chi-square distribution with df = 1 when b + c ≥ 25. These critical values apply for both two-tailed and one-tailed interpretations at the listed α levels.
df = 1 for all standard McNemar tests. Reject H₀ if your computed χ² ≥ the critical value at your chosen α. Values derived from the chi-square distribution using standard statistical tables.
The McNemar 2×2 Contingency Table
Arrange matched-pair data into a 2×2 table before applying the formula. The rows represent the first measurement (Time 1 or Case); the columns represent the second (Time 2 or Control).
+/+ concordant
+/− discordant
−/+ discordant
−/− concordant
Discordant pairs. These are the only cells that determine the test statistic. b counts pairs that changed from positive to negative; c counts pairs that changed from negative to positive.
Concordant pairs. These subjects showed no change between conditions. They do not appear in the McNemar formula — only in the total N for descriptive reporting.
McNemar Test Formula
Two versions of the formula exist. The uncorrected version is used when b + c ≥ 25 and you prefer maximum statistical power. The version with Edwards' continuity correction gives a slightly more conservative result and is recommended when discordant counts are moderate.
Which formula to use?
When b + c ≥ 25, the standard chi-square approximation is accurate. When b + c < 25, skip the chi-square formula entirely and compute an exact binomial p-value or consult the exact critical region table below. The continuity correction is a middle-ground option for 10 ≤ b + c < 25.
Exact McNemar Test — Critical Regions for Small Samples
When total discordant pairs nd = b + c < 25, use the binomial exact test. The table below shows the critical value c* such that the two-tailed p-value < 0.05: reject H₀ if min(b,c) ≤ c*. For other α levels, use the exact calculator above.
| n_d (b+c) | c* at α=0.05 | c* at α=0.01 | Recommendation |
|---|
c* = maximum value of min(b,c) for which two-tailed p < α. Reject H₀ if min(b,c) ≤ c*. Values computed from the exact binomial distribution with p = 0.5 under H₀. "—" indicates that no rejection is possible at that α for that n_d.
Worked Example: Vaccine Efficacy Before-After Study
Scenario: A researcher tests whether a new vaccine reduces seropositive status in 200 matched patients. Each patient is tested before and after receiving the vaccine. The results are arranged in a 2×2 table.
Raw Data — 2×2 Table
b = 30 patients who were positive before but negative after (apparent positive change). c = 10 patients who were negative before but positive after (apparent negative change). Discordant total n_d = b + c = 40.
Solution — Step by Step
| Step | Action | Result |
|---|---|---|
| 1 | State H₀ and H₁ | H₀: b = c in population; H₁: b ≠ c; α = 0.05 |
| 2 | Identify discordant cells | b = 30, c = 10, n_d = 40 ≥ 25 → chi-square approx. valid |
| 3 | Compute McNemar χ² | χ² = (30−10)² / (30+10) = 400/40 = 10.000 |
| 4 | Look up χ²crit | α = 0.05, df = 1 → χ²crit = 3.841 |
| 5 | Compare χ² vs χ²crit | 10.000 > 3.841 → Reject H₀ ✓ |
Interpretation
With χ²(1) = 10.00, p < 0.01, the difference between discordant pairs is statistically significant. More patients changed from positive to negative (b = 30) than from negative to positive (c = 10), providing evidence that the vaccine altered seropositive status. This conclusion applies only to the discordant pairs; the concordant pairs (a = 40, d = 120) confirm that many participants did not change status at all, which is expected.
Applied Examples Across Research Fields
The McNemar test appears across medical, behavioral, and social science research wherever binary outcomes are measured on the same subjects or matched pairs.
Clinical Trials: Treatment Responders
150 patients with hypertension are classified as controlled (Yes/No) before and after a new medication. b = 45 patients moved from uncontrolled to controlled; c = 12 moved from controlled to uncontrolled. χ² = (45−12)²/(45+12) = 19.11. At α = 0.05, χ²crit = 3.841. The medication produced a statistically significant change in control status.
Diagnostic Accuracy: Two Tests on the Same Patient
200 patients receive both a rapid antigen test and a PCR test for the same condition. b = 18 test positive on PCR but negative on rapid antigen; c = 6 test negative on PCR but positive on rapid antigen. n_d = 24. Since n_d < 25, use the exact binomial: with min(b,c) = 6 and n_d = 24, p ≈ 0.031 < 0.05. Significant disagreement between tests.
Psychology: Attitude Change After Intervention
120 employees complete a diversity training program. Attitudes toward inclusivity are rated as favorable/unfavorable before and after. b = 32 changed from unfavorable to favorable; c = 11 changed from favorable to unfavorable. χ² = (32−11)²/43 = 10.26, p < 0.01. Training produced a significant attitude shift.
Epidemiology: Matched Case-Control Study
In a matched case-control design, 80 pairs of cases and controls are compared for a binary exposure. b = 28 pairs where the case (but not the control) was exposed; c = 14 pairs where the control (but not the case) was exposed. χ² = (28−14)²/42 = 4.67 > 3.841. The exposure is statistically associated with case status. This mirrors standard hypothesis testing logic from the Statistics Fundamentals framework.
Decision Rule for the McNemar Test
The core decision rule applies regardless of which α level you choose or whether you use the exact or chi-square version:
If χ² ≥ χ²crit → Reject H₀ → Significant marginal difference at α
If χ² < χ²crit → Fail to reject H₀ → Insufficient evidence of a systematic difference
If min(b,c) ≤ c* → Reject H₀ → Significant at α (from exact table above)
If min(b,c) > c* → Fail to reject H₀ → Not significant at α
Assumptions of the McNemar Test
These four conditions must hold for the McNemar test to produce valid results. Unlike parametric tests, normality is not required.
Paired Observations
Each subject must be measured under both conditions, or each case must be matched to a single control. Using McNemar on independent groups is incorrect — use the chi-square test instead.
Binary Outcomes
Both measurements must be dichotomous: Yes/No, Positive/Negative, Pass/Fail, or similar two-category outcomes. For more than two categories in paired data, use Bowker's test of symmetry.
Random Sample
The pairs should come from a random sample of the population of interest. Convenience samples require care when generalizing results beyond the study group.
Independence of Pairs
Each matched pair must be independent of all other pairs. Measurements within a pair are intentionally correlated — that is the design. But the pair as a unit must not influence other pairs.
McNemar Test vs Related Statistical Tests
Choosing the right test depends on your data structure, the number of outcome categories, and whether the samples are paired or independent.
| Test | Data Type | Samples | Use When |
|---|---|---|---|
| McNemar | Binary | Paired / matched | Before-after binary outcome on same subjects |
| Chi-Square (independence) | Categorical | Independent | Two unrelated groups, nominal data |
| Bowker's Test | Nominal > 2 categories | Paired | Generalization of McNemar to k×k tables |
| Cochran's Q | Binary | Paired (> 2 conditions) | McNemar extended to 3+ repeated binary outcomes |
| Sign Test | Ordinal / binary | Paired | Counts of positive vs negative differences, no magnitude |
| Paired t-test | Continuous | Paired | Same subjects, continuous outcomes, approximate normality |
Symbol and Concept Glossary
Every symbol that appears in the McNemar test and its critical value lookup, with the most common source of confusion for each.
| Symbol | Name | Definition | Common Error |
|---|---|---|---|
| b | Discordant cell (+/−) | Count of pairs: positive at Time 1, negative at Time 2 | Confusing b with concordant cell a |
| c | Discordant cell (−/+) | Count of pairs: negative at Time 1, positive at Time 2 | Swapping b and c labels |
| nd | Total discordant pairs | n_d = b + c; determines test method (exact vs chi-square) | Using total N = a+b+c+d instead of n_d |
| χ² | McNemar test statistic | (b−c)²/(b+c); follows chi-square distribution with df = 1 | Using the chi-square approx when n_d < 25 |
| df | Degrees of freedom | Always df = 1 for standard McNemar test | Assuming df depends on sample size |
| α | Significance level | Probability of Type I error; determines which column of the table to use | Choosing α after looking at results |
| H₀ | Null hypothesis | Marginal homogeneity: P(b) = P(c) in the population | Interpreting "fail to reject" as "proved no effect" |
| c* | Exact critical region boundary | Max value of min(b,c) allowing rejection at α, from binomial table | Using chi-square critical value for small n_d |
Quick Lookup: McNemar Critical Values at All Standard Alpha Levels
All critical values below apply to the chi-square version of the McNemar test with df = 1. Because df is fixed, there is a single critical value per α level — unlike t or F tests where critical values vary by sample size.
| α Level | χ²crit (df = 1) | Common Use | Interpretation |
|---|---|---|---|
| 0.10 | 2.706 | Exploratory studies | Less strict; higher false-positive risk |
| 0.05 | 3.841 | Standard in most fields | 5% chance of Type I error under H₀ |
| 0.025 | 5.024 | One-tailed at α = 0.05 | Equivalent to two-tailed p < 0.025 |
| 0.01 | 6.635 | Medical / clinical trials | Strict standard; reduces false positives |
| 0.001 | 10.828 | Genome / large-scale studies | Very strict; guards against mass testing errors |
Sources & Further Reading
The critical values in this table are derived from the chi-square distribution with df = 1. The exact test regions use the binomial distribution with p = 0.5. Values are consistent with the following standard references:
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 — The original paper introducing this test for correlated proportions.
Agresti, A. (2013). Categorical Data Analysis (3rd ed.). Wiley. Chapter 10 covers McNemar and related tests for square contingency tables including Bowker's test and symmetry models. doi:10.1002/0471249688
Penn State STAT 504: Analysis of Discrete Data. Lesson 3: Two-Way Tables — McNemar's Test. Pennsylvania State University. online.stat.psu.edu/stat504/lesson/3/3.3 — Open-access course notes with detailed worked examples for paired categorical data.
Fagerland, M. W., Lydersen, S., & Laake, P. (2013). "The McNemar test for binary matched-pairs data: mid-p and asymptotic are better than exact conditional." BMC Medical Research Methodology, 13, 91. doi:10.1186/1471-2288-13-91 — Peer-reviewed comparison of exact vs approximation approaches.
UCLA Statistical Methods and Data Analytics. McNemar's Test in SPSS, R, and Stata. University of California, Los Angeles. stats.oarc.ucla.edu — Annotated software tutorials with dataset examples for the McNemar test.
WHO (2023). Handbook of Statistical Methods for Vaccine Efficacy Studies. World Health Organization. who.int — Covers the McNemar framework in clinical trial and vaccine efficacy contexts where paired binary outcomes are common.
Related Statistical Tables & Resources
Understanding What the McNemar Table Tells You
Why df Is Always 1
The McNemar test reduces the 2×2 table to a single comparison: do b and c differ beyond chance? That single question corresponds to df = 1, regardless of total sample size. This stands apart from the chi-square test of independence, where df = (rows−1)(columns−1) and grows with table dimensions.
Statistical Power and Discordant Pairs
Power in the McNemar test depends on the number of discordant pairs, not the total N. A study with N = 500 but only 15 discordant pairs has less power than a study with N = 60 and 40 discordant pairs. Increasing concordant pairs does not increase power. See statistical power for details on planning sample size.
Marginal Homogeneity vs Symmetry
The McNemar test checks whether the row margins equal the column margins — specifically, whether P(row positive) = P(column positive). Full symmetry (a = d and b = c) implies marginal homogeneity, but marginal homogeneity does not require full symmetry. For the complete symmetry test, use Bowker's method. The study design section from Statistics Fundamentals covers paired design considerations in depth.