Skip to main content

    Method document

    Achieved power for a common odds ratio across strata (Cochran–Mantel–Haenszel)

    Calculates the power of a Cochran–Mantel–Haenszel test, comparing cases and controls within strata, from the total number of participants, the common odds ratio, and each stratum’s exposure among controls and share of the sample.

    Engine version 1.0.0 · Reviewed 3 October 2026

    https://statwisely.com/methods/power-cmh/

    When to use it

    • Assess a stratified case-control study, or a multi-centre comparison of a binary outcome, at the numbers available.

    Not for

    • Odds ratios that differ markedly between strata; the test assumes one common odds ratio.

    Notation

    NN
    Total number of cases and controls
    θ\theta
    Common odds ratio; in stratum i, p₁ᵢ = θp₂ᵢ/(1 − p₂ᵢ + θp₂ᵢ).
    ti, sit_i,\ s_i
    Stratum i’s share of the sample, and the share of cases within it (0.5 here)

    Formulas

    Power of the CMH test

    Power=Φ ⁣((∣∑iNwi(p1i−p2i)∣−12)/N−z1−α/tails∑iwiφi∑iwi[(1−si)p1i(1−p1i)+sip2i(1−p2i)]),wi=tisi(1−si), φi=pˉi(1−pˉi)+(p1i−p2i)2si(1−si)Nti−1\text{Power}=\Phi\!\left(\frac{\left(\left|\sum_i N w_i(p_{1i}-p_{2i})\right| - \tfrac12\right)/\sqrt{N} - z_{1-\alpha/\text{tails}}\sqrt{\sum_i w_i\varphi_i}}{\sqrt{\sum_i w_i\left[(1-s_i)p_{1i}(1-p_{1i}) + s_i p_{2i}(1-p_{2i})\right]}}\right), \quad w_i = t_i s_i(1-s_i),\ \varphi_i = \bar p_i(1-\bar p_i) + \frac{(p_{1i}-p_{2i})^2 s_i(1-s_i)}{N t_i - 1}

    Woolson, Bean and Rojas’s statistic with its continuity correction, the half count; φᵢ is each stratum’s variance under no association at the finite stratum size [1].

    Parameters

    Total sample sizeNN

    Values: Integer, at least 2

    Cases and controls together, over all strata.

    Common odds ratioθ\theta

    Values: Positive, not 1

    The odds ratio assumed in every stratum.

    Exposure among controls, by stratump2ip_{2i}

    Values: Between 0 and 1, one per stratum

    Typed space-separated, one per stratum.

    Share of the sample in each stratumtit_iOptional

    Values: Positive, adding up to 1 or 100%

    Equal shares if left empty.

    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

    • The odds ratio is the same in every stratum, and cases and controls are sampled independently within each stratum, with as many cases as controls.
    • One-sided tests use the upper rejection tail. Two-sided tests split α equally between both tails.

    Worked examples

    A worked input set

    With 500 participants in three strata making up 50%, 30% and 20% of the sample, 20%, 30% and 40% exposure among controls, and θ = 2 at α = 0.05, two-sided: power is 93.8%.

    Sample size: 500

    Open this example in the calculator

    Validation

    • The worked example agrees with the R package samplesizeCMH, whose power.cmh.test computes the same quantity, and with an independent calculation in R. At the total the stratified odds-ratio calculator returns, power reaches the target.

    How to cite

    StatWisely. Achieved power for a common odds ratio across strata (Cochran–Mantel–Haenszel). Method document, engine version 1.0.0, reviewed 2026-10-03. https://statwisely.com/methods/power-cmh/

    Cite the original references for the formulas your design uses as well.

    References

    1. 1.Woolson RF, Bean JA, Rojas PB. Sample size for case-control studies using Cochran’s statistic. Biometrics. 1986;42(4):927–932. doi:10.2307/2531207