James's Math Hub
Statistics & Probability

Lesson 11 / 13 · 12 min read

Confidence Intervals

Estimating a parameter with a margin of error — and what 'confidence' really means.

The idea

A single sample mean is a point estimate — almost certainly a little off. A confidence interval instead gives a range of plausible values for the parameter, together with a stated level of confidence.

Every confidence interval has the same shape

estimate±margin of error\text{estimate} \pm \text{margin of error} margin of error=(critical value)×(standard error)\text{margin of error} = (\text{critical value}) \times (\text{standard error})

Confidence interval for a mean

When σ\sigma is known (or nn is large):

xˉ±zσn\bar{x} \pm z^{*}\, \frac{\sigma}{\sqrt{n}}

The critical value zz^{*} depends on the confidence level:

Confidencezz^{*}
90%1.645
95%1.96
99%2.576

Worked example

A sample of n=100n = 100 has xˉ=50\bar{x} = 50, with σ=8\sigma = 8. A 95% confidence interval:

50±1.968100=50±1.96(0.8)=50±1.56850 \pm 1.96 \cdot \frac{8}{\sqrt{100}} = 50 \pm 1.96(0.8) = 50 \pm 1.568

The interval is (48.43, 51.57)(48.43,\ 51.57). We're 95% confident the true mean lies in this range.

What "95% confident" actually means

  • Correct: if we repeated the whole sampling process many times, about 95%95\% of the intervals we built would contain the true μ\mu.
  • Wrong: "there's a 95%95\% probability that μ\mu is in this interval." The parameter μ\mu is fixed; the interval is the random thing.

The trade-offs

  • Higher confidence → larger zz^{*}wider interval (more sure, less precise).
  • Larger nn → smaller standard error → narrower interval.
  • To halve the margin of error, you need four times the sample size.

Key takeaways

  • Confidence interval == estimate ±\pm (critical value)(standard error).
  • For a mean: xˉ±zσ/n\bar{x} \pm z^{*}\,\sigma/\sqrt{n}, with z=1.96z^{*} = 1.96 for 95%.
  • "95% confident" describes the long-run method, not one specific interval.
  • More confidence widens the interval; more data narrows it.