A range, not a single number
A sample gives a point estimate, but it’s almost never exactly right. A confidence interval gives a range that likely contains the true value:
point estimate ± margin of error
The formula
estimate ± (critical value) × (standard error)
| Confidence level | Critical value z* |
|---|---|
| 90% | 1.645 |
| 95% | 1.96 |
| 99% | 2.576 |
Confidence interval for a proportion
p̂ ± z* √[p̂(1 − p̂)/n]
Example: 520 of 800 people surveyed support a park. Find a 95% CI.
- p̂ = 0.65
- SE = √(0.65 × 0.35/800) ≈ 0.01686
- Margin = 1.96 × 0.01686 ≈ 0.033
- CI: 0.617 to 0.683 (61.7% to 68.3%)
Confidence interval for a mean (σ known)
x̄ ± z* (σ/√n)
Example: A sample of 64 bags of chips has mean mass 252 g; σ = 8 g. 95% CI?
- SE = 8/8 = 1
- Margin = 1.96
- CI: 250.04 g to 253.96 g
(When σ is unknown and the sample is small, statisticians use the t-distribution, which gives slightly wider intervals.)
What "95% confidence" means
If we repeated the sampling many times, about 95% of the intervals built this way would contain the true parameter.
It does not mean "there’s a 95% probability the true value is in this particular interval": the true value is fixed; the interval either contains it or doesn’t.
Width of the interval
| Change | Effect on width |
|---|---|
| higher confidence level | wider |
| larger sample size | narrower |
| more variable data | wider |
There’s a trade-off: more confidence costs precision unless you increase n.
Choosing a sample size
For a desired margin of error E with a proportion (using p = 0.5 as a safe guess):
n = (z*/E)² × 0.25
Example: ±3% at 95%: n = (1.96/0.03)² × 0.25 ≈ 1,068.
Interpreting in context
"We are 95% confident that between 61.7% and 68.3% of all residents support the park."
Worked examples
Example 1: p̂ = 0.4, n = 600, 95%. Margin? 1.96 × √(0.24/600) ≈ 0.039.
Example 2: x̄ = 75, σ = 10, n = 25, 95%. CI? 75 ± 1.96 × 2 → 71.1 to 78.9.
Example 3: Will a 99% CI be wider or narrower than a 95% CI from the same data? Wider.
Common mistakes
- Misinterpreting the confidence level as a probability about one interval.
- Using the wrong critical value.
- Forgetting that bias isn’t fixed by a confidence interval.
Try it yourself
- 90% CI for p̂ = 0.5, n = 400?
- x̄ = 120, σ = 15, n = 225, 95% CI?
- What happens to the width if n is multiplied by 4?
- Sample size for ±2% at 95%?
Answers: 1) 0.5 ± 0.041 → 0.459 to 0.541 2) 120 ± 1.96 → 118.04 to 121.96 3) It halves. 4) about 2,401
Quick recap
- A confidence interval = point estimate ± margin of error.
- Margin = critical value × standard error.
- Higher confidence → wider; bigger sample → narrower.