Inference for Means
Inference for means uses sample data to draw conclusions about an unknown population mean μ. The key tool is the t-distribution, which accounts for the extra uncertainty of estimating the standard deviation from the same sample. Applies whenever you want to estimate or test a claim about an average — heights, test scores, drug effects, manufacturing tolerances. Foundational work by W.S. Gosset ("Student") in 1908.
When σ is known, the standardized sample mean follows a standard normal distribution. When σ is unknown and replaced by s, the denominator becomes random, fattening the tails — the result is the t-distribution. Every confidence interval and test for a mean has the same skeleton: estimate ± (critical value) × (standard error), where the standard error of the mean is .
Formal Statement
Let be a random sample from a population with mean μ and standard deviation σ. The sample mean is
Derivation hint: The sample mean is simply the arithmetic average of the observations — the sum divided by the count. Its expected value and standard deviation (the standard error) are
Derivation hint: Use linearity of expectation for the mean; for the SE, use assuming independence, then take the square root.
Symbols: = sample mean (random variable); = the i-th observation; n = sample size; μ = population mean; σ = population standard deviation; SE = standard error.
If the population is normally distributed (or n is large), then when σ is unknown and estimated by the sample standard deviation s, the standardized statistic
Derivation hint: Replace σ in the z-score by the estimator s; the ratio of a standard normal to an independent scaled chi random variable defines the t-distribution. follows Student's t-distribution with degrees of freedom, where the sample standard deviation is
Derivation hint: This is the unbiased estimator of σ²; dividing by n−1 (Bessel's correction) compensates for using in place of the true μ, which "uses up" one degree of freedom.
A level C confidence interval for μ (when σ is unknown) is
Derivation hint: Invert the probability statement and solve the inequality for μ, treating and s as fixed. where is the critical value cutting off area in each tail of the t-distribution with n − 1 degrees of freedom. The quantity is the margin of error.
To test the null hypothesis , compute the test statistic
Derivation hint: This is the t-statistic of equation [3] evaluated under the assumption that the true mean equals the hypothesized value . The p-value is the probability, computed from the distribution, of obtaining a statistic at least as extreme as the observed t in the direction(s) specified by the alternative hypothesis .
Why It Holds / Derivation
Step 1. Start from the known-σ case. If the population is normal, then exactly, so the z-score is standard normal .
Step 2. In practice σ is unknown. We substitute the random estimator s. Now the denominator varies from sample to sample — sometimes s underestimates σ, producing unusually large statistics.
Step 3. This extra variability fattens the tails: the statistic is more likely to land far from zero than a normal variable would be.
Step 4. Formally, can be written as , where and are independent. This ratio is precisely the definition of a t-distribution with n − 1 degrees of freedom.
Step 5. As n → ∞, s converges to σ (law of large numbers), the chi-square term concentrates at 1, and the t-distribution converges to the standard normal. Hence for large n the two procedures nearly coincide. ∎
∎Gosset was a chemist and mathematician employed by the Guinness brewery in Dublin. Working with small samples of barley, hops, and yeast, he needed a way to make reliable inferences when only a handful of measurements were available — exactly the situation where the normal approximation fails. He derived the t-distribution in 1908. Because Guinness forbade employees from publishing (to protect trade secrets), he wrote under the pseudonym "Student", and the distribution has carried that name ever since. R.A. Fisher later supplied the rigorous mathematical foundation and the geometric interpretation in terms of degrees of freedom.
Building Intuition
Think of estimating μ as throwing a ring (the confidence interval) at a fixed peg (the true mean). The ring is centered at your sample mean , and its radius is the margin of error. With a 95% procedure, 95% of all possible rings you might throw would land over the peg — but for any single ring you don't know whether yours is one of them. Why is the t-ring wider than the z-ring? Because you also had to guess the radius from the same throw. When you estimate σ from a small sample, you're uncertain about how wide to make the ring, and the only safe response is to make it a bit wider to compensate. The fewer observations you have, the less you trust s, the more extra width the t-critical value adds — at , for 95%, but it shrinks toward as n grows.
```svg
```
Worked Examples
Given: A sample of n = 16 batteries has mean lifetime hours and sample standard deviation hours. Find a 95% confidence interval for the true mean lifetime μ. Assume battery lives are approximately normal.
Step 1 — Degrees of freedom: .
Step 2 — Critical value: For 95% confidence with , (from a t-table).
Step 3 — Standard error:
Step 4 — Margin of error:
Step 5 — Interval:
> Answer: We are 95% confident the true mean battery life is between 39.44 and 44.56 hours.
Given: A cereal box is supposed to contain μ₀ = 350 g. A regulator samples n = 25 boxes and finds g with g. At the 5% significance level, is there evidence the mean fill is below 350 g?
Step 1 — Hypotheses: vs. (one-sided).
Step 2 — Test statistic:
Step 3 — Degrees of freedom: .
Step 4 — p-value: For with (left tail), .
Step 5 — Decision: Since , reject . > Answer: There is statistically significant evidence (, ) that the mean fill is less than 350 g. The manufacturer appears to be underfilling.
Common Misconceptions
A 95% confidence interval does not mean "there is a 95% probability that μ lies in this interval." Once computed, the interval either contains μ or it does not — there is no probability left. The 95% refers to the long-run success rate of the method: if you repeated the sampling many times, about 95% of the intervals produced would capture μ. Similarly, a p-value is not the probability that is true; it is the probability of data at least this extreme assuming is true.
The t-procedure assumes the sampling distribution of is approximately normal. Suppose you sample n = 8 incomes from a population with a few extreme billionaires — a strongly right-skewed distribution with outliers. With such a small n, the Central Limit Theorem has not "kicked in," and the single largest value can dominate both and s. The computed 95% interval may capture the true mean far less than 95% of the time, and a t-test's actual error rate can be much higher than the nominal 5%. The remedy: larger n, transforming the data, or using a method designed for skewed data.
Connections
Inference for means sits inside a web of related ideas. The validity of the sample-mean's normality rests on the Central Limit Theorem, which guarantees approximate normality of for large n regardless of population shape. When σ is known, the procedures use the Normal Distribution and a z-statistic instead of the t. Comparing two group means extends to the Two-Sample t-Test and paired t-tests, while comparing three or more means generalizes to Analysis of Variance. The complementary problem of estimating proportions is handled by Inference for Proportions, which has the same "estimate ± margin of error" skeleton but a different standard error. The general logic of , , and p-values comes from Hypothesis Testing.
Real-World Applications
Historical Development
Subtleties & Limits
Several practical questions resist clean answers. How large must n be for the t-procedure to be trustworthy with non-normal data? The classic "n ≥ 30" rule is a crude heuristic — for symmetric distributions even small n works, while for strongly skewed data even n = 50 may be inadequate. Outliers can wreck both and s; robust alternatives (trimmed means, the bootstrap, rank-based tests) trade some efficiency for resistance. There is ongoing debate over the interpretation and misuse of p-values, culminating in the American Statistical Association's 2016 statement warning against treating as automatic proof. Finally, choosing between frequentist confidence intervals and Bayesian credible intervals remains a genuine philosophical and practical fork: the latter can directly state "there is a 95% probability μ lies in this interval," but only after committing to a prior distribution.
See Also
Central Limit Theorem · Normal Distribution · Hypothesis Testing · Two-Sample t-Test · Inference for Proportions · Analysis of Variance · Sampling Distributions