Sample size for one proportion against a benchmark
Use a fixed benchmark and a different expected risk to plan a one-sample binary comparison.
Fit
When to use it, and when not to
Use it when
- You compare one population proportion with a fixed benchmark.
- You can justify a different expected proportion and the power target.
Not when
- The benchmark comes from a sampled comparison group. Use two-group sizing. Read: Sample size for comparing two proportions
- You only need an estimate with a useful interval. Use precision planning. Read: Sample size to estimate a proportion to a set precision
- You need exact-binomial inference. Match its sample size to the prespecified test. Read: Exact binomial test
Before you start
What you need
- Fixed benchmark, p1Enter the null proportion from 0 to 1.
- Expected proportion, p2Enter a different proportion from 0 to 1 for the same outcome and time horizon.
- False-positive threshold, alphaThe default is 0.05. The engine uses the two-sided normal cutoff.
- Target power, powerChoose the desired detection chance. The engine restricts the target to 0.5 through 0.999; default 0.8.
- The benchmark has no sampling uncertainty in this model.How to check: If it was estimated from controls, consider their uncertainty and comparability.
- People supply independent binary outcomes with a common probability.How to check: Use another method for clusters or repeated observations.
- The normal approximation is adequate for planning.How to check: Check the final exact test separately when outcomes are sparse.
Plain language
How it works
The engine uses the absolute gap between the benchmark and expected proportion. It weights the benchmark variance by the two-sided alpha cutoff and the expected variance by the target-power quantile. It squares their sum, divides by the squared gap, and rounds up. Allocation ratio is not used. Power uses the assumed direction’s normal tail with the two-sided cutoff; it does not add the opposite tail.
An exact binomial test evaluates observed counts without a normal approximation. Its discrete rejection rule can give different power from this sizing method. Choosing a sample-size method helps you match the planning question to the right inputs.
Worked example
A worked example
- Setting
- A service compares its response proportion with a fixed benchmark.
- Question
- What sample is needed for an expected 70% response against 50%, or 70 against 50 in 100?
- Approach
- Set p1=0.50, p2=0.70, alpha=0.05 and power=0.80.
- Result
- Mallard returns 47 total. At that total, approximate power is 80.3%.
- What it means
- The count is approximate planning for this alternative. It does not guarantee the target power for an exact binomial test.
In practice
Recent studies PubMed search · not vetted
Watch out
Common mistakes
The one to remember
The benchmark is treated as fixed and known. This is normal-approximation sizing, not exact-binomial power; sparse outcomes need a calculation matched to the final test.
- Swapping the benchmark and expected proportion.Instead: p1 supplies the null variance; p2 supplies the alternative variance. Their roles differ.
- Calling approximate power exact-binomial power.Instead: Specify the exact test and check its power separately before recruitment.
Inside Mallard
How Mallard uses this
For oneProportion, Mallard returns an approximate total and power at a chosen total. It does not return an exact-binomial p-value or exact-binomial power.
analysis.sample_size_one_proportion, the id a plan cue records.Related Learn pages
Related designs and methods
Evidence
Sources & further reading
- How to calculate sample size for different study designs in medical research? (opens in a new tab) · Indian J Psychol Med · doi 10.4103/0253-7176.116232
- Two-sided confidence intervals for the single proportion: comparison of seven methods (opens in a new tab) · Stat Med · doi 10.1002/(sici)1097-0258(19980430)17:8<857::aid-sim777>3.0.co;2-e