Part 14 · Module 2

Sample Size for Estimating Means and Proportions

Learn how confidence level, desired precision, variability, expected prevalence and finite populations determine sample size for estimation.

Learning outcomes

After completing this lecture, you should be able to:

  • Calculate an approximate sample size for estimating one population mean with specified precision.
  • Calculate an approximate sample size for estimating one population proportion or prevalence.
  • Explain how confidence level, margin of error, standard deviation and anticipated proportion affect sample size.
  • Apply a finite-population correction when sampling without replacement from a defined finite population.
  • Adjust the required analysable sample for anticipated nonresponse.
  • Report estimation-based sample-size assumptions in publication-ready wording.

Overview

Estimation studies seek to quantify a population characteristic with useful precision.

Common objectives include:

  • estimating mean systolic blood pressure;
  • estimating mean haemoglobin concentration;
  • estimating the prevalence of uncontrolled hypertension; and
  • estimating the proportion of patients who experience an adverse event.

For these objectives, sample size is often determined by the desired confidence-interval precision rather than statistical power for rejecting a null hypothesis.

The key planning question is:

How narrow should the confidence interval be for the estimate to support the intended clinical, research or policy decision?

Why this matters

A prevalence estimate of 30% with a 95% confidence interval from 20% to 40% may be too imprecise for service planning. The same point estimate with an interval from 27% to 33% is more informative but requires a larger sample.

Precision depends on:

  • confidence level;
  • population variability;
  • anticipated proportion;
  • sample size;
  • sampling design;
  • finite population size where relevant; and
  • missingness or nonresponse.

A sample-size formula cannot determine the clinically acceptable margin of error. Investigators must choose it based on the decision the estimate will inform.

Estimating one population mean

For an approximate two-sided confidence interval for a population mean:

The required sample increases:

  • with the square of the standard deviation;
  • with higher confidence levels; and
  • as the desired margin of error becomes smaller.

The formula uses a normal approximation and a known planning standard deviation. Software may iterate using a t distribution for smaller samples. Established sample-size texts provide exact and design-specific extensions when the approximation is insufficient [1], [2].

Choosing the planning standard deviation

Possible sources include:

  • a closely comparable published study;
  • a high-quality registry;
  • an internal historical dataset;
  • a pilot study;
  • a range or interquartile range converted under explicit assumptions; or
  • a conservative value from several plausible scenarios.

The standard deviation should come from the same outcome definition, unit, population and measurement process where possible.

A standard error reported in a previous study must not be entered as the standard deviation.

Worked example: estimating a mean

Estimating one population proportion

For a simple random sample and a large-sample confidence-interval approximation:

A margin of error of 5 percentage points is entered as d=0.05d=0.05.

The term p(1−p)p(1-p) is largest at p=0.50p=0.50. When no credible planning estimate exists, using 0.50 gives the largest sample under this approximation.

This formula is based on an approximate interval. The final analysis should use a confidence-interval method with suitable coverage, such as a Wilson interval, rather than relying automatically on the Wald interval [3].

Worked example: estimating a proportion

Finite-population correction

When sampling without replacement from a defined finite population, and the planned sample is a substantial fraction of that population, a finite-population correction can reduce the required sample.

If the hypertension register contains exactly 1,000 eligible patients and n0=323n_0=323:

nFPC=3231+3221000=244.33n_{\mathrm{FPC}} = \frac{323} { 1+\dfrac{322}{1000} } = 244.33

Round upward to 245 observed participants.

With 10% nonresponse:

245/0.90=272.22245/0.90=272.22

Recruit 273 participants.

Finite-population methods arise from sampling without replacement from a defined frame [4].

The correction is appropriate only when:

  • the target population is the stated finite list;
  • sampling is without replacement;
  • the frame is sufficiently complete; and
  • inference is restricted to that finite population.

Do not use a finite-population correction merely because a local register exists if the scientific target is a continuing or wider population.

