Sample size to estimate a proportion to a set precision
Choose how close a proportion estimate needs to be, then plan its interval width and account for clustering.
Why this level?
not one of the five research areas this hierarchy covers. NHMRC 2009 sourceThis page plans the precision of a descriptive proportion. A sample-size calculation does not establish an intervention evidence level; the sampling design and analysis determine what the estimate can support.
Fit
When to use it, and when not to
Use it when
- Your aim is to estimate how common a binary outcome is.
- You have a target interval half-width and a plausible expected proportion.
Not when
- You want to detect a difference against a fixed benchmark. Use one-proportion power planning. Read: Sample size for one proportion against a benchmark
- You compare two groups. Use two-proportion sizing. Read: Sample size for comparing two proportions
- Weights, unequal clusters or complex dependence drive uncertainty. Plan a design-specific analysis. Read: Complex survey analysis
Before you start
What you need
- Expected proportion, pEnter a value strictly between 0 and 1.
- Target half-width, widthEnter a positive proportion less than 0.5. Half-width is the distance from the estimate to an interval end.
- Interval error probability, alphaThe default is 0.05 for a 95% planning interval.
- Within-cluster correlation, iccUse zero for independent people. Otherwise enter a value from zero up to, but not including, one.
- Number of clusters or average cluster sizeFor clustering, give clusters (whole number, at least two) or clusterSize (average, at least one), never both.
- The sample can answer the population question.How to check: A narrow interval from a convenience sample does not remove selection bias.
- The simple design effect is suitable.How to check: Check the correlation and cluster sizes; unequal sizes, weights and few clusters need further work.
- The normal planning width is adequate.How to check: Near boundary risks need special care. Report a Wilson or Clopper-Pearson interval only for an independent single proportion.
Plain language
How it works
The engine uses a two-sided normal quantile, the expected risk variance and the squared target half-width. It multiplies the independent-sample requirement by a design effect: one plus the correlation times (average cluster size minus one). With a fixed cluster count, it solves for the total as cluster size grows. Some targets have no solution. It rounds up and retains at least one observation per fixed cluster.
The sizing route uses normal quantiles; it does not pass the optional cluster-based t setting from the lower-level module. It adds no finite-population correction or nonresponse allowance. Choosing a sample-size method helps you match the planning question to the right inputs.
Worked example
A worked example
- Setting
- A survey samples nurses from 42 units.
- Question
- How many responses target a half-width of 4 percentage points around 50%, or 50 in 100?
- Approach
- Set p=0.50, width=0.04, icc=0.03, clusters=42 and alpha=0.05.
- Result
- Mallard returns 1,020 observations with design effect 1.699. Its planned confidence-interval half-width is 4.00 percentage points.
- What it means
- This is a response target under the assumed design effect. Invitations, missing items and unequal unit sizes need separate planning.
In practice
Recent studies PubMed search · not vetted
Watch out
Common mistakes
The one to remember
This is a Wald planning width, not a final single-proportion confidence interval. It allows a simple clustering design effect, but not unequal cluster sizes, nonresponse or selection bias.
- Treating half-width as the whole interval width.Instead: Choose the distance from the estimate to one end.
- Adding people to a fixed set of clusters without limit.Instead: The target can be unattainable; more clusters may be needed.
- Calling the planned width a final Wald interval.Instead: Use an interval appropriate to the estimator and sampling design.
Inside Mallard
How Mallard uses this
For proportionPrecision, Mallard returns a total, design effect and planned half-width at a chosen total. It reports unattainable targets. Power is not calculated.
design.sample_size_proportion_precision, the id a plan cue records.Related Learn pages
Related designs and methods
Evidence
Sources & further reading
- Strengthening the Reporting of Observational Studies in Epidemiology (STROBE) statement: guidelines for reporting observational studies (opens in a new tab) · BMJ · doi 10.1136/bmj.39335.541782.AD
- 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
- Sample size estimation in epidemiologic studies (opens in a new tab) · Caspian J Intern Med