The Student's t-Distribution
One more distribution needs introducing before we get to hypothesis testing: the Student's t-distribution. It looks like the normal but with heavier tails, and it's parameterized by degrees of freedom (related to sample size).
Why does it exist? Here's the situation: when you run a hypothesis test, you often need to know the standard deviation of a population — but you don't. You only have a sample standard deviation. And that sample standard deviation has its own uncertainty, especially when your sample is small. Estimating variance from a small sample is less reliable, and that extra uncertainty has to go somewhere.
The t-distribution accounts for it. Its heavier tails represent the increased probability of extreme values when your variance estimate is imprecise. When sample sizes are large (roughly n > 30), the t-distribution converges to the normal — the extra uncertainty becomes negligible. When samples are small, the heavier tails make your tests appropriately more conservative.
The t-distribution (violet) overlaid with the standard normal (dashed gray). As degrees of freedom increase — reflecting a larger sample — the heavier tails shrink and the curves converge.
Heavy tails — noticeably wider than normal
Adjust degrees of freedom and threshold to see how the t-distribution's heavier tails shrink toward the normal — and how much more tail probability a t-test assigns compared to a z-test at the same cutoff.
When to Use t vs. Normal
In practice: always use the t-distribution for tests about means unless you somehow know the population standard deviation (which you almost never do). For large samples, the t and normal give nearly identical results. For small samples, the t is more honest about uncertainty.
You're running a test with n=8 samples. You compute a test statistic and need to determine whether it's extreme enough to reject the null hypothesis. Should you compare it to the normal distribution or the t-distribution — and why?