Single proportion
Determines the sample size required to test whether a population proportion differs from a specified hypothesized or reference proportion, given a chosen significance level and statistical power.
Key takeaways
- What is calculated: Determine the smallest n at which the test of H₀ attains the specified power.
- Quantities you must supply: Reference proportion; Anticipated proportion; Significance level; Power.
- 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.
- Calculation routes: 3 are available for this design; the one selected determines the formula, the quantities requested and the result.
Methods available for Single proportion
- Normal approximation (z-based) Closed-form sample size approximating the binomial by a normal distribution. Chosen for simplicity and comparability with published tables when the expected-count conditions are satisfied.
- Normal approximation with continuity correction Normal approximation adjusted for the discreteness of the binomial distribution. Chosen as a middle course: more conservative than the plain approximation, without the iteration of the exact method.
- Exact binomial (Clopper-Pearson style) Sample size derived directly from the binomial distribution, with no normal approximation. Chosen because it makes no distributional approximation and guarantees the actual type I error does not exceed the nominal level — which the normal approximation cannot promise.
When to use
Use when the primary objective is to determine whether a population proportion differs from a specified reference or hypothesized proportion with adequate statistical power.
Sample size
Awaiting inputs
—
Set the parameters and calculate.
Methodology — Single proportion — normal approximation
Formula used Single proportion — normal approximation
- Two-sided alternative selected: α is split between both tails, so the larger quantile is used and the requirement rises
where —
- p₀
- Hypothesised reference proportion under H₀. 0 < p₀ < 1
- p₁
- Anticipated proportion under the alternative. 0 < p₁ < 1, p₁ ≠ p₀
- α
- 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
- ℓ
- Expected proportion of enrolled units lost before analysis. 0 – 0.95
Formulas for the 3 methods
| Calculation method | Formula |
|---|---|
| Normal approximation (z-based) | |
| Normal approximation with continuity correction | |
| Exact binomial (Clopper-Pearson style) |
How this method works
The binomial sampling distribution is approximated by a normal one. Because binomial variance depends on the proportion itself, the null variance p₀q₀ and the alternative variance p₁q₁ enter separately.
Two-sided test: H₀: p = p₀ against H₁: p ≠ p₀; the α-quantile is z₁₋α/₂.
Selected method — normal approximation. The binomial is approximated by a normal distribution. Because binomial variance depends on the proportion itself, the null variance p₀q₀ and the alternative variance p₁q₁ both appear.
The approximation is unreliable when any of np₀, n(1−p₀), np₁, n(1−p₁) falls below about 5. All four are reported below, and a warning is shown when the condition fails.
Null hypothesis. H₀: p = p₀
Alternative hypothesis. Two-sided H₁: p ≠ p₀. One-sided H₁: p > p₀ or p < p₀.
Calculation procedure
- State the reference proportion and the proportion you want to detect.
- Take and .
- Use the null variance under and the alternative variance under rather than one pooled value.
- Evaluate .
- Round up, then inflate for dropout. Check that and both exceed about 5, or switch to the exact method.
Exact or approximate
Approximate.
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
- Closed form and reproducible by hand.
- Adequate for mid-range proportions with moderate sample sizes.
Limitations
- Unreliable for extreme proportions or small n.
- Ignores the discreteness of the binomial, so the true type I error differs from nominal.
Assumptions
- Observations are independent Bernoulli trials with constant probability.
- Expected counts are large enough for the normal approximation to hold.
- Simple random sampling with no clustering.
Applicable adjustments
Supports dropout inflation and, where the sampling framework applies, the finite population correction.
Conclusion
Adequate for mid-range proportions with moderate sample sizes. Check the four expected counts reported with the result; if any falls below about five, switch to the exact binomial method.
References
- Fleiss JL, Levin B, Paik MC. Statistical Methods for Rates and Proportions. 3rd ed. Hoboken: Wiley; 2003.
- Clopper CJ, Pearson ES. The use of confidence or fiducial limits illustrated in the case of the binomial. Biometrika. 1934;26(4):404–413. Link
- Chow S-C, Shao J, Wang H, Lokhnygina Y. Sample Size Calculations in Clinical Research. 3rd ed. Boca Raton: Chapman & Hall/CRC; 2017.