The Z-Test › When Should You Use a Z-Test?
Machine Learning from ScratchAll chapters The Z-Test › When Should You Use a Z-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
The z-test is appropriate in three scenarios:
Scenario 1: Known Population Standard Deviation
This is rare but does occur:
- Calibrated measurement systems: Manufacturing processes often have extensively characterized measurement instruments where σ is known from calibration studies
- Standardized tests: IQ tests, for example, are designed to have σ = 15 in the general population
- Quality control: When historical data from millions of measurements establishes σ reliably
Scenario 2: Testing Proportions
This is the most common real-world use of z-tests. When testing hypotheses about population proportions, the variance is determined by the proportion itself (). You don't need to estimate it separately, so the z-test is appropriate.
Scenario 3: Very Large Samples
When sample sizes exceed 100 or so, the t-distribution converges to the normal distribution. In these cases, z-tests and t-tests give essentially identical results. However, using the t-test is never wrong even with large samples, so there's no real advantage to using z here.


