Learn / Biostatistics / Sample size and power
Calculating sample size for means, proportions and events
15 minute read · 6-question quiz
What you will learn
Calculate per-arm sample size for comparing two means and two proportions
Calculate the sample size for estimating a single proportion with a given precision
Estimate the number of events needed for a survival trial
These formulas are for a two-sided test with equal-sized groups. Software (Stata, R, G*Power, PASS) gives the same answers; understanding the formula lets you check the output and explain it to a committee.
Let z_(1-α/2) be the normal value for the significance level (1.96 for α = 0.05) and z_(1-β) for power (0.84 for 80%, 1.28 for 90%).
Other outcomes
- Counts / rates: use the Poisson formula or software, based on the expected rate in controls and the rate ratio.
- Correlation, regression, diagnostic accuracy each have their own formulas; for diagnostic studies, sample size depends on the expected sensitivity and the required CI width.
- Several primary outcomes: use the largest required n, or adjust α.
Summary
Two means: n = 2σ²(z + z)²/Δ² per arm; 5 mmHg with SD 15 needs 142 per arm for 80% power.
Two proportions: use the pooled-variance formula; absolute differences at low baseline rates need large trials.
A prevalence survey needs n = 1.96² p(1 − p)/d²; use p = 0.5 when unknown (385 for ±5%).
Survival trials are driven by events: d = 4(z + z)²/(ln HR)².
Check your understanding
Draft study guide. Spotted an error or something unclear? Tell us at hello@scintria.com. This is educational material, not clinical or regulatory advice.