Skip to main content

    Method document

    Achieved power for a relative risk

    Calculates the power of a cohort or trial comparison to detect a relative risk, from the risk in the unexposed, the relative risk, and the group sizes.

    Engine version 1.0.0 · Reviewed 3 October 2026

    https://statwisely.com/methods/power-relative-risk/

    When to use it

    • Assess a cohort study or trial with a binary outcome at the numbers exposed and unexposed.

    Not for

    • The implied exposed risk, RR × p₂, must stay below 1.

    Notation

    n1n_1
    Exposed participants; unexposed are r n₁.
    p1,p2p_1, p_2
    Proportions in the two groups.
    rr
    Allocation ratio n₂/n₁.
    pˉ\bar p
    Weighted pooled proportion, (p₁ + r p₂)/(1 + r).
    RR\mathrm{RR}
    Relative risk; p₁ = RR·p₂.

    Formulas

    Power, inverting the sample-size formula

    Power=Φ ⁣(∣p1−p2∣n1−z1−α/tails(1+1/r)pˉqˉp1q1+p2q2/r)+Itails=2 Φ ⁣(−∣p1−p2∣n1−z1−α/tails(1+1/r)pˉqˉp1q1+p2q2/r)\text{Power}=\Phi\!\left(\frac{|p_1-p_2|\sqrt{n_1}-z_{1-\alpha/\text{tails}}\sqrt{(1+1/r)\bar p\bar q}}{\sqrt{p_1q_1+p_2q_2/r}}\right)+I_{\text{tails}=2}\,\Phi\!\left(\frac{-|p_1-p_2|\sqrt{n_1}-z_{1-\alpha/\text{tails}}\sqrt{(1+1/r)\bar p\bar q}}{\sqrt{p_1q_1+p_2q_2/r}}\right)

    p₁ is the exposed risk implied by the relative risk. The Fleiss formula without continuity correction, as the relative-risk calculator uses [2].

    Parameters

    Number exposedn1n_1

    Values: Integer, at least 2

    Exposed participants; the unexposed follow from the allocation ratio.

    Allocation ratiorrOptional

    Values: Positive; 1 for equal groups

    Unexposed per exposed participant.

    Risk in the unexposedp2p_2

    Values: Between 0 and 1

    Outcome risk without the exposure.

    Relative riskRR\mathrm{RR}

    Values: Positive, not 1, with RR × p₂ below 1

    The smallest relative risk worth detecting.

    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

    • Participants are independent and followed for the same period in both groups [1].
    • One-sided tests use the upper rejection tail. Two-sided tests split α equally between both tails.

    Worked examples

    A worked input set

    With 100 exposed and 100 unexposed, a risk of 0.15 in the unexposed, and RR = 2 at α = 0.05: p₁ = 0.30.

    Needed for analysis: 100 · To approach: 200

    Open this example in the calculator

    Validation

    • Power is the relative-risk 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 a relative risk. Method document, engine version 1.0.0, reviewed 2026-10-03. https://statwisely.com/methods/power-relative-risk/

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

    References

    1. 1.Lwanga SK, Lemeshow S. Sample Size Determination in Health Studies: A Practical Manual. Geneva: World Health Organization; 1991.
    2. 2.Fleiss JL, Levin B, Paik MC. Statistical Methods for Rates and Proportions. 3rd ed. Hoboken, NJ: John Wiley & Sons; 2003.