Ask Mallard
Study design

Sample size to estimate a proportion to a set precision

4 min read

Choose how close a proportion estimate needs to be, then plan its interval width and account for clustering.

NHMRC EVIDENCE LEVEL · 2009Outside the NHMRC hierarchy
Why this level?not one of the five research areas this hierarchy covers. NHMRC 2009 source

This 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

Before you start

What you need

Decide these first
  1. Expected proportion, pEnter a value strictly between 0 and 1.
  2. Target half-width, widthEnter a positive proportion less than 0.5. Half-width is the distance from the estimate to an interval end.
  3. Interval error probability, alphaThe default is 0.05 for a 95% planning interval.
  4. Within-cluster correlation, iccUse zero for independent people. Otherwise enter a value from zero up to, but not including, one.
  5. Number of clusters or average cluster sizeFor clustering, give clusters (whole number, at least two) or clusterSize (average, at least one), never both.
It rests on these
  1. The sample can answer the population question.How to check: A narrow interval from a convenience sample does not remove selection bias.
  2. The simple design effect is suitable.How to check: Check the correlation and cluster sizes; unequal sizes, weights and few clusters need further work.
  3. 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.

Planning scope

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.

Planning question
Three parallel sizing questions: detection of an important effect calls for power; interval width calls for precision; event and parameter counts screen model capacity. A capacity floor establishes neither power nor adequate prediction.Match the assessment to the questionDetect an important effectEstimate with a usefulintervalScreen events andparametersPower for the planneddesignAttainable precisionHistorical capacity floorA floor is not power or adequate prediction. A fixed dataset constrains all three assessments; it does notmake them interchangeable.
Conceptual diagram. It shows the structure of the idea, not data from any study.

Worked example

A worked example

Invented for illustration
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

Searching PubMed…

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.

No Mallard code example points to this page.
Atlas node design.sample_size_proportion_precision, the id a plan cue records.

Related Learn pages

Related designs and methods

Evidence

Sources & further reading

  1. 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
  2. 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
  3. Sample size estimation in epidemiologic studies (opens in a new tab) · Caspian J Intern Med
Prepared with AI assistance. PubMed titles, authors, years and DOIs checked on 2026-11-07. Record verified, confirm it supports this use. No independent professional approval is claimed. The reviews give proportion-precision planning context. Mallard’s implementation supplies the specific design-effect calculation and fixed-cluster feasibility check; these source records do not independently validate that code. For prevalence survey reporting, follow STROBE and state the sampling frame, precision target and clustering assumptions.
Last source review: 2026-11-07
AI-generated educational content
Mallard uses reputable methodological and reporting sources, but this material may contain errors or omit important context. Verify important methodological decisions with the cited sources and, when appropriate, a qualified research methodologist or statistician.