The -test needs the population standard deviation . In practice it is almost never known — so it is estimated by , and that extra uncertainty is exactly what the -distribution accounts for.
When to use the t-distribution
Use rather than when:
- the population standard deviation is unknown and estimated by the sample , and
- the sample is small (roughly ).
For large samples estimates well and the two tests agree, which is why and become interchangeable as grows.
The -distribution looks like the standard normal — symmetric, bell-shaped, centred on 0 — but has heavier tails. Extreme values are more likely, because itself varies from sample to sample.
As the degrees of freedom increase, the -distribution converges to the standard normal. By the difference is slight; by it is negligible.
Degrees of freedom
For a one-sample -test:
One degree of freedom is lost because was computed from the same data. Once the mean and of the values are fixed, the last value is determined — it is not free to vary.
For a paired test on pairs, as well, since the test is applied to the differences.
The one-sample t-test
A sample of 16 has mean 105 and standard deviation 12. Test at the 5% level whether the population mean exceeds 100.
1. Hypotheses. ; — one-tailed, since "exceeds" gives a direction.
2. Critical value. , one-tailed 5%: .
3. Test statistic.
4. Compare. , so the statistic is not in the critical region.
5. Conclude. Do not reject : at the 5% level there is insufficient evidence that the population mean exceeds 100.
Confidence intervals using t
with read at for the required confidence level.
A 95% interval for the sample above:
, two-tailed 5%: .
Notice the interval contains 100 — consistent with the test's failure to reject . The two methods must always agree.
The paired t-test
When the same subjects are measured twice — before and after a treatment, or by two methods — the observations are not independent, and a two-sample test would be wrong.
Instead, work with the differences and apply a one-sample test to them:
testing — no average change.
Pairing is powerful because it removes the variation between subjects. Ten people's weights may differ enormously, yet their individual weight changes can be measured with precision.
Assumptions
Every -test assumes:
- The sample is random.
- The population is approximately normally distributed. This matters most for small samples; the Central Limit Theorem protects larger ones.
- The observations are independent — within the sample for a one-sample test, or between pairs for a paired test.
For a two-sample -test using a pooled estimate, a fourth assumption is added: the two populations have equal variances.