Lesson 2 · 25 min
Confidence intervals and Student’s t
Only four measurements — what does the mean tell you about the true value? Student’s t gives an honest confidence interval, and shows why extra replicates soon bring diminishing returns.
In this lesson
- Calculate a confidence interval from the mean, the standard deviation and Student’s t
- Interpret a “95 % confidence interval” correctly
- Explain why small samples need t rather than 1.96
- Estimate how many replicates are needed for a given interval width
A tablet is labelled 250 mg of active ingredient, and four analyses average 247.5 mg. Is the tablet short? It depends on how far that mean might be from the truth: if the four results agree within 0.2 mg the shortfall is probably real; if they differ by 5 mg a mean 2.5 mg low could easily be luck. A confidence interval turns “how far it might be” into a number: a range around the mean that contains the true value with a stated level of confidence.
Predict first
A hundred laboratories each make 4 measurements and each compute a 95 % confidence interval. About how many of the intervals contain the true value?
Pick an answer and lock it in before you look. A wrong guess teaches more than no guess.
Student’s t distribution
If the true σ were known, the 95 % interval for the mean would be . But in the lab we only have the sample standard deviation s, and with few measurements s is itself unreliable — sometimes too small, which makes the interval too narrow. In 1908 William Gosset, a chemist at the Guinness brewery, published the fix under the pen name “Student”: replace the normal distribution with the t distribution. It is lower and wider, with heavier tails — the more so the fewer the degrees of freedom ν = n − 1 — and turns back into the normal distribution as n grows.
- the true value (population mean)
- Student’s t, set by the confidence level and the degrees of freedom
- the standard error of the mean
- degrees of freedom: n results minus the one used up by the mean
| n | t (ν = n − 1) | Half-width / s |
|---|---|---|
| 2 | 12.706 | 8.98 |
| 3 | 4.303 | 2.48 |
| 4 | 3.182 | 1.59 |
| 5 | 2.776 | 1.24 |
| 10 | 2.262 | 0.72 |
| 20 | 2.093 | 0.47 |
Going from 2 to 3 measurements shrinks the interval more than threefold; going from 10 to 20 shrinks it by only another third. That is why routine analyses usually run 3–5 replicates. You can also plan backwards: expecting s = 0.40 and wanting a 95 % half-width of 0.25 or less, solve — it takes 13 measurements.
Worked example
Carbohydrate in a glycoprotein
Five determinations of carbohydrate in a glycoprotein give 12.6 %, 11.9 %, 13.0 %, 12.7 % and 12.5 % by mass. Find the 95 % and 90 % confidence intervals.
Concept check
With s unchanged, going from 4 to 16 replicates shrinks the half-width of the 95 % confidence interval by about what factor?
Try the calculation
Five determinations of nitrate in a water sample give mg/L and mg/L. What is the half-width of the 95 % confidence interval in mg/L?
Key takeaways
- Confidence interval μ = x̄ ± t·s/√n with ν = n − 1; the 95 % t value falls from 12.706 (ν = 1) to 1.960 (ν → ∞).
- “95 %” is the method’s success rate: in the long run 95 % of intervals contain the true value.
- Small samples need t; using 1.96 makes the interval too narrow.
- The first few replicates pay most; 3–5 replicates is the usual compromise in routine analysis.
Data and references
- Student [W. S. Gosset], “The probable error of a mean”, Biometrika 6, 1–25 (1908).
- D. C. Harris, Quantitative Chemical Analysis, 9th ed., W. H. Freeman (2016), chapter 4 (confidence intervals and Student’s t).
- JCGM 100:2008, Evaluation of measurement data — Guide to the expression of uncertainty in measurement (GUM), BIPM.