One-Sample Z-Test Notes

Published on: November 26, 2026

These One-Sample Z-Test Notes explain how to test whether a sample mean is different from a claimed population mean, with the working shown line by line. The method sets up the two hypotheses, finds the standard error and works out how many standard errors the sample mean is from the claimed mean. The table then gives the p-value, which is compared with the significance level to decide whether to reject the null hypothesis. The same pattern works for two-tailed, left-tailed and right-tailed tests.

Step-by-step method

  1. Set up the hypotheses.
  2. Write the formula.
  3. Find the standard error.
  4. Substitute the values into the formula.
  5. Work out the test statistic z.
  6. Find the p-value.
  7. Compare the p-value with the significance level.
  8. Show the test on the normal curve.

Formula: Z-Test Statistic Formula

This formula measures how many standard errors the sample mean is from the mean in the null hypothesis. Take the null mean away from the sample mean, then divide by the standard error.

\(z = \frac{\bar{x} - \mu_{0}}{\sigma / \sqrt{n}}\)

Useful Tips to Remember

The test statistic is \(z = \frac{\bar{x} - \mu_0}{\sigma / \sqrt{n}}\). State the null and alternative hypotheses before calculating anything. If the p-value is less than the significance level, reject the null hypothesis. Failing to reject it does not prove it is true. The z-test needs the population standard deviation to be known.

Required knowledge

Where Is the One-Sample Z-Test Used?

A one-sample z-test checks whether a sample mean is significantly different from a claimed population mean when the population standard deviation is known. It answers questions such as whether a machine is filling bottles with the right amount, or whether a new teaching method has changed average test scores. Factories use it in quality control, researchers use it to test claims, and businesses use it to check whether a change has really made a difference rather than happening by chance. The p-value shows how strong the evidence is.

  • Checking whether a machine fills packets to the stated weight
  • Testing whether a new teaching method changed average scores
  • Verifying claims about average battery life or fuel use
  • Monitoring production quality against a target
  • Testing whether average waiting times have changed

One-Sample Z-Test Practice Problems

Example 1 tests \(\bar{x} = 52\) against \(\mu_0 = 50\) at the 5% level, and Example 2 tests \(\bar{x} = 48.5\) at the 1% level. Examples 3 and 4 give you two more problems of the same kind to try. Try finding the z-value and the decision yourself first.

The worked examples below go through the same pattern from start to finish, so you can compare every step with your own working. Try each problem on paper first, then open the example and check your working one step at a time, so you can see exactly which step went wrong if your answer does not match. Use them to check your answers and to understand why each step works.

See Example 1 Hide Example 1

Problem

\(\bar{x} = 52,\; \mu_{0} = 50,\; \sigma = 8,\; n = 64,\; \alpha = 0.05\)

Approach

Step-by-step method

  1. Set up the hypotheses.
  2. Write the formula.
  3. Find the standard error.
  4. Substitute the values into the formula.
  5. Work out the test statistic z.
  6. Find the p-value.
  7. Compare the p-value with the significance level.
  8. Show the test on the normal curve.

Formula

Formula: Z-Test Statistic Formula

This formula measures how many standard errors the sample mean is from the mean in the null hypothesis. Take the null mean away from the sample mean, then divide by the standard error.

\(z = \frac{\bar{x} - \mu_{0}}{\sigma / \sqrt{n}}\)

Step 1

Step 1 - Set up the hypotheses.

In this problem: The null hypothesis says the true mean is \(50\). The alternative says it is different from \(50\).

\(H_{0}: \mu = 50 \qquad H_{1}: \mu \neq 50\)

Step 2

Step 2 - Write the formula.

In this problem: The test statistic measures how many standard errors the sample mean is from the null mean.

\(z = \frac{\bar{x} - \mu_{0}}{\sigma / \sqrt{n}}\)

Step 3

Step 3 - Find the standard error.

In this problem: Dividing the standard deviation by the square root of the sample size gives \(SE = 1\).

\(\frac{\sigma}{\sqrt{n}} = \frac{8}{\sqrt{64}} = 1\)

Step 4

Step 4 - Substitute the values into the formula.

In this problem: Replacing \(\bar{x}\) with \(52\), \(\mu_{0}\) with \(50\) and the standard error with \(1\) gives \(z = \frac{52 - 50}{1}\).

\(z = \frac{52 - 50}{1}\)

Step 5

Step 5 - Work out the test statistic z.

In this problem: Taking the null mean away gives \(2\), and dividing by \(1\) gives \(z = 2\).

\(z = \frac{52 - 50}{1} = 2\)

Step 6

Step 6 - Find the p-value.

In this problem: For a two-tailed test the p-value counts both tails, so the area beyond \(2\) is doubled. The table gives \(p \approx 0.0456\).

