Sample Size Calculator

Risk ratio

Determines the sample size required to detect a specified relative risk (risk ratio) between exposed and unexposed groups in a cohort study.

Key takeaways

  • What is calculated: Determine the number of exposed and unexposed subjects at which the risk ratio can be detected with the target power.
  • Quantities you must supply: Incidence in unexposed; Risk ratio to detect; Significance level; Power; Unexposed per exposed.
  • Type of calculation: Power-based: it answers how much data is needed to detect a stated effect. Power 0.80 at α = 0.05 is the usual target; confirmatory studies use 0.90.

Method used for Risk ratio

  • Cohort study — risk ratio Two-proportion calculation parameterised by a baseline risk and the risk ratio to detect. It expresses the design in the terms a cohort study reports, while the underlying calculation remains the two-proportion comparison.

When to use

Use when the primary objective is to determine whether the risk of an outcome differs between exposed and unexposed groups, expressed as a risk ratio.

Sample size

Type I error rate.

Probability of detecting the specified effect.

A two-sided alternative splits α between both tails; a one-sided alternative places all of α in one tail, needs a smaller n, and must be pre-specified.

Set to 1 for equal group sizes.

Final n is inflated by 1/(1 − dropout).

Reset to defaults

Awaiting inputs

Set the parameters and calculate.

Methodology — Cohort study — risk ratio

Formula used Cohort study — risk ratio

n=[z1α/2(1+1/k)p¯q¯+z1βp1q1+p0q0/k]2(p1p0)2
Sample size for the exposed group; the unexposed group is k times this
p1=p0RR
Incidence in the exposed
  • z1α/2(two-sided)in place ofz1α(one-sided) Two-sided alternative selected: α is split between both tails, so the larger quantile is used and the requirement rises

where —

p₀
Cumulative incidence in the unexposed over the follow-up period. 0 – 1 exclusive
RR
Risk ratio to detect; p₀ × RR must stay below 1. > 0; must differ from 1
α
Probability of rejecting a true null hypothesis (Type I error). 0.0001 – 0.5; conventionally 0.05, or 0.025 one-sided for regulatory non-inferiority
1 − β
Probability of rejecting the null hypothesis when the specified alternative is true. 0.50 – 0.9999; conventionally 0.80 or 0.90
k
Unexposed recruited per exposed subject. 0.05 – 20
Expected proportion of enrolled units lost before analysis. 0 – 0.95

How this method works

Exposed and unexposed groups are followed forward and their cumulative incidence compared. The incidence in the exposed follows from the baseline risk and the risk ratio, after which the standard two-proportion formula applies.

Exposed and unexposed groups are followed and their incidence compared, with p₁ derived from the baseline risk and the risk ratio.

Because the calculation works on the absolute difference, a given risk ratio is far more expensive to detect at a low baseline risk. p₀ must reflect incidence over the study's actual follow-up, not a lifetime risk.

Null hypothesis. H0: RR = 1, equivalently p1 = p0.

Alternative hypothesis. Two-sided H1: RR != 1. One-sided H1: RR > 1 or RR < 1.

Calculation procedure

  1. State the incidence expected in the unexposed group, p0, and the risk ratio RR worth detecting.
  2. Convert to the exposed incidence: p1=p0×RR, which must stay below 1.
  3. Set the ratio of unexposed to exposed subjects, k, and compute the pooled proportion p¯=p1+kp01+k.
  4. Evaluate n=[z1α/2(1+1/k)p¯q¯+z1βp1q1+p0q0/k]2(p1p0)2 for the exposed group.
  5. Round each group up, then inflate for loss to follow-up. A rarer outcome in the unexposed group raises the requirement sharply.

Exact or approximate

Approximate — a normal approximation to the binomial.

The formula shown always matches what was computed: when a one-sided test is selected the rendered quantile changes from z1−α/2 to z1−α, and where several methods exist, the formula follows the method selected in the calculator.

Advantages & limitations

Advantages

  • Expressed in the effect measure a cohort study reports.
  • Handles unequal numbers of unexposed per exposed subject.
  • Reports expected case counts in both arms.

Limitations

  • A given risk ratio is far more expensive to detect at a low baseline risk, because the calculation works on the absolute difference.
  • Ignores varying person-time.
  • Unreliable when expected cases fall below about ten per arm.

Assumptions

  • Exposed and unexposed groups are independent.
  • The baseline risk applies over the actual follow-up period of the study, not a lifetime.
  • Follow-up is complete enough that cumulative incidence is estimable.
  • Expected cell counts are large enough for the normal approximation.

Applicable adjustments

Supports allocation ratio and dropout inflation.

Conclusion

Report both group sizes, the baseline risk and the risk ratio sought. Check the expected case counts: a cohort study is powered by its events, not by its enrolment.

References

  1. Woodward M. Epidemiology: Study Design and Data Analysis. 3rd ed. Boca Raton: Chapman & Hall/CRC; 2014.
  2. Fleiss JL, Levin B, Paik MC. Statistical Methods for Rates and Proportions. 3rd ed. Hoboken: Wiley; 2003.
  3. Lemeshow S, Hosmer DW, Klar J, Lwanga SK. Adequacy of Sample Size in Health Studies. Geneva: WHO/Wiley; 1990.