The t distribution when σ is unknown
The question
Five normal readings, σ unknown. Use the sample SD s for σ and keep 1.96: how often does x̄ ± 1.96 s/√5 catch μ?
Guess first, then draw samples and see.
- 1 SeeGuess the coverage, then tune the multiplier.
- 2 TryCompare t and normal curves.
- 3 ProveBuild the proof, line by line.
- 4 ApplyIntervals, tests and two samples.
Before you start · 3 quick checks on the standard error, the sample SD and a normal area, about 3 min
Two ideas before you start
2 ideasThe interval when σ is known
Figure: the standard normal density with the central area between −z and z shaded. It needs JavaScript.
Multiplier: z ≈ 1.960 for central area 0.95
For independent normal readings, (X̄ − μ)/(σ/√n) is standard normal. With σ known, the shaded area is the share of samples whose interval x̄ ± z σ/√n contains μ.
Exact definition
Model. \(X_1, \dots, X_n\) are independent, each normal with mean \(\mu\) and SD \(\sigma \gt 0\), and \(\bar{X} = (X_1 + \dots + X_n)/n\). Then \(Z = (\bar{X} - \mu)/(\sigma/\sqrt{n})\) is standard normal. If \(z \gt 0\) has \(P(\lvert Z\rvert \le z) = 1 - \alpha\), then
\[\begin{aligned} &P(\bar{X} - z\sigma/\sqrt{n} \le \mu \\ &\qquad \le \bar{X} + z\sigma/\sqrt{n}) \\ &= 1 - \alpha. \end{aligned}\]For \(1 - \alpha = 0.95\) the multiplier is \(z \approx 1.960\), usually written 1.96. The lesson on confidence intervals builds this interval.
Swap σ for the sample SD
Figure: five readings as dots on a number line, a dashed vertical line at the true mean, and a bar from x̄ − s to x̄ + s. It needs JavaScript.
Sample A: x̄ = 51 s = 3
Ratios: z ≈ 1.12 t ≈ 0.75
z divides x̄ − μ by the fixed σ/√n; t divides it by s/√n, which changes from sample to sample. Samples A and B have the same mean and very different t.
Exact definition
Sample SD. For \(n \ge 2\) readings, \(S^2 = \sum_i (X_i - \bar{X})^2/(n - 1)\) and \(S = \sqrt{S^2}\); for observed readings write \(s\). The lesson on the sample variance explains the divisor \(n - 1\).
The ratio with \(S\). \[T = \frac{\bar{X} - \mu}{S/\sqrt{n}}.\] It is \(Z\) with the unknown \(\sigma\) replaced by \(S\). The three samples of this card have \(n = 5\), and the card computes \(z\) and \(t\) with \(\mu = 50\) and \(\sigma = 2\), the values the simulation in 1 See uses.
Fine print: names and the model
The \(t\) distribution is also called Student's \(t\), after the pen name under which W. S. Gosset published it in 1908. "Degrees of freedom" is the name of its parameter; for one sample of \(n\) readings it is \(n - 1\).
Every exact statement on this page assumes independent readings from one normal distribution. The page does not assume that \(\mu\) or \(\sigma\) is known to the analyst; the simulations know them only so that they can score each interval.
Guess, then draw samples
- Make your guess first. The sampler opens when you check it.
- Draw samples of five readings. Each sample gives one interval; the tiles count how many contain μ.
- Move the multiplier c until about 95% of your intervals contain μ, then press Check my multiplier.
How the sampler works
Each sample has five independent readings from a normal distribution with \(\mu = 50\) and \(\sigma = 2\). The interval of a sample is \(\bar{x} \pm c\,s/\sqrt{5}\): it uses only the five readings and the multiplier \(c\), never \(\sigma\). The samples come from a fixed seed, so moving \(c\) rescores the same samples.
Two curves, far from the middle
A quick guess first. The explorer below it opens once you answer.
Explorer: the t and normal densities
Set the sample size \(n\) and a cutoff \(c\); the figure and tiles follow.
Goals
Two samples
Assumptions. Two independent groups of \(n_1\) and \(n_2\) readings, each group normal, with means \(\mu_1\) and \(\mu_2\) and the same SD \(\sigma\). Sample means \(\bar{X}_1, \bar{X}_2\), sample variances \(S_1^2, S_2^2\).
Pooled variance and ratio.
\[\begin{aligned} S_p^2 &= \bigl((n_1 - 1)S_1^2 \\ &\qquad + (n_2 - 1)S_2^2\bigr) \\ &\qquad / (n_1 + n_2 - 2), \\ T &= \frac{\bar{X}_1 - \bar{X}_2 - (\mu_1 - \mu_2)}{S_p\sqrt{1/n_1 + 1/n_2}}. \end{aligned}\]\(T\) has the \(t\) distribution with \(n_1 + n_2 - 2\) degrees of freedom, by the same argument as for one sample: a standard normal over the square root of an independent chi-square divided by its degrees of freedom.
Unequal SDs. If the two groups may have different \(\sigma\), Welch's version divides by \(\sqrt{S_1^2/n_1 + S_2^2/n_2}\) instead. Its distribution is only approximately a \(t\) distribution, with degrees of freedom estimated from the data.
Why a random scale fattens the tails
Assumptions. \(n \ge 2\), and \(X_1, \dots, X_n\) are independent, each normal with mean \(\mu\) and SD \(\sigma \gt 0\). \(\bar{X}\) is their mean and \(S\) their sample SD (divisor \(n - 1\)); \(S \gt 0\) with probability 1. Write \(Z = (\bar{X} - \mu)/(\sigma/\sqrt{n})\), \(V = S/\sigma\) and \(T = (\bar{X} - \mu)/(S/\sqrt{n})\).
Conclusion. \(T\) has the \(t\) distribution with \(n - 1\) degrees of freedom, and for every \(c \gt 0\),
\[P(\lvert T\rvert \gt c) \gt P(\lvert Z\rvert \gt c).\]So for every multiplier \(c \gt 0\) and every \(n \ge 2\), the interval \(\bar{X} \pm cS/\sqrt{n}\) contains \(\mu\) less often than \(\bar{X} \pm c\sigma/\sqrt{n}\) does.
Facts the proof uses.
- \(Z\) is standard normal: a mean of independent normal readings is normal, with SD \(\sigma/\sqrt{n}\).
- \((n - 1)V^2 = (n - 1)S^2/\sigma^2\) has the chi-square distribution with \(n - 1\) degrees of freedom, and \(S\) is independent of \(\bar{X}\), hence \(V\) is independent of \(Z\). This holds for normal readings; the lesson on chi-square, t and F builds these distributions.
- \(\operatorname{E}[S^2] = \sigma^2\), as in the lesson on the sample variance.
- Definition: if \(Z\) is standard normal, \(U\) is chi-square with \(k\) degrees of freedom and the two are independent, then \(Z/\sqrt{U/k}\) has the \(t\) distribution with \(k\) degrees of freedom.
- Jensen's inequality: if \(h\) is convex on an interval that holds the values of a random variable \(W\), and \(\operatorname{E}[W]\) and \(\operatorname{E}[h(W)]\) are finite, then \(\operatorname{E}[h(W)] \ge h(\operatorname{E}[W])\), with strict inequality when \(h\) is strictly convex and \(W\) is not constant.
- A variance is at least 0, and it is 0 only for a random variable that is constant with probability 1.
Each option is one step of the proof. Pick the one that is true for every \(n \ge 2\), every \(\mu\), every \(\sigma \gt 0\) and every \(c \gt 0\).
Problems
The explorer in 2 Try gives every \(t\) probability and multiplier you need.
Further reading
- Student, "The probable error of a mean," Biometrika 6 (1908), the paper that introduced the distribution.
- J. A. Rice, Mathematical Statistics and Data Analysis, 3rd ed. (Duxbury, 2007), chapter 6 on distributions derived from the normal and chapter 11 on comparing two samples.
- L. Wasserman, All of Statistics (Springer, 2004), chapter 10 on hypothesis testing and p-values.