Skip to main content

    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.

    Engine version 1.0.0 · Reviewed 3 October 2026

    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

    nn
    Number of pairs.
    p10,p01p_{10}, p_{01}
    Shares of pairs that change one way and the other.
    ff
    Total discordance, p₁₀ + p₀₁.
    dd
    Difference, |p₁₀ − p₀₁|.

    Formulas

    Power, inverting the sample-size formula

    Power=Φ ⁣(dn−z1−α/tailsff−d2)+Itails=2 Φ ⁣(−dn−z1−α/tailsff−d2)\text{Power}=\Phi\!\left(\frac{d\sqrt n-z_{1-\alpha/\text{tails}}\sqrt f}{\sqrt{f-d^2}}\right)+I_{\text{tails}=2}\,\Phi\!\left(\frac{-d\sqrt n-z_{1-\alpha/\text{tails}}\sqrt f}{\sqrt{f-d^2}}\right)

    z₁₋α/tails is the standard-normal critical value.

    Parameters

    Number of pairsnn

    Values: Integer, at least 2

    Complete pairs available for analysis.

    Discordant proportion p₁₀p10p_{10}

    Values: Between 0 and 1

    Share of pairs that change from yes to no.

    Discordant proportion p₀₁p01p_{01}

    Values: Between 0 and 1; p₁₀ + p₀₁ ≤ 1

    Share of pairs that change from no to yes.

    Significance levelα\alpha

    Values: Between 0 and 1

    The type I error rate for the specified test.

    Test directionss

    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 calculator

    Validation

    • 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. 1.Connor RJ. Sample size for testing differences in proportions for the paired-sample design. Biometrics. 1987;43(1):207–211.