Statistics & Probability
Advanced

Margin of Error

Half-width of a confidence interval for the mean.

Formula

E=zσnE = z\frac{\sigma}{\sqrt{n}}

Variables

zCritical value
\sigmaStd dev
nSample size

Example

Larger samples shrink the margin

How it works

This formula gives the sampling uncertainty in a sample mean when the population standard deviation is known or well-estimated. It works because the mean of repeated samples varies with standard error \(\sigma/\sqrt{n}\), and multiplying by the critical value \(z\) scales that typical spread to the chosen confidence level, producing the half-width of the interval around the sample mean. In other words, it tells you how far above and below the estimate you should extend to capture the true mean with the desired confidence. When \(n\) increases, the denominator grows and the uncertainty in the mean shrinks; when you choose a larger confidence level, \(z\) increases and the interval widens.

When to use it

Use this when building a confidence interval for a population mean in settings like quality control, survey analysis, or lab measurements, especially when the population standard deviation is known or the normal approximation is appropriate. It is the go-to expression for the margin of error attached to a mean estimate.

Worked example, step by step

A manufacturer samples \(n = 64\) light bulbs and knows the population standard deviation is \(\sigma = 12\) hours. For a 95% confidence level, use \(z = 1.96\). Compute the standard error: \(\sigma/\sqrt{n} = 12/\sqrt{64} = 12/8 = 1.5\). Multiply by the critical value: \(E = 1.96 \times 1.5 = 2.94\). So the margin of error is \(E = 2.94\) hours, meaning the confidence interval for the mean is the sample mean \(\pm 2.94\) hours.

Common mistakes to avoid

  • Using the sample standard deviation \(s\) here without checking whether a z-interval is appropriate
  • Forgetting to divide by \(\sqrt{n}\) and using \(n\) instead
  • Interpreting the margin of error as the standard deviation of individual observations rather than the uncertainty in the mean

Did You Know?

The margin of error shrinks only with the square root of sample size, so quadrupling a poll halves its error.

Share this formula

Reviewed & maintained by the FormulaWon editorial teamLast reviewed September 2026