Statistics 🔬 Confidence & Inference

Confidence Intervals

Reporting an estimate as a range — and saying honestly how much to trust it.

Intro StatisticsAP Statistics level
💡
The big idea: A single sample can only estimate a population's true value, never nail it exactly. So instead of one number, statisticians report a range — a point estimate give-or-take a margin of error — built by a recipe that lands on the truth a known fraction of the time. That fraction is the confidence level, and understanding what it really promises is the whole game.
🎯 By the end, you'll be able to
  • Write an estimate as a point estimate plus-or-minus a margin of error
  • Build a confidence interval for a mean using x-bar plus-or-minus z-star times the standard error
  • State correctly what '95% confidence' means — a property of the procedure, not a probability for one interval
  • Predict how the confidence level and the sample size n change the width of the interval
📎 You should already know
  • Mean and standard deviation
  • The normal distribution and the 68-95-99.7 rule
  • Sampling distributions and the standard error

One number is never enough

Suppose you want the average height of every adult in a city. You cannot measure everyone, so you take a sample and compute its average — say 68 inches. That sample average is a point estimate: a single best guess for the true population mean.

But a different sample would have given a slightly different number. The point estimate is almost certainly a little bit off, and reporting it alone hides that wobble. The honest move is to report a range that reflects how much the estimate could plausibly bounce around:

🔑 Estimate = point estimate plus-or-minus margin of error
A confidence interval is your point estimate surrounded by a cushion called the margin of error. The point estimate sits at the center; the margin sets how far the interval reaches on each side. A wider interval admits more uncertainty; a narrower one claims more precision.

Where the margin of error comes from

How wide should the cushion be? That depends on how much sample averages naturally vary — which is exactly the standard error, \( \text{SE} = \sigma / \sqrt{n} \), from sampling distributions. Because the sampling distribution of the mean is approximately normal, we know that most sample means land within a couple of standard errors of the truth. We turn that into an interval by stepping out a chosen number of standard errors on each side. That multiplier is the critical value \( z^{*} \):

\[ \bar{x} \;\pm\; z^{*}\,\frac{\sigma}{\sqrt{n}} \]
A confidence interval for a mean: the sample mean x-bar, plus or minus the critical value z-star times the standard error.

Which z-star to use

The critical value \( z^{*} \) is fixed by the confidence level you choose — how often you want the recipe to succeed. Larger confidence means reaching further out, so \( z^{*} \) grows:

  • 90% confidence uses \( z^{*} \approx 1.645 \)
  • 95% confidence uses \( z^{*} \approx 1.96 \)
  • 99% confidence uses \( z^{*} \approx 2.576 \)

These come from the standard normal curve: for 95%, \( z^{*} = 1.96 \) is the point that leaves 2.5% in each tail, so 95% of the area sits in the middle.

What '95% confidence' actually means

Here is the idea people most often get wrong. A 95% interval does not mean 'there is a 95% probability the true mean is inside this interval'. Once you have collected your data and computed the interval, the true mean is either in it or it is not — there is no more chance involved.

The 95% describes the procedure, not the single interval. If you repeated the whole process — take a fresh sample, build the interval — over and over, about 95% of those intervals would capture the true mean. Any one interval you actually hold is one draw from that long-run game. The simulation below lets you play the game hundreds of times and watch the capture rate settle in.

🎮 Interactive: watch intervals capture (or miss) the truth LIVE
The dashed line is the true mean, which the recipe is trying to catch. Press Draw 1 or Draw 50 to build intervals from fresh samples — green bars capture the true mean, red bars miss. Watch the running capture rate creep toward the confidence level. Then change the confidence level and the sample size n to see the bars get wider or narrower.
✨ The confidence is in the recipe, not the interval
Notice in the sim that some intervals miss entirely — and you cannot tell which of your own intervals is a 'miss' just by looking at it. That is why we say the confidence level is a property of the method: raise the level to 99% and fewer bars turn red, but each bar also gets wider. Higher confidence and a tighter interval pull against each other — you buy reliability with width.

What makes an interval wider or narrower

The half-width of the interval is the margin of error, \( z^{*}\,\sigma/\sqrt{n} \). Two knobs move it:

  • Confidence level — more confidence means a bigger \( z^{*} \), so the interval gets wider. Demanding to be right more often forces you to cast a bigger net.
  • Sample size n — because of the \( \sqrt{n} \), more data shrinks the standard error, so the interval gets narrower. But it is a square-root law: cutting the width in half takes four times the data.

To get a tighter interval without giving up confidence, the honest lever is collecting more data.

\[ \text{margin of error} = z^{*}\,\frac{\sigma}{\sqrt{n}} \]
The margin of error grows with the critical value z-star and shrinks with the square root of the sample size n.
📝 Worked example: A sample of n = 25 adults has a mean height of x-bar = 68 inches. Assume the population standard deviation is sigma = 3 inches. Build a 95% confidence interval for the true mean height, and say what it means.
  1. Standard error: \( \text{SE} = \sigma/\sqrt{n} = 3/\sqrt{25} = 3/5 = 0.6 \) inches.
  2. Critical value for 95% confidence: \( z^{*} = 1.96 \).
  3. Margin of error: \( 1.96 \times 0.6 = 1.176 \), which rounds to about 1.18 inches.
  4. Interval: \( 68 \pm 1.18 \), i.e. from about 66.8 to 69.2 inches.
✓ The 95% confidence interval is roughly (66.8, 69.2) inches. Interpreted honestly: the method used to build this interval captures the true mean height about 95% of the time in repeated sampling — not that there is a 95% chance the true mean lies in this one interval.

Check your understanding

1. You compute a 95% confidence interval of (66.8, 69.2) inches. Which statement is the correct interpretation?
The 95% is a property of the procedure over many repetitions, not a probability about this one fixed interval, and not a statement about individual people's heights.
2. A sample gives x-bar = 100 with population sigma = 15 and n = 36. Using z-star = 1.96, the 95% confidence interval is closest to…
SE = 15/sqrt(36) = 15/6 = 2.5. Margin = 1.96 x 2.5 = 4.9. So the interval is 100 plus-or-minus 4.9 = (95.1, 104.9).
3. Keeping the same sample, you switch from a 90% interval to a 99% interval. The interval becomes…
Higher confidence uses a larger critical value z-star (1.645 up to 2.576), so the margin of error, and the interval, get wider.
4. You want a narrower 95% interval WITHOUT lowering the confidence level. The most direct way is to…
The margin of error is z-star times sigma/sqrt(n). With z-star fixed at the 95% value, a larger n shrinks the standard error and narrows the interval.
✅ Key takeaways
  • A confidence interval reports an estimate as a range: a point estimate plus or minus a margin of error.
  • For a mean, the interval is x-bar plus-or-minus z-star times the standard error sigma/sqrt(n).
  • The critical value z-star is set by the confidence level (about 1.645, 1.96, 2.576 for 90%, 95%, 99%).
  • '95% confidence' is a property of the procedure: repeated over many samples, about 95% of the intervals capture the true value — it is NOT a 95% probability for any single interval.
  • Higher confidence widens the interval; a larger sample size n narrows it, but only with the square root of n.