Method document
Achieved power for the McNemar test
Calculates the normal-approximation power of McNemar’s test for a yes/no outcome measured twice on the same people, or on matched pairs, from the two discordant proportions.
https://statwisely.com/methods/power-mcnemar/
When to use it
- Assess a before-and-after or matched comparison of a binary outcome, such as two diagnostic tests on the same patients.
Not for
- With very few discordant pairs expected, the normal approximation is poor; an exact McNemar test is safer.
Notation
- Number of pairs.
- Shares of pairs that change one way and the other.
- Total discordance, p₁₀ + p₀₁.
- Difference, |p₁₀ − p₀₁|.
Formulas
Power, inverting the sample-size formula
z₁₋α/tails is the standard-normal critical value.
Parameters
Number of pairs
Values: Integer, at least 2
Complete pairs available for analysis.
Discordant proportion p₁₀
Values: Between 0 and 1
Share of pairs that change from yes to no.
Discordant proportion p₀₁
Values: Between 0 and 1; p₁₀ + p₀₁ ≤ 1
Share of pairs that change from no to yes.
Significance level
Values: Between 0 and 1
The type I error rate for the specified test.
Test direction
Values: 1 or 2
One-sided tests use the upper rejection tail. Two-sided tests split α equally between both tails.
Assumptions
- Pairs are independent and enough discordant pairs are expected for the normal approximation [1].
- One-sided tests use the upper rejection tail. Two-sided tests split α equally between both tails.
Worked examples
A worked input set
For 100 pairs with discordant proportions 0.25 and 0.10 at α = 0.05: f = 0.35, d = 0.15, so d√n = 1.5 against z√f = 1.16.
Sample size: 100
Open this example in the calculatorValidation
- Power is the McNemar sample-size formula solved for z_β, with the far tail added for a two-sided test. At the size that calculator returns it reaches the target, one fewer falls short, and it agrees with an independent calculation in R.
How to cite
StatWisely. Achieved power for the McNemar test. Method document, engine version 1.0.0, reviewed 2026-10-03. https://statwisely.com/methods/power-mcnemar/
Cite the original references for the formulas your design uses as well.
References
- 1.Connor RJ. Sample size for testing differences in proportions for the paired-sample design. Biometrics. 1987;43(1):207–211.