Confidence Intervals: The Interval Is Random, the Parameter Is Not
Published:
The sampling distribution and the standard error
Compute \(\bar{x}\) from a sample of size \(n\). Collect another sample and you get a different \(\bar{x}\). The distribution of those values across hypothetical repetitions is the sampling distribution of the mean, and its standard deviation is the standard error:
Two things separate the standard error from the sample standard deviation \(s\), and conflating them is common. \(s\) estimates the spread of individual observations and converges to \(\sigma\), a fixed property of the population that does not shrink with more data. The standard error measures the spread of the estimate and does shrink, at rate \(1/\sqrt{n}\).
Constructing the interval
For Gaussian data the standardised mean has a known distribution that does not depend on \(\mu\) or \(\sigma\) — a pivot:
Let \(t^\star\) be the 0.975 quantile of \(t_{n-1}\). Then \(\mathbb{P}(-t^\star < T < t^\star) = 0.95\) by construction, and rearranging the inequality to isolate \(\mu\) gives
The probability statement was made before the data arrived, about the random variables \(\bar{x}\) and \(s\). Rearranging an inequality does not move randomness from one side to the other.
Worked example. A sample of \(n = 25\) response times gives \(\bar{x} = 100\) ms and \(s = 15\) ms. Then \(\mathrm{SE} = 15/\sqrt{25} = 3.0\) ms, and \(t^\star_{24} = 2.0639\), so the half-width is \(2.0639 \times 3.0 = 6.19\) and the interval is \([93.81,\ 106.19]\).
What the 95% attaches to
\(t\) or \(z\)
Use \(z = 1.96\) when \(\sigma\) is known; use \(t_{n-1}\) when you estimated it from the same data. Estimating \(\sigma\) injects extra variability — sometimes \(s\) comes out too small, which would make a \(z\)-interval too narrow — and the heavier tails of \(t\) pay for exactly that.
| \(n\) | multiplier | half-width (\(s=15\)) | interval |
|---|---|---|---|
| 25 (\(t_{24}\)) | 2.0639 | 6.19 | [93.81, 106.19] |
| 25 (\(z\), wrong here) | 1.9600 | 5.88 | [94.12, 105.88] |
| 100 (\(t_{99}\)) | 1.9842 | 2.98 | [97.02, 102.98] |
At \(n=25\) the correction is about 5%; by \(n=100\) it is under 2% and the distinction stops mattering in practice. What does not stop mattering is the assumption behind the pivot: \(T\) is exactly \(t_{n-1}\) only for Gaussian data. For other distributions the interval is justified by the central limit theorem, which needs \(n\) large enough for \(\bar{x}\) to be near-Gaussian — and heavy tails or strong skew can make “large enough” run into the hundreds. When in doubt, use the bootstrap.
The \(1/\sqrt{n}\) tax
Half-width is \(t^\star s/\sqrt{n}\), so it falls as \(1/\sqrt{n}\). Going from \(n=25\) to \(n=100\) took the half-width from 6.19 to 2.98 — a factor of 2.08, the extra fraction coming from \(t^\star\) shrinking towards 1.96 as well. Quadrupling data halves uncertainty; a further tenfold reduction would need 10,000 samples.
Recap
- Standard error \(s/\sqrt{n}\) is the spread of the estimate; \(s\) is the spread of the observations and does not shrink with \(n\).
- A CI comes from inverting a pivot — a quantity whose distribution is free of the unknown parameter.
- 95% is the coverage of the procedure over repeated samples. The endpoints are random; \(\mu\) is a fixed constant.
- Use \(t_{n-1}\) when \(\sigma\) is estimated: 2.064 at \(n=25\) versus 1.96, a 5% widening that fades by \(n \approx 100\).
- Width scales as \(1/\sqrt{n}\): four times the data for half the width.
References
- Neyman, J. Outline of a Theory of Statistical Estimation Based on the Classical Theory of Probability. Philosophical Transactions of the Royal Society A, 236, 333–380, 1937.
- Greenland, S., Senn, S. J., Rothman, K. J., Carlin, J. B., Poole, C., Goodman, S. N., & Altman, D. G. Statistical tests, P values, confidence intervals, and power: a guide to misinterpretations. European Journal of Epidemiology, 31, 337–350, 2016.
- Brown, L. D., Cai, T. T., & DasGupta, A. Interval Estimation for a Binomial Proportion. Statistical Science, 16(2), 101–133, 2001.
