A Confidence Interval for a Mean

A confidence interval is a range plus a confidence level. For the population mean there is a clean recipe. Centre it on the sample mean, then reach out by a multiple of the standard error:

\bar{x} \pm z\cdot \mathrm{SE}, \qquad \mathrm{SE} = \frac{\sigma}{\sqrt{n}}.

The half-width z\cdot\mathrm{SE} is the margin of error. The multiplier z comes from the standard normal — courtesy of the central limit theorem, which makes \bar{x} approximately normal — read off as a z-score. For 95\% confidence, z \approx 1.96; for 99\%, z \approx 2.58.

Two dials: confidence and sample size

The width of the interval is governed by two things. Raising the confidence raises z, so the interval grows wider — the price of being surer. Collecting more data raises n, which shrinks \mathrm{SE} = \sigma/\sqrt{n}, so the interval grows narrower. Note the \sqrt{n}: to halve the margin you must quadruple the sample.

Build the interval

The dot is the sample mean \bar{x}; the bracket spans \bar{x} \pm z\cdot\mathrm{SE} with \sigma fixed. Slide n up and the bracket tightens; switch to higher confidence and it stretches.