St · Statistics & Probability

How to Determine Sample Size for a Normal Mean

Published By the 9to5Science editorial team

At a glance

  1. 1. Choose the goal

    Decide whether you need a confidence interval with a target margin of error or a hypothesis test with specified power.

  2. 2. Specify the inputs

    For a mean estimate, set the confidence level, margin of error, and population standard deviation or a defensible estimate.

  3. 3. Calculate the size

    Use the z-based formula for a mean and round the result up to the next whole observation.

  4. 4. Check the assumptions

    Confirm observations are independent and account for an unknown standard deviation or finite population when needed.

Title: How to Determine Sample Size for a Normal Mean Category: statistics

Determining a sample size requires a goal: estimating a population mean to a chosen precision is different from detecting a difference in a hypothesis test. The most common normal-distribution calculation is the first one. It uses the confidence level, desired margin of error, and population standard deviation.

Sample size for estimating a mean

Suppose you will collect nn independent observations from a population with mean μ\mu and known standard deviation σ\sigma. For independent observations from the same population with finite variance, the sample mean has standard error exactly σ/n\sigma/\sqrt{n}. If the population is normal, the sample mean is normally distributed; for a nonnormal population, its distribution is approximately normal for a sufficiently large sample under suitable conditions by the central limit theorem.

For a normal population, a two-sided confidence interval with confidence level 1−α1-\alpha has margin of error

E=z1−α/2σn,E = z_{1-\alpha/2}\frac{\sigma}{\sqrt{n}},

where z1−α/2z_{1-\alpha/2} is the corresponding standard normal quantile. For a sufficiently large sample from a nonnormal population, this is an approximate interval under suitable conditions. Solving for nn gives

n=(z1−α/2σE)2.n = \left(\frac{z_{1-\alpha/2}\sigma}{E}\right)^2.

Round this result up to the next whole number. Rounding down could make the actual margin of error larger than the one you requested.

Common critical values are 1.6451.645 for a 90% two-sided confidence interval, 1.961.96 for 95%, and approximately 2.5762.576 for 99%. The value of EE is the margin of error on either side of the estimate, not the full width of the interval.

Worked example

Suppose a measurement has a known population standard deviation of 1212 units. You want a 95% confidence interval for the population mean with a margin of error no greater than 33 units.

Use z0.975=1.96z_{0.975}=1.96, σ=12\sigma=12, and E=3E=3:

n=(1.96(12)3)2=7.842=61.4656.\begin{aligned} n &= \left(\frac{1.96(12)}{3}\right)^2 \\ &= 7.84^2 \\ &= 61.4656. \end{aligned}

Round up: you need 62 observations. With 62 observations, the planned margin of error is approximately 1.96(12/62)=2.991.96(12/\sqrt{62})=2.99 units, which is just under 3. With 61 observations it would be slightly over 3.

What if the standard deviation is unknown?

In practice, the population standard deviation is often not known before data collection. Use a credible estimate, usually from a prior study, historical data, or a pilot sample, in place of σ\sigma. The resulting sample size is a planning estimate; if the actual variability is greater, the achieved margin of error will also be greater.

When the standard deviation is estimated from the same sample, a confidence interval for the mean generally uses a Student’s tt critical value rather than a normal zz value. For a proposed sample size nn, its margin of error is t1−α/2,n−1s/nt_{1-\alpha/2,n-1}s/\sqrt{n}. Since the critical value depends on nn, you may need to try integer sample sizes until the planned margin of error meets your target. For small samples, this is more appropriate than simply treating an estimated standard deviation as known. A pilot estimate can also be uncertain, so allow for that uncertainty when it matters.

If the goal is a hypothesis test

A test needs a different set of inputs: significance level, desired power, variability, and the smallest difference δ\delta worth detecting. For a two-sided one-sample test of a mean, a common normal approximation is

n≈((z1−α/2+z1−β)σδ)2,n \approx \left(\frac{(z_{1-\alpha/2}+z_{1-\beta})\sigma}{\delta}\right)^2,

where 1−β1-\beta is the desired power. For example, with a 5% significance level, 80% power, σ=12\sigma=12, and a target difference of 66 units, use z0.975=1.96z_{0.975}=1.96 and z0.80≈0.842z_{0.80}\approx0.842:

n≈((1.96+0.842)(12)6)2≈31.4.n \approx \left(\frac{(1.96+0.842)(12)}{6}\right)^2 \approx 31.4.

This approximation suggests 32 observations. An exact calculation may differ, particularly for small samples or when using a tt test. For a two-group comparison, paired design, or a one-sided test, use the formula for that specific design rather than applying this one unchanged.

Finite populations and practical adjustments

The basic formula assumes sampling from a very large population, or sampling with replacement. If you sample by simple random sampling without replacement from a finite population of size NN, a finite-population correction can reduce the required sample size. Starting with the large-population result n0n_0, one common adjustment is

nfinite=n01+(n0−1)/N.n_{\text{finite}} = \frac{n_0}{1+(n_0-1)/N}.

Round up after applying the adjustment. This correction is relevant when the sample is a substantial fraction of the population; it does not fix biased selection or dependent observations.

If some selected participants may not provide usable data, increase the number invited. For an expected response fraction rr, a simple planning adjustment is to invite about n/rn/r people to obtain nn completed observations. Use a realistic response-rate estimate, and do not confuse the number invited with the number analyzed.

Common mistakes

  • Using the standard deviation as the standard error. The standard error is σ/n\sigma/\sqrt{n}; it changes with sample size.
  • Rounding to the nearest integer. Always round the required sample size up.
  • Using the wrong margin of error. If you want a total interval width of 6 units, set E=3E=3, not 6.
  • Ignoring the study design. Clustering, repeated measurements, unequal sampling probabilities, and nonresponse can change the required sample size.
  • Treating normality as the only requirement. The formula also relies on a suitable sampling process and independent observations. A large sample does not remove bias from a poor design.

Before collecting data, state whether your target is precision or power, and record the assumptions used for the calculation. That makes the resulting sample-size choice interpretable and easier to revise if those assumptions change.

References

  1. Sampling Techniques, 3rd Edition — William G. Cochran
  2. Statistical Inference — George Casella and Roger L. Berger

Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.