One-Sample Z-Test

Hypothesis test for a mean when σ is known, with shaded p-value and critical values.

Inputs

Enter
Alternative hypothesis Ha
Significance level α

Results update as you type.

Results

Fail to reject H₀: z = 1.8974, p-value = 0.0578

The p-value (0.0578) is greater than α = 0.05, so the data do not give enough evidence to conclude that the population mean is different from 100.

Standard normal curve. The shaded p-value region is both tails beyond z = 1.9, with area 0.0578. Dashed lines mark the critical values −1.96 and 1.96.−4−2024z = 1.9critical −1.96critical 1.96

Results

Test statistic z1.8974
p-value0.0578
x̄104.5
n40
Standard error2.3717
Critical value(s)−1.96, 1.96
Decision at α = 0.05Fail to reject H₀

On the TI-84

STAT → TESTS → 1:Z-Test. Choose Data or Stats, enter μ0, σ, x̄, n, pick the alternative, Calculate (or Draw).

Z-Test 100, 15, 104.5, 40, ≠

Show steps
  1. Hypotheses. H₀: μ = 100   Ha: μ ≠ 100
  2. Test statistic. z = (x̄ − μ0) ÷ (σ ÷ √n) = (104.5 − 100) ÷ (15 ÷ √40) = 4.5 ÷ 2.3717 = 1.8974
  3. p-value. Two-tailed test, so double the tail area beyond the test statistic: p-value = 0.0578. Since 0.0578 > 0.05, fail to reject H₀.
  4. Critical-value method. At α = 0.05, the rejection region is z ≤ −1.96 or z ≥ 1.96. The test statistic z = 1.8974 is not in the rejection region, so we fail to reject H₀. (Same decision as the p-value method.)
  5. Conclusion. The p-value (0.0578) is greater than α = 0.05, so the data do not give enough evidence to conclude that the population mean is different from 100.

About this calculator

When to use a z-test

Use the one-sample z-test for a mean when the population standard deviation σ is known and either the population is normal or the sample is large. If you only know the sample SD s, use the t-test instead.

The logic

Start by assuming H0 is true. The test statistic measures how many standard errors the sample mean is from μ0. The p-value is the probability of getting a sample mean at least this far from μ0 if H0 were true. A small p-value (≤ α) means the result would be surprising under H0, so we reject H0.

The critical-value method gives the same decision: reject H0 when the test statistic lands in the rejection region beyond the critical value(s).