The Z-Test › Relationship to the T-Test
Michael BrenndoerferUpdated January 12, 20261 min read
Machine Learning from ScratchAll chapters Part 2 of 9Hypothesis Testing
The Z-Test › Relationship to the T-TestOne section · Sections in this chapter8 / 11 ↓
Sections in this chapter11
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
The z-test and t-test are closely related. The key differences:
| Aspect | Z-Test | T-Test |
|---|---|---|
| Population σ | Known | Unknown (estimated from sample) |
| Test statistic distribution | Standard normal | t-distribution |
| Tail heaviness | Lighter tails | Heavier tails (especially for small n) |
| Critical values | Fixed (e.g., ±1.96 for 95%) | Depend on degrees of freedom |
As sample size increases, the t-distribution converges to the normal distribution. For n > 100, the difference is negligible.
Rule of thumb: If you're unsure whether to use a z-test or t-test, use the t-test. It's valid in all cases where the z-test is valid, plus it handles the much more common case where σ is unknown.