What is a confidence interval?

A confidence interval (CI) is a range of plausible values for a population quantity, calculated from a sample.

Here, we estimate a population mean using our sample mean.

The interval shows the uncertainty in that estimate.

Our example: weight before treatment

Prewt records weight before treatment in a sample of 72 patients with anorexia.

  • Sample mean = 82.41 lb
  • Standard error (SE) = 0.61 lb

We use the SE to describe uncertainty in our estimate of the population mean.

Together: Calculate the mean, SD and sample size for Prewt in the anorexia data. Then calculate the SE: SD / √n.

Start at the sample mean

We use a normal reference curve to show distances from our estimate.

Normal reference curve centred at the sample mean, 82.41 pounds. No area is shaded.

The curve illustrates sampling uncertainty, rather than the distribution of individual weights.

Extend one SE in each direction

The middle 68.3% of the normal reference curve lies within ±1 SE.

The same normal reference curve with the middle 68.3 percent shaded, between m minus one SE and m plus one SE.

Mean ± 1 SE is too narrow for a 95% confidence interval.

Extend two SEs in each direction

The middle 95.4% lies within ±2 SE.

The same normal reference curve with the middle 95.4 percent shaded, between m minus two SE and m plus two SE.

Mean ± 2 SE is a useful approximation to a 95% confidence interval.

Use 1.96 SE for 95%

The cutoffs −1.96 and +1.96 enclose approximately 95% of a normal curve.

The normal reference curve with the middle 95 percent shaded between m minus 1.96 SE and m plus 1.96 SE, leaving 2.5 percent in each tail.

Together: Use 1.96 to calculate the Prewt CI bounds: lower = mean − 1.96 × SE; upper = mean + 1.96 × SE.

The 95% CI for our weight example

The same curve, now labelled with our mean and confidence limits.

The same normal reference curve with 95 percent shaded. The lower bound is 81.21 pounds, the mean is 82.41 pounds, and the upper bound is 83.61 pounds.

82.41 ± 1.96 × 0.61 → approximate 95% CI: [81.21, 83.61] lb.

How do we read a CI?

We estimate the population mean weight before treatment to be 82.41 lb, with a 95% CI from 81.21 to 83.61 lb.

This interval describes uncertainty about the population mean. It does not say where 95% of individual weights lie.

Your turn: Postwt

Calculate the approximate 95% CI for the population mean Postwt.

  1. Calculate the Postwt mean, SD, and sample size.
  2. Calculate its SE.
  3. Multiply the SE by 1.96.
  4. Subtract and add the margin to get the bounds.
  5. Write one sentence interpreting the result.

What does your interval describe? How does the CI of Postwt compare to the CI of Prewt?