Z-test
A z-test uses the standard normal distribution to test a hypothesis about a mean or proportion when the sample is large or the population variance is known. The test statistic is z = (x̄ − μ₀) / (σ / √n).
FrameworkHypothesis testing
See it move
A manufacturer claims batteries last 500 hours on average, with a known standard deviation of 40. A sample of 64 batteries averages 490 hours. The z-statistic is (490 − 500) ÷ (40 ÷ 8) = −2.00. At the 5% significance level, the two-tailed critical values are ±1.96; since −2.00 falls outside that range, the null hypothesis is rejected.
The formula
Variables
- Sample mean
- Hypothesised population mean under H₀
- Known (or well-approximated) population standard deviation
- Sample size
Reject H₀ when |z| exceeds the critical value at α, or equivalently when the p-value is below α. Use a t-test if σ is unknown and n is small.
Check yourself
A bottling plant claims its filling machine produces a mean volume of 500 ml per bottle. From long production history, the population standard deviation is known to be 8 ml. A quality engineer measures 64 randomly selected bottles and records a sample mean of 497 ml. Why is a z-test (rather than a t-test) the appropriate procedure here?