← Back to Statistics

Confidence intervals for means

For averages, the interval uses the t distribution because the population standard deviation is estimated from the data.

The one-sample t interval

For a population mean, \(\bar{x} \pm t^*\frac{s}{\sqrt{n}}\), where \(t^*\) comes from the t distribution with \(n - 1\) degrees of freedom. Because \(t^*\) is larger than \(z^*\) for small samples, intervals are wider, honestly reflecting the extra uncertainty from estimating \(\sigma\).

\bar{x} \pm t^*\frac{s}{\sqrt{n}}

Worked example

A sample of 25 lightbulbs has \(\bar{x} = 1200\) hours and \(s = 100\). With 24 degrees of freedom, \(t^* \approx 2.064\) for 95% confidence. The margin is \(2.064 \cdot \frac{100}{5} \approx 41\), giving an interval of about 1159 to 1241 hours.

Conditions for t procedures

Random sample, independent observations, and a roughly normal sampling distribution. For small samples (under about 15), the data should look roughly symmetric without outliers. For moderate samples, mild skew is fine. For large samples (30 or more), the central limit theorem usually makes t procedures reliable.

Intervals for a difference in means

To compare two independent groups, use \((\bar{x}_1 - \bar{x}_2) \pm t^*\sqrt{\frac{s_1^2}{n_1} + \frac{s_2^2}{n_2}}\). If the interval for a treatment minus control difference is entirely above 0, the data suggest the treatment increases the mean. For paired data, build a one-sample interval for the mean difference.

Interpreting in context

A good interpretation names the parameter, the interval, the units, and the confidence level: 'We are 95% confident that the mean lifetime of this brand's bulbs is between 1159 and 1241 hours.' Avoid saying that 95% of individual bulbs fall in the interval; the interval is about the mean, not individual values.

Prediction intervals versus confidence intervals

A confidence interval estimates a mean; a prediction interval predicts a single new observation and is much wider, because individuals vary far more than averages do. Engineers designing for the worst case need prediction or tolerance intervals, not confidence intervals for the mean.

Robustness and alternatives

t procedures are fairly robust to non-normality in moderate and large samples but are sensitive to outliers. For skewed data or outliers, consider a transformation, a median-based method, or bootstrap intervals, which resample the data many times to estimate the sampling distribution directly.

Common mistakes

Using \(z^*\) instead of \(t^*\) when \(\sigma\) is unknown. Interpreting the interval as covering individual values. Treating paired data as independent groups. Ignoring outliers in small samples.

Key takeaways

Mean intervals use \(\bar{x} \pm t^* s/\sqrt{n}\) with \(n - 1\) degrees of freedom. Check randomness, independence, and shape. Compare groups with two-sample or paired intervals. Interpret in context, and distinguish confidence intervals from prediction intervals.

Flashcard

\bar{x} \pm t^* \frac{s}{\sqrt{n}}

One-sample t interval

For a population mean.

Check your understanding

A 95% CI for mean commute time is (24, 31) minutes. Which statement is correct?

← Previous lesson Next lesson →