\(p = 2 \times P(Z > 2) = 2 \times 0.0228 \approx 0.0456\)

Step 7

Step 7 - Compare the p-value with the significance level.

In this problem: The p-value is not bigger than \(\alpha = 0.05\), so the result is significant and the null hypothesis is rejected.

\(0.0456 \le 0.05 \Rightarrow \text{Reject } H_{0}\)

Step 8

Step 8 - Show the test on the normal curve.

In this problem: The shaded tails are the rejection region for \(\alpha = 0.05\), beyond \(\pm 1.96\). The test statistic falls inside it.

Standard normal curve with the rejection region and the test statistic

Final Answer

\(z = 2,\; p \approx 0.0456,\; \text{Reject } H_{0}\)
See Example 2 Hide Example 2

Problem

\(\bar{x} = 48.5,\; \mu_{0} = 50,\; \sigma = 8,\; n = 64,\; \alpha = 0.01\)

Approach

Step-by-step method

  1. Set up the hypotheses.
  2. Write the formula.
  3. Find the standard error.
  4. Substitute the values into the formula.
  5. Work out the test statistic z.
  6. Find the p-value.
  7. Compare the p-value with the significance level.
  8. Show the test on the normal curve.

Formula

Formula: Z-Test Statistic Formula

This formula measures how many standard errors the sample mean is from the mean in the null hypothesis. Take the null mean away from the sample mean, then divide by the standard error.

\(z = \frac{\bar{x} - \mu_{0}}{\sigma / \sqrt{n}}\)

Step 1

Step 1 - Set up the hypotheses.

In this problem: The null hypothesis says the true mean is \(50\). The alternative says it is less than \(50\).

\(H_{0}: \mu = 50 \qquad H_{1}: \mu < 50\)

Step 2

Step 2 - Write the formula.

In this problem: The test statistic measures how many standard errors the sample mean is from the null mean.

\(z = \frac{\bar{x} - \mu_{0}}{\sigma / \sqrt{n}}\)

Step 3

Step 3 - Find the standard error.

In this problem: Dividing the standard deviation by the square root of the sample size gives \(SE = 1\).

\(\frac{\sigma}{\sqrt{n}} = \frac{8}{\sqrt{64}} = 1\)

Step 4

Step 4 - Substitute the values into the formula.

In this problem: Replacing \(\bar{x}\) with \(48.5\), \(\mu_{0}\) with \(50\) and the standard error with \(1\) gives \(z = \frac{48.5 - 50}{1}\).

\(z = \frac{48.5 - 50}{1}\)

Step 5

Step 5 - Work out the test statistic z.

In this problem: Taking the null mean away gives \(-1.5\), and dividing by \(1\) gives \(z = -1.5\).

\(z = \frac{48.5 - 50}{1} = -1.5\)

Step 6

Step 6 - Find the p-value.

In this problem: For a left-tailed test the p-value is the area to the left of z. The table gives \(p \approx 0.0668\).

\(p = P(Z < -1.5) \approx 0.0668\)

Step 7

Step 7 - Compare the p-value with the significance level.

In this problem: The p-value is bigger than \(\alpha = 0.01\), so the result is not significant and the null hypothesis is not rejected.

\(0.0668 > 0.01 \Rightarrow \text{Do not reject } H_{0}\)

Step 8

Step 8 - Show the test on the normal curve.

In this problem: The shaded tail is the rejection region for \(\alpha = 0.01\), beyond \(-2.33\). The test statistic falls outside it.

Standard normal curve with the rejection region and the test statistic

Final Answer

\(z = -1.5,\; p \approx 0.0668,\; \text{Do not reject } H_{0}\)
See Example 3 Hide Example 3

Problem

\(\bar{x} = 52,\; \mu_{0} = 50,\; \sigma = 8,\; n = 64,\; \alpha = 0.05\)

Approach

Step-by-step method

  1. Set up the hypotheses.
  2. Write the formula.
  3. Find the standard error.
  4. Substitute the values into the formula.
  5. Work out the test statistic z.
  6. Find the p-value.
  7. Compare the p-value with the significance level.
  8. Show the test on the normal curve.

Formula

Formula: Z-Test Statistic Formula

This formula measures how many standard errors the sample mean is from the mean in the null hypothesis. Take the null mean away from the sample mean, then divide by the standard error.

\(z = \frac{\bar{x} - \mu_{0}}{\sigma / \sqrt{n}}\)

Step 1

Step 1 - Set up the hypotheses.

In this problem: The null hypothesis says the true mean is \(50\). The alternative says it is more than \(50\).

\(H_{0}: \mu = 50 \qquad H_{1}: \mu > 50\)

Step 2

Step 2 - Write the formula.

In this problem: The test statistic measures how many standard errors the sample mean is from the null mean.

