z-tests for a population mean
Known population standard deviation and large-sample approximations: from research question to statistical conclusion
Test settings
Try it
The current z-test uses a known population standard deviation σ. All three applied examples assume that a normal approximation for the sample mean is appropriate.
Start with a real question: what are we testing?
As with confidence intervals for a population mean in the previous topic, first choose a method based on whether the population variance is known, the sample size, and the distributional conditions. This lesson focuses on the z-test.
Population variance known
Population variance unknown, large sample
Population variance unknown, small sample
σ = 6 cm; n = 100 observations are randomly sampled. Adjust the sample mean below.
- Hypothesized value μ₀
- 175 cm
- Known population standard deviation
- 6 cm
- Sample size n
- 100
Drag the sample mean: the research question and hypotheses stay the same, but the calculated Z value and final decision may change.
First state the statistical hypotheses
H₀: μ = 175
H₁: μ ≠ 175
When do we use a z-test?
This course focuses on tests for a population mean with a known population standard deviation σ. When σ is unknown and estimated with the sample standard deviation, we usually move to the t-test procedure next.
Test settings
Try it
We currently use the standard Z statistic with a known population standard deviation σ.
Turn the sample mean into a comparable Z value
First write the original formula, then substitute the numbers from the current example, and finally calculate Z. The denominator is the sample mean's standard error (SE) or estimated standard error.
- Write the original formula
- Calculate the standard error
- Substitute the example values
- Calculate the result
- Standard normal distribution
- Sample Z position
Standard normal distribution when the null hypothesis holds at its boundary
- Test statistic Z
- −3.33
A larger absolute Z means that the sample mean is farther from the hypothesized value in standard error units. Whether to reject H₀ also depends on the test direction and decision rule.
Test settings
Try it
We currently use the standard Z statistic with a known population standard deviation σ.
Critical-value method: set the rule, then locate Z
Rather than defining the rejection region again, we apply the rules learned earlier. Choose α and compare this Z value with the corresponding critical value.
- Standard normal distribution
- Sample Z position
- Rejection region
- Critical value
Standard normal distribution when the null hypothesis holds at its boundary
H₀: μ = 175
H₁: μ ≠ 175
- Test statistic Z
- −3.33
- Critical value of the rejection region
- ±1.960
The rejection condition is |Z| ≥ 1.960. Here, −3.33 meets this condition. Decision: Reject H₀.
The test direction and α determine the critical value. Changing the sample mean changes only Z, leaving the chosen decision rule unchanged.
Test settings
Try it
We currently use the standard Z statistic with a known population standard deviation σ.
p-value method: how extreme is this sample result?
When H₀ holds at its boundary, the hatched area is the p-value for this test. Compare it with the prespecified α to reach the same conclusion as the critical-value method.
- Standard normal distribution
- Sample Z position
- Critical value
- Tail area corresponding to the p-value
Standard normal distribution when the null hypothesis holds at its boundary
H₀: μ = 175
H₁: μ ≠ 175
- Test statistic Z
- −3.33
- p-value
- 0.0008581
P = 0.0008581 ≤ α = 0.05. Decision: Reject H₀.
Test settings
Try it
We currently use the standard Z statistic with a known population standard deviation σ.
A complete hypothesis test: from research question to statistical conclusion
Choose an example, adjust the sample mean and significance level, and check that all five stages agree. This combines the earlier separate exercises into a complete z-test.
- Standard normal distribution
- Sample Z position
- Rejection region
- Critical value
- Tail area corresponding to the p-value
Standard normal distribution when the null hypothesis holds at its boundary
H₀: μ = 175
H₁: μ ≠ 175
- Test statistic Z
- −3.33
- p-value
- 0.0008581
- Research questionDoes the population mean height of male students at a school differ from 175 cm?
- State the hypotheses
H₀: μ = 175
H₁: μ ≠ 175
- Calculate Z
- CompareP = 0.0008581 ≤ α = 0.05. Decision: Reject H₀.
- ConclusionReject H₀. At the selected significance level, the sample data provide statistical evidence for the alternative hypothesis.
Both methods must give the same result