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
Chapter 14The Z-Test › Relationship to the T-Test
Reading section 8 of 11 · Relationship to the T-Test · 1 minSection 8 of 11 · 1 min

Book contents

Section 8 of 11 · 1 min read

The Z-Test › Relationship to the T-TestOne section · Sections in this chapter8 / 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

The z-test and t-test are closely related. The key differences:

AspectZ-TestT-Test
Population σKnownUnknown (estimated from sample)
Test statistic distributionStandard normalt-distribution
Tail heavinessLighter tailsHeavier tails (especially for small n)
Critical valuesFixed (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.