Topic contents

Lesson 6

z-tests for a population mean

Known population standard deviation and large-sample approximations: from research question to statistical conclusion

Test settings

Try it

Calculation method in this lesson
Choose an example

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

Use the population standard deviation σ for a z-test (the sampling distribution is normal or can reasonably be approximated by a normal distribution)

Population variance unknown, large sample

Estimate σ with the sample standard deviation s for a large-sample Z approximation; a t method is usually appropriate too. There is no universal rule that 30 is enough

Population variance unknown, small sample

Usually use a t-test; with small samples, pay particular attention to conditions such as population normality (next lesson)
Does the population mean height of male students at a school differ from 175 cm?

σ = 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

The researcher asks whether it differs, so we use a two-sided test.
The research question determines the test direction. Do not switch directions after seeing the sample mean.

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

Choose an example

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.

  1. Write the original formula
    Z=xˉ−μ0σ/nZ=\frac{\bar{x}-\mu_0}{\sigma/\sqrt n}
  2. Calculate the standard error
    SE=σn=6100=0.6000 cmSE=\frac{\sigma}{\sqrt n}=\frac{6}{\sqrt{100}}=0.6000\ \text{cm}
  3. Substitute the example values
    Z=xˉ−μ0σ/n=173.00−1756/100≈−2.0000.6000≈−3.33Z=\frac{\bar{x}-\mu_0}{\sigma/\sqrt n}=\frac{173.00-175}{6/\sqrt{100}}\approx\frac{-2.000}{0.6000}\approx −3.33
  4. Calculate the result
    Z=−3.33Z=−3.33
−4−2024ZZ = −3.333
  • Standard normal distribution
  • Sample Z position

Standard normal distribution when the null hypothesis holds at its boundary

Position of the Z statistic in the standard normal distribution
Test statistic Z
−3.33
The distance between this sample mean and the hypothesized value in standard-error units is 3.33; Z is on the left side of the normal curve.

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

Choose an example
Significance level α

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.

−4−2024Z−1.9601.960Z = −3.333
  • Standard normal distribution
  • Sample Z position
  • Rejection region
  • Critical value

Standard normal distribution when the null hypothesis holds at its boundary

Critical values, rejection region, and sample Z

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

Choose an example
Significance level α

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.

−4−2024Z−1.9601.960Z = −3.333
  • 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

Normal tail area corresponding to the p-value

H₀: μ = 175

H₁: μ ≠ 175

Test statistic Z
−3.33
p-value
0.0008581

P = 0.0008581 ≤ α = 0.05. Decision: Reject H₀.

The p-value is not the probability that the null hypothesis is true. Comparing the p-value with α tells us whether there is enough evidence to reject H₀ under the prespecified rule.

Test settings

Try it

Choose an example
Significance level α

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.

−4−2024Z−1.9601.960Z = −3.333
  • 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

Complete z-test: critical values and p-value

H₀: μ = 175

H₁: μ ≠ 175

Test statistic Z
−3.33
p-value
0.0008581
  1. Research question
    Does the population mean height of male students at a school differ from 175 cm?
  2. State the hypotheses

    H₀: μ = 175

    H₁: μ ≠ 175

  3. Calculate Z
    Z=xˉ−μ0σ/n=173.00−1756/100≈−2.0000.6000≈−3.33Z=\frac{\bar{x}-\mu_0}{\sigma/\sqrt n}=\frac{173.00-175}{6/\sqrt{100}}\approx\frac{-2.000}{0.6000}\approx −3.33
  4. Compare
    P = 0.0008581 ≤ α = 0.05. Decision: Reject H₀.
  5. Conclusion
    Reject H₀. At the selected significance level, the sample data provide statistical evidence for the alternative hypothesis.

Both methods must give the same result

Critical-value method: |Z| ≥ 1.960; this Z falls in the rejection region. p-value method: P ≤ α. Both methods conclude: Reject H₀.
By default, this lesson assumes a known population standard deviation and a normal population or a large-sample normal approximation. It covers only a single population mean.

Test settings

x̄ = 173.0 cm · α = 5%