Confidence Intervals for Means

When we collect data from a sample, we rarely know the true mean of the entire population. A confidence interval for a mean gives us a range of plausible values for that unknown population mean, based on our sample data. Instead of saying 'the average height of students at this school is exactly 168 cm,' we say 'we are 95% confident the true average height is between 165 cm and 171 cm.' This captures our uncertainty in a mathematically precise way. Because we almost never know the population standard deviation σ in real life, we use the sample standard deviation s as an estimate. This substitution introduces extra uncertainty, which is handled by replacing the normal (z) distribution with the t-distribution — a slightly wider, bell-shaped distribution that accounts for the added variability of estimating σ. The resulting interval is called a t-interval or one-sample t-interval for a mean. Confidence intervals are one of the most powerful tools in statistics. A 95% confidence interval means that if we repeated our sampling procedure many times and built an interval each time, approximately 95% of those intervals would contain the true population mean μ. It does NOT mean there is a 95% chance μ is in any particular interval — μ is a fixed (if unknown) number, not a random variable.

Key takeaways
  • Check Conditions
  • Calculate the Sample Statistics
  • Find the Critical Value t*
  • Compute the Standard Error
  • Construct the Interval
  • Interpret the Interval

Check Conditions

Three conditions must hold before constructing a t-interval. (1) Random: the data must come from a random sample or randomized experiment, so results generalize to the population. (2) Normal/Large Sample: the population is approximately Normal, OR the sample size n ≥ 30 (by the Central Limit Theorem, the sampling distribution of x̄ is roughly Normal for large n). For n < 30, check that the data show no strong skew or outliers. (3) Independent: individual observations are independent of each other; if sampling without replacement, the sample should be at most 10% of the population.

Calculate the Sample Statistics

From your data, compute three quantities: the sample mean x̄ = (Σxᵢ)/n, the sample standard deviation s = √[Σ(xᵢ − x̄)²/(n−1)], and the sample size n. These three numbers contain all the information needed to build the interval.

Find the Critical Value t*

The critical value t depends on two things: your chosen confidence level C (commonly 90%, 95%, or 99%) and the degrees of freedom df = n − 1. Look up t in a t-table or use technology. For example, with n = 20 (df = 19) and 95% confidence, t ≈ 2.093. Notice this is larger than z = 1.96 for the normal distribution, reflecting the added uncertainty from estimating σ with s. As n increases, t approaches z because s becomes a more reliable estimate of σ.

Compute the Standard Error

The standard error of the mean is SE = s/√n. This measures how much x̄ typically varies from sample to sample. A larger sample size n reduces the standard error, making our estimate more precise. A larger s (more variable data) increases the standard error.

Construct the Interval

The t-interval is: x̄ ± t · (s/√n). The quantity t · (s/√n) is called the margin of error (ME). Compute the lower bound x̄ − ME and upper bound x̄ + ME. State your conclusion in context: 'We are C% confident that the true mean [parameter in context] is between [lower] and [upper] [units].'

Interpret the Interval

Always interpret in context. A correct interpretation of a 95% confidence interval (a, b) is: 'We are 95% confident that the true population mean μ lies between a and b.' Never say 'there is a 95% probability that μ is in this interval' — once the interval is computed, μ either is or is not inside it. The 95% refers to the long-run success rate of the procedure, not a probability about one specific interval.

The Key Equation

xˉ±t∗⋅sn\bar{x} \pm t^* \cdot \dfrac{s}{\sqrt{n}}
  • \bar{x} — Sample mean (same as data): The arithmetic average of the n sample values; our point estimate of the population mean μ.
  • t^* — Critical value (dimensionless): The t-value from the t-distribution with df = n−1 that captures the middle C% of the distribution; found in a t-table or with technology.
  • s — Sample standard deviation (same as data): Measures spread in the sample; computed as √[Σ(xᵢ−x̄)²/(n−1)], using n−1 (not n) in the denominator to get an unbiased estimate of σ.
  • n — Sample size (count): The number of observations in the sample. Larger n produces a smaller standard error and a narrower interval.
  • \dfrac{s}{\sqrt{n}} — Standard error of the mean (same as data): Estimates the standard deviation of the sampling distribution of x̄; quantifies how precisely x̄ estimates μ.

Worked Example

Problem. A nutritionist randomly selects 16 energy bars from a production line and measures their calorie content. The sample mean is x̄ = 248 calories and the sample standard deviation is s = 12 calories. Construct a 95% confidence interval for the true mean calorie content of all bars produced on this line. Assume calorie content is approximately Normally distributed.

(241.6,  254.4) calories(241.6,\; 254.4) \text{ calories}

Answer. 95% CI: (241.6, 254.4) calories

Figure
Diagram
t-Distribution and 95% Confidence Interval−t*+t*095%2.5%2.5%t-distribution, df = n − 1x̄ − t*·(s/√n)x̄x̄ + t*·(s/√n)
Origins · 1 minWilliam Sealy Gosset and how this was discovered
WS
William Sealy Gosset
1876–1937 · British

Gosset developed the t-distribution in 1908 while working as a chemist and statistician at the Guinness Brewery in Dublin. He needed to make reliable inferences about the quality of barley and hops from small samples, since large samples were expensive. His employer did not allow staff to publish under their own names, so he published his landmark paper under the pseudonym 'Student' — which is why the distribution is often called 'Student's t-distribution.' His work made rigorous statistical inference possible with small samples. Gosset never had formal training as a statistician — he studied chemistry and mathematics at Oxford. He and Karl Pearson corresponded extensively, yet Pearson initially underestimated the importance of the t-distribution, thinking sample sizes would always be large enough to use the normal distribution.

  • Sampling Distribution of x̄ — The t-interval is built on the fact that (x̄ − μ)/(s/√n) follows a t-distribution; understanding the sampling distribution of x̄ explains why this formula works.
  • Hypothesis Testing for Means — Confidence intervals and hypothesis tests are two sides of the same coin — a two-sided hypothesis test at level α rejects H₀ exactly when μ₀ falls outside the (1−α) confidence interval.
  • Confidence Intervals for Proportions — Constructing a z-interval for a proportion uses the same logic of point estimate ± margin of error, making it a natural comparison to the t-interval for means.
  • Two-Sample t-Interval — Once you master the one-sample t-interval, the two-sample t-interval extends the same ideas to compare the means of two independent groups.