The T-Test › Why Do We Need the T-Test?
Machine Learning from ScratchAll chapters The T-Test › Why Do We Need the T-Test?One section · Sections in this chapter2 / 11 ↓
Reading tools Definitions & inline links
Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.
Article links
Make inline references clickable
In the previous chapter on z-tests, we learned to compare means when the population standard deviation is known. The test statistic was:
This follows a standard normal distribution because the denominator is a fixed, known quantity. Only the numerator varies from sample to sample.
The problem is that you almost never know . In practice, you estimate the standard deviation from your sample data, giving you the sample standard deviation . Early researchers simply substituted for and continued using normal distribution critical values. This seemed reasonable, but it led to systematic errors. They rejected the null hypothesis more often than they should have, especially with small samples.
Gosset discovered why: when you estimate from the same sample you're testing, you introduce additional variability into the test statistic. The sample standard deviation is itself a random variable that fluctuates from sample to sample. Sometimes underestimates , making your test statistic too large. Sometimes overestimates , making it too small. This extra variability means the test statistic no longer follows a normal distribution. It follows a distribution with heavier tails, one that appropriately penalizes us for not knowing the true population variance.