Sample size
- Concept
How many people are needed to detect the effect that matters with the accepted risk of error. It is calculated before the study starts.
What it is
A sample size calculation estimates how many participants a study needs to detect a clinically relevant difference at a given α and power. Its ingredients are α, power (1 − β), the effect size to detect, the variability (or the expected proportion in the control group) and the expected losses. A study that is too small cannot answer its question, and one that is too large exposes more people than needed.
Key facts
- Two proportions (approximation): n per group = (zα/2 + zβ)² × [p1(1 − p1) + p2(1 − p2)] / (p1 − p2)².
- Two means (approximation): n per group = 2 × (zα/2 + zβ)² × SD² / difference².
- With two-sided α = 0.05 (z = 1.96) and 80% power (z ≈ 0.84), (1.96 + 0.84)² = 7.84.
Worked example
- Data: a trial expects to cut reinfection from 20% (control) to 10% (treatment); two-sided α = 0.05 and 80% power.
- Variances: 0.20 × 0.80 = 0.16 and 0.10 × 0.90 = 0.09; sum = 0.25.
- Difference = 0.20 − 0.10 = 0.10; squared = 0.01.
- n per group = 7.84 × 0.25 / 0.01 = 196.
- If 10% losses are expected: 196 / 0.90 = 217.8, rounded up to 218 per group.
- If the expected effect were smaller (20% vs 15%): 7.84 × (0.16 + 0.1275) / 0.0025 ≈ 902 per group.
- Reading: halving the difference sought multiplies the sample size by more than 4 (approximation with a simple formula).
Markers
- n
- α
- 1 − β
- SD
Common pitfalls
- Picking the expected effect so the sample comes out small, instead of using the smallest clinically important effect.
- Forgetting to adjust for losses or non-adherence.
- Calculating the sample size after the study has finished.
Test yourself
Think of the answer, then tap the question to see it.
What inputs are needed to calculate a trial’s sample size?
α, the desired power, the smallest relevant effect, the variability (SD or control proportion) and the expected losses.
Which input changes the sample size most?
The effect size: n varies with its inverse square, so halving it multiplies n by about 4.
How does n change when power goes from 80% to 90%?
It increases: more people are needed to lower the chance of a false negative.
If the calculation gives 300 per group and 25% losses are expected, how many should be enrolled?
300 / 0.75 = 400 per group.
Connections
Educational content on epidemiological and statistical methods; the examples use made-up numbers to teach the calculation. Not a clinical or legal guide: current Colombian rules are in the official sources.
Sources: Sample sizes required (NIST/SEMATECH e-Handbook of Statistical Methods, National Institute of Standards and Technology, 2012); What are statistical tests? (NIST/SEMATECH e-Handbook of Statistical Methods, National Institute of Standards and Technology, 2012).
Spotted a mistake?We are always improving for the community. Tell us what is wrong and our team will review it.Report a mistake
Representative model, for educational purposes only.