\(z = \frac{\bar{x} - \mu_{0}}{\sigma / \sqrt{n}}\)

Step 3

Step 3 - Find the standard error.

In this problem: Dividing the standard deviation by the square root of the sample size gives \(SE = 1\).

\(\frac{\sigma}{\sqrt{n}} = \frac{8}{\sqrt{64}} = 1\)

Step 4

Step 4 - Substitute the values into the formula.

In this problem: Replacing \(\bar{x}\) with \(52\), \(\mu_{0}\) with \(50\) and the standard error with \(1\) gives \(z = \frac{52 - 50}{1}\).

\(z = \frac{52 - 50}{1}\)

Step 5

Step 5 - Work out the test statistic z.

In this problem: Taking the null mean away gives \(2\), and dividing by \(1\) gives \(z = 2\).

\(z = \frac{52 - 50}{1} = 2\)

Step 6

Step 6 - Find the p-value.

In this problem: For a right-tailed test the p-value is the area to the right of z, which is 1 minus the table area. The table gives \(p \approx 0.0228\).

\(p = P(Z > 2) = 1 - 0.9772 \approx 0.0228\)

Step 7

Step 7 - Compare the p-value with the significance level.

In this problem: The p-value is not bigger than \(\alpha = 0.05\), so the result is significant and the null hypothesis is rejected.

\(0.0228 \le 0.05 \Rightarrow \text{Reject } H_{0}\)

Step 8

Step 8 - Show the test on the normal curve.

In this problem: The shaded tail is the rejection region for \(\alpha = 0.05\), beyond \(1.645\). The test statistic falls inside it.

Standard normal curve with the rejection region and the test statistic

Final Answer

\(z = 2,\; p \approx 0.0228,\; \text{Reject } H_{0}\)
See Example 4 Hide Example 4

Problem

\(\bar{x} = 51,\; \mu_{0} = 50,\; \sigma = 8,\; n = 64,\; \alpha = 0.1\)

Approach

Step-by-step method

  1. Set up the hypotheses.
  2. Write the formula.
  3. Find the standard error.
  4. Substitute the values into the formula.
  5. Work out the test statistic z.
  6. Find the p-value.
  7. Compare the p-value with the significance level.
  8. Show the test on the normal curve.

Formula

Formula: Z-Test Statistic Formula

This formula measures how many standard errors the sample mean is from the mean in the null hypothesis. Take the null mean away from the sample mean, then divide by the standard error.

\(z = \frac{\bar{x} - \mu_{0}}{\sigma / \sqrt{n}}\)

Step 1

Step 1 - Set up the hypotheses.

In this problem: The null hypothesis says the true mean is \(50\). The alternative says it is different from \(50\).

\(H_{0}: \mu = 50 \qquad H_{1}: \mu \neq 50\)

Step 2

Step 2 - Write the formula.

In this problem: The test statistic measures how many standard errors the sample mean is from the null mean.

\(z = \frac{\bar{x} - \mu_{0}}{\sigma / \sqrt{n}}\)

Step 3

Step 3 - Find the standard error.

In this problem: Dividing the standard deviation by the square root of the sample size gives \(SE = 1\).

\(\frac{\sigma}{\sqrt{n}} = \frac{8}{\sqrt{64}} = 1\)

Step 4

Step 4 - Substitute the values into the formula.

In this problem: Replacing \(\bar{x}\) with \(51\), \(\mu_{0}\) with \(50\) and the standard error with \(1\) gives \(z = \frac{51 - 50}{1}\).

\(z = \frac{51 - 50}{1}\)

Step 5

Step 5 - Work out the test statistic z.

In this problem: Taking the null mean away gives \(1\), and dividing by \(1\) gives \(z = 1\).

\(z = \frac{51 - 50}{1} = 1\)

Step 6

Step 6 - Find the p-value.

In this problem: For a two-tailed test the p-value counts both tails, so the area beyond \(1\) is doubled. The table gives \(p \approx 0.3174\).

\(p = 2 \times P(Z > 1) = 2 \times 0.1587 \approx 0.3174\)

Step 7

Step 7 - Compare the p-value with the significance level.

In this problem: The p-value is bigger than \(\alpha = 0.1\), so the result is not significant and the null hypothesis is not rejected.

\(0.3174 > 0.1 \Rightarrow \text{Do not reject } H_{0}\)

Step 8

Step 8 - Show the test on the normal curve.

In this problem: The shaded tails are the rejection region for \(\alpha = 0.1\), beyond \(\pm 1.645\). The test statistic falls outside it.

Standard normal curve with the rejection region and the test statistic

Final Answer

\(z = 1,\; p \approx 0.3174,\; \text{Do not reject } H_{0}\)

Calculator and Practice Mode