Section 1.9

Confidence Intervals

A single estimate — "the average is 102" — pretends to a precision it doesn't have. A confidence interval is more honest: instead of one number, it reports a range of plausible values, like "somewhere between 99 and 105." But the phrase "95% confident" trips almost everyone up. Let's pin down what it actually means.

From estimate to interval

Recall that a sample mean has a sampling distribution with a known spread (the standard error). A confidence interval just wraps a margin around the estimate:

estimate ± (critical value) × (standard error)

Pick a higher confidence level and the critical value grows, so the interval gets wider — you trade precision for a better chance of being right. The playground makes that trade-off, and the real meaning of "95%," impossible to miss.

🎮 Confidence Interval Coverage

The dashed line is the true mean (normally unknown — here we cheat and show it). Each horizontal bar is one study's interval. Green bars caught the truth; red ones missed.

Intervals built0
Captured the truth0
Capture rate
Target95%

What "95% confident" really means

Keep drawing studies and watch the capture rate settle near your chosen level. That is the meaning of confidence:

"95% confidence" is a statement about the procedure, not about any single interval. If you repeated the study endlessly, about 95% of the intervals you'd build would contain the true value. Any one interval either contains it or doesn't — there's no "95% probability" hiding inside a single result.

This is why the red bars matter. At 95% confidence, roughly 1 interval in 20 misses entirely — and that's not a bug, it's the advertised failure rate. Switch to 99% and misses become rare, but every interval gets wider (less precise). Switch to 90% and intervals tighten, but you miss more often.

What changes the width

  • Confidence level ↑ → wider. More certainty demands more room.
  • Sample size ↑ → narrower. More data shrinks the standard error, so the margin shrinks. Slide n up and watch the bars tighten around the truth.

Why it matters: confidence intervals are how good science reports uncertainty — not a false-precision point estimate, but a range plus a stated reliability. They're also two sides of the same coin as hypothesis tests, which come next.