Z-Test — Definition, Formula & Examples
A Z-test is a statistical hypothesis test that determines whether a sample mean differs significantly from a known population mean, using the standard normal (Z) distribution. It applies when the population standard deviation is known and the sample size is large enough for the Central Limit Theorem to hold.
A Z-test is a parametric inference procedure in which the test statistic follows a standard normal distribution under the null hypothesis. It requires a known population standard deviation and tests whether the observed sample mean is consistent with a hypothesized population mean .
Key Formula
Where:
- = Test statistic (standard normal)
- = Sample mean
- = Hypothesized population mean under the null hypothesis
- = Known population standard deviation
- = Sample size
How It Works
You start by stating a null hypothesis (e.g., ) and an alternative hypothesis. Next, you compute the Z test statistic using the sample mean, the hypothesized mean, the population standard deviation, and the sample size. Then you compare the Z value to a critical value or compute a p-value from the standard normal distribution. If the p-value is less than your significance level (commonly 0.05), you reject the null hypothesis.
Worked Example
Problem: A factory claims its light bulbs last an average of 1,000 hours. The population standard deviation is known to be 50 hours. You test a random sample of 36 bulbs and find a sample mean of 985 hours. At the 0.05 significance level, is there evidence the true mean differs from 1,000?
State hypotheses: The null hypothesis is that the mean equals 1,000. The alternative is that the mean does not equal 1,000 (two-tailed test).
Compute the test statistic: Plug the values into the Z-test formula.
Compare to critical value: For a two-tailed test at α = 0.05, the critical values are ±1.96. Since |−1.80| = 1.80 < 1.96, the test statistic does not fall in the rejection region.
Answer: Fail to reject the null hypothesis. At the 0.05 significance level, there is not enough evidence to conclude the true mean lifetime differs from 1,000 hours.
Why It Matters
The Z-test appears throughout AP Statistics and introductory college statistics courses as the foundation for understanding hypothesis testing. In quality control, public health, and market research, analysts use Z-tests to make quick decisions when population variability is already established from historical data.
Common Mistakes
Mistake: Using a Z-test when the population standard deviation is unknown.
Correction: When σ is unknown and you estimate it with the sample standard deviation s, use a t-test instead. The Z-test assumes σ is a known, fixed value.
