TL;DR
The Student's t-distribution looks like the Gaussian bell curve but with fatter tails. It appears when you standardise an average using an estimate of the spread rather than the true spread. Because that estimate is itself noisy when the sample is small, extreme values are more likely than the Gaussian says. The one number that controls how fat the tails are is the degrees of freedom, which grows with the sample size.
Where you'll see it: in the t-test comparing two group means, in the confidence interval for a mean when the standard deviation is unknown, and in the heavy-tailed noise models of robust regression.
Intuition
Trusting a guessed ruler
Suppose you want to know the average height of a population, and you have only ten measurements. If you knew the true standard deviation , you would standardise the sample mean with and compare the result to a Gaussian. You do not know , so you estimate it from the same ten values. That estimate is itself random. Sometimes your sample happens to look tight and the estimated spread is too small. Then the standardised number is too big, and extreme results look more common than they should.
It is like measuring a table with a ruler you are not sure of. Most of the time the ruler is close enough, but occasionally it is off by a lot, and that occasional error makes big deviations more likely than a perfectly known ruler would suggest. The Student's t-distribution is the honest bell curve for this situation: it has the same shape idea, with extra probability in the tails to cover the uncertainty in the ruler.
- df = 1 (Cauchy)
- df = 3
- Gaussian
One knob: the degrees of freedom
The t-distribution has a single parameter , the degrees of freedom. Small means heavy tails. As grows, the t-distribution gets closer and closer to the standard Gaussian. With around 30 the two are almost indistinguishable for practical purposes. This matches the intuition: more data means a more reliable estimate of the spread, so the ruler becomes trustworthy.
Why it is a ratio
The t-distribution arises as the ratio of two independent quantities: a standard Gaussian in the numerator, and a scaled square root of a chi-squared variable in the denominator that measures the estimated spread. The Gaussian gives you the signal, and the chi-squared gives you the noisy ruler. Their ratio is a t-variable.
flowchart LR A[Sample of n values] --> B[Sample mean] A --> C[Sample standard deviation s] B --> D[t = mean difference divided by s over root n] C --> D D --> E[Compare with t-distribution on n minus 1 degrees of freedom]
The math
Definition
Let and let be independent of , where is the degrees of freedom. Then
follows a Student's t-distribution with degrees of freedom, written . Its density is
Here is a value of , is the gamma function (the continuous version of the factorial, see the gamma distribution), and is the degrees of freedom. The term is what produces the tails: it decays like a power of , not like the exponential of in the Gaussian.
Moments
For the mean is . For the variance is
The variance is infinite for (and undefined for ). This is the formal version of "heavy tails": extreme values are common enough that the average squared size does not settle. At even the mean fails to exist, and the distribution is the Cauchy distribution.
The limit to the Gaussian
As , the chi-squared variable concentrates at 1 by the law of large numbers, so approaches . Formally, .
The t-statistic for a sample mean
Let be independent draws from with unknown. Define the sample mean and sample variance
The sample variance uses rather than in the denominator, because has already been estimated from the same data, which uses up one degree of freedom. Then
The numerator is Gaussian. The quantity is chi-squared with degrees of freedom, and it is independent of . This independence is the key fact that makes the ratio exactly a t-variable. Gosset discovered the result in 1908 and Fisher later proved it rigorously.
Worked examples
A machine fills bottles, and ten bottles have mean volume ml with sample standard deviation ml. We want a 95 percent confidence interval for the true mean .
- Degrees of freedom: .
- From a t-table, the critical value with 2.5 percent in each tail at is .
- Standard error: .
- Margin of error: .
- Interval: , which is ml.
- Interpretation: the procedure captures the true mean 95 percent of the time over repeated samples. Using the Gaussian value instead would give a margin of , which is too narrow for ten samples.
The bottles should contain 50 ml. The same ten bottles give and . Is the mean different from 50?
- The t-statistic is .
- With , a two-sided test has -value between 0.10 and 0.20 (the table gives for 0.10 and for 0.20).
- Interpretation: 1.58 standard errors is not unusual enough to reject the target of 50 at the usual 5 percent level. The data are consistent with 50 ml, although they lean toward more.
Compare the chance that a value lies beyond .
- For the standard Gaussian, .
- For the two-sided tail probability at is about . The table gives for a two-sided probability of 0.10 and for 0.20, so sits near .
- The t-distribution puts about three times as much probability beyond . This is exactly the cost of not knowing the spread when the sample is tiny.
- With the value is about , very close to the Gaussian figure. The tails shrink quickly as the sample grows.
Tradeoffs and failure modes
The t-distribution is the right reference whenever the variance is estimated from the same data you are testing. It is the wrong reference, or at least an unnecessary one, in other cases:
| Situation | Problem | Better choice |
|---|---|---|
| The true standard deviation is known | Using t wastes power and gives intervals that are too wide | Gaussian (z) interval |
| Large samples (say, 100 or more) | t and Gaussian are nearly identical, so the extra care changes little | Either; use t for habit and safety |
| Data are clearly skewed | The t-test assumes roughly normal means, which skewed small samples may not satisfy | Bootstrap, rank tests, or a transformation |
| Outliers in the data | One outlier inflates , which can hide a real effect | Robust estimators, or a t-model with a small fit to the data |
| Comparing two groups with unequal variances | The pooled-variance t-test is wrong | Welch's t-test, which uses adjusted degrees of freedom |
Some practical warnings:
- The t-test assumes independent observations. Repeated measures on the same person need a paired test or a model for correlation.
- A large -value is not proof of no difference. It means the data are too few or too noisy to decide.
- Heavy tails are a feature for modelling, too. Robust regression sometimes replaces Gaussian noise with a t-distribution with a few degrees of freedom, so that a few wild points do not dominate the fit.
History
William Sealy Gosset worked as a chemist and statistician at the Guinness brewery in Dublin. Brewing experiments often used very few samples, such as a handful of barley batches, and the standard large-sample methods gave misleading answers for them. Gosset worked out the distribution of the standardised mean with an estimated standard deviation in the years before 1908, using a mix of hand-run sampling experiments and algebra.
He published it in 1908 in Biometrika under the pseudonym "Student", because the brewery did not want competitors to know it used statistics. The paper, The Probable Error of a Mean, gave the first version of the t-distribution. Gosset's accompanying tables were limited in range.
Ronald Fisher gave the distribution a rigorous derivation in 1925 and showed that the degrees of freedom are for a single sample. He also popularised the t-table in his influential textbook Statistical Methods for Research Workers. The distribution caught on because it solved a real problem that large-sample statistics could not: how to make honest decisions from small samples. It is now the default tool for comparing means in science, medicine and industry.
Check yourself
QuestionA sample of values has mean 10 and sample standard deviation 2. What are the degrees of freedom, and what is the standard error of the mean?Show answer
The degrees of freedom are . The standard error is .
QuestionFor a sample of 25 values, the 95 percent t critical value is , while the Gaussian value is . Which interval is wider, and why does the gap shrink as the sample grows?Show answer
The t interval is wider, because . The gap shrinks as grows because the t-distribution converges to the Gaussian: the estimate of the spread becomes reliable, so the extra uncertainty from estimating fades.
QuestionCompute the t-statistic for , , , , and say whether the result is significant at the two-sided 5 percent level with (critical value 2.131).Show answer
. Since , the result is not significant at the two-sided 5 percent level, even though the mean differs from 100 by 3.
QuestionWhy does the t-distribution have infinite variance when , and what does that imply for an average of extreme values?Show answer
Its tails decay like a power of , which is slow enough that the integral of against the density diverges for . Averages of such variables do not settle quickly: a single extreme value can dominate the sample mean, which is why heavy-tailed noise needs robust methods.
QuestionA researcher pools two small groups, each with , and uses a t-test with . The two groups have very different spreads, and . What is wrong, and what test should replace it?Show answer
The pooled-variance t-test assumes equal population variances, which is clearly violated here. The pooled estimate mixes the two spreads and gives unreliable -values. Welch's t-test handles unequal variances by using separate variance estimates and adjusted degrees of freedom. With equal group sizes the pooled test is less badly affected, but Welch's test is the safe default.