Sensitivity analysis

Precision assumptions for prevalence estimation

simulated data

Table 1. Required observed sample for a 95% confidence interval

Anticipated prevalenceMargin of errorRequired sample
30%3 percentage points897
30%5 percentage points323
30%7 percentage points165
50%5 percentage points385

(Calculations for the sample sizes in this sensitivity table are not shown here; they use the proportion formula presented above.)

Note: Independent simple random sampling, large-population approximation and no nonresponse adjustment.

The desired precision has a large effect because sample size varies with 1/d21/d^2.

Reducing the margin of error from 5 to 3 percentage points increases the sample by much more than 5/3.

Complex sampling

The simple formulas do not account for:

  • cluster sampling;
  • stratification;
  • unequal selection probabilities;
  • repeated measurements;
  • weighting;
  • multi-stage designs; or
  • anticipated nonresponse that varies across subgroups.

A design effect may be used to inflate a simple-random-sample calculation, but it must be justified from the actual design. Part XIV, Module 7 develops these adjustments.

Multiple estimates

A survey may have several important estimates.

Possible strategies include:

  • designate one primary estimate;
  • calculate the requirement for each key estimate and use the largest;
  • allocate precision requirements across important subgroups;
  • ensure sufficient numbers within rare categories; and
  • use simulation for complex survey objectives.

A single overall sample may estimate a common outcome precisely while giving poor precision within a small subgroup. Study-design guidance therefore recommends linking the required precision to the actual primary and subgroup objectives rather than relying on one generic sample [5].

Assurance of achieving a target width MMed extension

The simple formulas target an expected or approximate margin of error using fixed planning parameters.

In practice, the observed standard deviation or proportion is random, so the realised confidence-interval width is also random.

An assurance-based design can require a specified probability that the final interval will be no wider than the target. Such calculations are often larger and require assumptions about uncertainty in nuisance parameters.

Suggested reporting

Common mistakes

Knowledge check

What determines the sample size for estimating one mean?

Answer and reasoning

The main inputs are confidence level, desired margin of error and planning standard deviation, together with design and response adjustments.

Why does using p = 0.50 give a conservative proportion sample under the basic formula?

Answer and reasoning

The quantity p(1−p)p(1-p) reaches its maximum at 0.50. Therefore, it produces the largest sample for a fixed confidence level and margin of error.

When is a finite-population correction appropriate?

Answer and reasoning

It is appropriate when sampling without replacement from a defined finite target population and the sample is a substantial fraction of that population.

Why is a desired margin of error a clinical or policy decision?

Answer and reasoning

The formula cannot decide how much uncertainty is acceptable for the intended use. Investigators must specify how precise the estimate must be to inform the decision.

Why may a study achieve a wider interval than planned?

Answer and reasoning

The actual variability, proportion, response rate and design effect may differ from planning assumptions. The interval width is therefore not fixed in advance.

Key take-home messages

References

  1. Machin D, Campbell MJ, Tan SB, Tan SH. Sample sizes for clinical, laboratory and epidemiology studies. 4th ed. Hoboken (NJ): Wiley; 2018. https://doi.org/10.1002/9781118874905
  2. Chow SC, Shao J, Wang H, Lokhnygina Y. Sample size calculations in clinical research. 3rd ed. Boca Raton (FL): CRC Press; 2018.
  3. Wilson EB. Probable inference, the law of succession, and statistical inference. J Am Stat Assoc. 1927;22(158):209–212. https://doi.org/10.1080/01621459.1927.10502953
  4. Cochran WG. Sampling techniques. 3rd ed. New York: Wiley; 1977.
  5. Browner WS, Newman TB, Cummings SR, Grady DG, Huang AJ, Kanaya AM, et al. Designing clinical research. 5th ed. Philadelphia: Wolters Kluwer; 2022.

These notes support learning and research planning and do not replace statistical consultation for a specific study.

Report an error in this lecture