Born in a brewery
In the early 1900s, the Guinness brewery in Dublin hired Oxford-trained chemists to put barley and hop quality on a scientific footing. One of them, William Sealy Gosset, noticed that with only a handful of samples, using the normal distribution underestimated the error. Guinness barred employees from publishing under their own names to protect trade secrets, so in 1908 he published as "Student," which gave us "Student's t-distribution." Ronald Fisher later generalized the work and made it a cornerstone of modern statistics.
How it works
The t statistic is the mean difference divided by its standard error. It measures how big a difference is relative to the spread within the samples (the standard deviation). With few degrees of freedom the t-distribution has heavy tails, so you need a larger t to reach significance. As samples grow, it approaches the normal curve. There are three standard versions:
- One-sample t-test: compares one group's mean with a reference value.
- Independent-samples t-test: compares two separate groups.
- Paired t-test: compares before-and-after values for the same people.
When the two groups have unequal variances, Welch's t-test (Bernard Welch, 1947) is safer. It's now R's default.
Assumptions and interpretation
The test assumes roughly normal data and independent observations. With about 30 or more per group, the central limit theorem makes it fairly robust to non-normality. Significance is judged by the p-value, but a p-value doesn't tell you how large the difference is. Report an effect size such as Cohen's d and a confidence interval too. Running many t-tests across three or more groups inflates the Type I error rate, so use ANOVA instead. t-tests are common in website A/B tests, for example to compare average time on page.
FAQ
- What's the difference between a t-test and a z-test?
- Use a z-test when the population standard deviation is known, and a t-test when it's estimated from the sample.
- How big should my sample be?
- There's no hard minimum, but 20–30 or more per group gives stable results.
Sources reviewed: 2026-10-26
References
- Student. (1908). The probable error of a mean. Biometrika, 6(1), 1–25.
- Welch, B. L. (1947). The generalization of 'Student's' problem. Biometrika, 34, 28–35.
- Box, J. F. (1987). Guinness, Gosset, Fisher, and small samples. Statistical Science, 2(1), 45–52.
