—
0 of 0 intervals captured the true mean (μ = 50). Aiming for 95%.
μ = 50

Each horizontal bar is one 95% CI from one sample. Green = it captured the true mean; red = it missed. The black line is the true μ.

Experiments to try

Each sample here is drawn from a population with true mean 50 and standard deviation 10, and the intervals use the known-σ formula x̄ ± z × 10/√n.

  1. Watch the capture rate settle. At n = 20 and 95%, click Draw 50 a few times, then Draw 500. Early on the capture rate jumps around (90%, 98%…); after several hundred intervals it settles close to 95%.
  2. Width depends only on n and the level. Every interval has the same width here, about 8.77 at n = 20 and 95%. Move the slider to n = 80: the width halves to about 4.38, because it shrinks with √n. The capture rate stays near 95%.
  3. Buy confidence with width. Switch to 99% at n = 20. The intervals widen to about 11.5 and only about 1 in 100 misses. Switch to 90% and about 1 in 10 misses.
  4. Look at the misses. The red intervals are not “wrong calculations”; they come from samples whose mean happened to land far from 50. Nothing in a single interval tells you whether it is one of the misses, which is why a 95% interval is a statement about the method, not about one interval.

Guide: What a Confidence Interval Really Means

Not quite — and this simulator shows why. The true mean is fixed; each interval either contains it or doesn't. "95% confidence" describes the long-run success rate of the method: if you repeated the sampling many times, about 95% of the intervals you build would capture the true mean. That's exactly the capture rate you watch converge here.

By chance, some samples land unusually far from the population mean, so their intervals — centred on that unlucky sample mean — sit entirely to one side of μ. With a 95% level, about 1 in 20 intervals will miss. Raise the level to 99% and fewer miss, but the intervals get wider.

The intervals get narrower (the standard error σ/√n shrinks), so each estimate is more precise — but the capture rate stays around the confidence level. Bigger n buys precision, not a higher chance of capture. See SD vs standard error.

Related Tools

Confidence Interval Calculator CI Guide CLT Simulator More interactive tools