One-sample z test
What changes when the population SD is known?
Use an invented blood-pressure study with a mean reduction of 3 mmHg. Here we assume the population SD is known to be 6 mmHg; the z test relies on that assumption.
Keep the mean reduction and known SD fixed. Compare 25 with 100 people and watch the standard error change.
z = …; known SE = …
1 · Compare the sample estimate with the null value
The circle is the sample estimate. The diamond is the null value. The blue horizontal bar extends one standard error on either side of the estimate. The thinner teal bar is the two-sided 95% confidence interval. The axis uses original measurement units. A two-sided 95% interval corresponds to a two-sided 5% test; directional tests use different rejection regions.
2 · Read the p-value under the null hypothesis
Imagine repeating the study when the null hypothesis is true. This curve shows the distribution of the resulting z scores, not the distribution of individual measurements. The vertical line marks your z score. The shaded area is the p-value for your chosen alternative.
Worked comparison
Follow the calculation
What the symbols mean
x̄ is the sample mean and μ₀ is the null population mean. σ is the known population standard deviation and n is the sample size. The denominator is the standard error, or SE.
Assumptions and full calculation
The test assumes independent observations and a normal sampling distribution of the mean. The standard error σ/√n describes how sample means vary across repeated studies. The z score gives the observed difference from μ₀ in standard errors. Choose the alternative before looking at the data.
Degrees of freedom and other tail probabilities
The selected p-value above uses your chosen alternative hypothesis. The other p-values use the alternatives shown here. Divide the observed difference by the known population standard deviation to get the effect size. Its sign follows the order of subtraction.