Skip to content
Lesson 7 of 10 · Introductory Statistics

Confidence intervals

Build and interpret confidence intervals for a proportion and a mean, and plan the sample size needed for a target margin of error.

24 min

A single sample gives one estimate, such as x̄ or p̂. A confidence interval adds a plausible range:

estimate ± margin of error, with margin of error = (critical value) × (standard error)

Confidence levelz*
90%1.645
95%1.96
99%2.576

*p̂ ± z √[p̂(1 − p̂)/n]**, valid when n p̂ and n(1 − p̂) are both at least 10.

When σ is unknown (nearly always) use the sample SD s and the t distribution, which is a little wider than normal for small samples:

*x̄ ± t · s/√n**, with n − 1 degrees of freedom.

df915192429large
t* (95%)2.2622.1312.0932.0642.0451.96

"We are 95% confident" means the method captures the true value in 95% of all samples. This sample's interval either contains the parameter or does not. It is not a 95% probability that the parameter lies in this particular interval.

Higher confidence gives a wider interval. A larger n gives a narrower one. More variable data gives a wider one.

In a poll of 1,000 voters, 540 support a measure. Give a 95% confidence interval for the true proportion.

  1. 1

    p̂ = 540/1000 = 0.54; conditions: 540 and 460 are both at least 10

    Check the large-sample condition.

1/4

A sample of 16 batteries has mean life 52 hours and s = 8. Give a 95% confidence interval for the mean life.

  1. 1

    n = 16, df = 15, t* = 2.131

    Look up the critical value.

1/4
Try it

At n = 1000, p̂ = 0.5 the margin is about 3.1 points, which is why polls of about 1,000 people quote ±3%. Quadruple n and the margin halves. Move p̂ toward 0.05: the margin shrinks, but p̂ = 0.5 is the worst case.

1000
0.50

95% margin of error

—

How large a sample ensures a 95% margin of error of at most 3 percentage points for a proportion, whatever its value?

  1. 1

    Use the worst case p̂ = 0.5

    p(1 − p) is largest at 0.5.

1/4
  • A confidence interval is estimate ± critical value × standard error.
  • Use z for proportions and t with n − 1 df for means with unknown σ.
  • 95% confidence describes the method over many samples, not this one interval.
  • Width grows with confidence and variability, and shrinks with n.
  • Round sample sizes up.
Check yourself

Practice.

1Numeric answer

Poll: 400 of 1000 say yes. Margin of error for 95% confidence, in percentage points (1 decimal).

2Numeric answer

x̄ = 50, s = 10, n = 100, use z* = 1.96. Upper bound of the 95% interval (2 decimals).

3Multiple choice

Which change makes a confidence interval wider?

  • Aa larger sample
  • Blower confidence level
  • Chigher confidence level
  • Dless variable data
4Multiple choice

A 95% CI for a mean is (47.7, 56.3). The correct reading is:

  • A95% of individuals lie in this range
  • BThere is a 95% probability the mean is in this interval
  • CThe method captures the true mean in 95% of samples
  • DThe sample mean is between 47.7 and 56.3 with probability 0.95
5Numeric answer

Minimum sample size for a 95% margin of error of ±2 points (p̂ = 0.5).

Practise this lesson, not just read it

In BiliMind the questions above are marked when you answer, the flashcards come back on a schedule, and the rest of Introductory Statistics is planned around your week. Free.