Sample size for comparing two groups
Participants needed per group for two proportions or two means.
Inputs
4 of 6Outcome type
Proportions: %; means: the difference to detect.
% or units
% or units
Alpha (two-sided)
Power
%
When to use
- Planning a two-arm study.
Pearls and pitfalls
- Inflate for expected dropout.
- Unequal allocation and noninferiority designs need other formulas.
Why use
Shows exactly how each assumption drives the number.
Proportions: n = [z₁₋α/₂ √(2p̄q̄) + z₁₋β √(p₁q₁ + p₂q₂)]² ÷ (p₁ − p₂)². Means: n = 2σ²(z₁₋α/₂ + z₁₋β)² ÷ Δ²