One-Sample Z-Test Notes
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
- Set up the hypotheses.
- Write the formula.
- Find the standard error.
- Substitute the values into the formula.
- Work out the test statistic z.
- Find the p-value.
- Compare the p-value with the significance level.
- 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.
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
- How to find the standard error, covered in the Standard Error Calculator.
- How areas under the normal curve are found, covered in the Normal Distribution Calculator.
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
Approach
Step-by-step method
- Set up the hypotheses.
- Write the formula.
- Find the standard error.
- Substitute the values into the formula.
- Work out the test statistic z.
- Find the p-value.
- Compare the p-value with the significance level.
- 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.
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\).
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.
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\).
Problem
Approach
Step-by-step method
- Set up the problem.
- Write the formula.
- Substitute σ and n into the formula.
- Work out the square root of n.
- Divide to get the standard error.
Formula
Formula: Standard Error Formula
This formula gives how much the sample mean is expected to vary. Divide s by the square root of n.
Step 1
Step 1 - Set up the problem.
In this problem: We are finding how much the sample mean is expected to vary, when the standard deviation is \(8\) and the sample size is \(64\).
Step 2
Step 2 - Write the formula.
In this problem: The standard error is the standard deviation divided by the square root of the sample size, so bigger samples give smaller errors.
Step 3
Step 3 - Substitute σ and n into the formula.
In this problem: Replacing \(\sigma\) with \(8\) and \(n\) with \(64\) gives \(SE = \frac{8}{\sqrt{64}}\).
Step 4
Step 4 - Work out the square root of n.
In this problem: The square root of \(64\) is \(\sqrt{64} = 8\).
Step 5
Step 5 - Divide to get the standard error.
In this problem: Dividing gives \(8 \div 8 = 1\).
Final Answer
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}\).
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\).
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\).
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.
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.
Final Answer
See Example 2 Hide Example 2
Problem
Approach
Step-by-step method
- Set up the hypotheses.
- Write the formula.
- Find the standard error.
- Substitute the values into the formula.
- Work out the test statistic z.
- Find the p-value.
- Compare the p-value with the significance level.
- 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.
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\).
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.
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\).
Problem
Approach
Step-by-step method
- Set up the problem.
- Write the formula.
- Substitute σ and n into the formula.
- Work out the square root of n.
- Divide to get the standard error.
Formula
Formula: Standard Error Formula
This formula gives how much the sample mean is expected to vary. Divide s by the square root of n.
Step 1
Step 1 - Set up the problem.
In this problem: We are finding how much the sample mean is expected to vary, when the standard deviation is \(8\) and the sample size is \(64\).
Step 2
Step 2 - Write the formula.
In this problem: The standard error is the standard deviation divided by the square root of the sample size, so bigger samples give smaller errors.
Step 3
Step 3 - Substitute σ and n into the formula.
In this problem: Replacing \(\sigma\) with \(8\) and \(n\) with \(64\) gives \(SE = \frac{8}{\sqrt{64}}\).
Step 4
Step 4 - Work out the square root of n.
In this problem: The square root of \(64\) is \(\sqrt{64} = 8\).
Step 5
Step 5 - Divide to get the standard error.
In this problem: Dividing gives \(8 \div 8 = 1\).
Final Answer
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}\).
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\).
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\).
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.
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.
Final Answer
See Example 3 Hide Example 3
Problem
Approach
Step-by-step method
- Set up the hypotheses.
- Write the formula.
- Find the standard error.
- Substitute the values into the formula.
- Work out the test statistic z.
- Find the p-value.
- Compare the p-value with the significance level.
- 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.
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\).
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.
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\).
Problem
Approach
Step-by-step method
- Set up the problem.
- Write the formula.
- Substitute σ and n into the formula.
- Work out the square root of n.
- Divide to get the standard error.
Formula
Formula: Standard Error Formula
This formula gives how much the sample mean is expected to vary. Divide s by the square root of n.
Step 1
Step 1 - Set up the problem.
In this problem: We are finding how much the sample mean is expected to vary, when the standard deviation is \(8\) and the sample size is \(64\).
Step 2
Step 2 - Write the formula.
In this problem: The standard error is the standard deviation divided by the square root of the sample size, so bigger samples give smaller errors.
Step 3
Step 3 - Substitute σ and n into the formula.
In this problem: Replacing \(\sigma\) with \(8\) and \(n\) with \(64\) gives \(SE = \frac{8}{\sqrt{64}}\).
Step 4
Step 4 - Work out the square root of n.
In this problem: The square root of \(64\) is \(\sqrt{64} = 8\).
Step 5
Step 5 - Divide to get the standard error.
In this problem: Dividing gives \(8 \div 8 = 1\).
Final Answer
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}\).
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\).
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\).
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.
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.
Final Answer
See Example 4 Hide Example 4
Problem
Approach
Step-by-step method
- Set up the hypotheses.
- Write the formula.
- Find the standard error.
- Substitute the values into the formula.
- Work out the test statistic z.
- Find the p-value.
- Compare the p-value with the significance level.
- 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.
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\).
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.
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\).
Problem
Approach
Step-by-step method
- Set up the problem.
- Write the formula.
- Substitute σ and n into the formula.
- Work out the square root of n.
- Divide to get the standard error.
Formula
Formula: Standard Error Formula
This formula gives how much the sample mean is expected to vary. Divide s by the square root of n.
Step 1
Step 1 - Set up the problem.
In this problem: We are finding how much the sample mean is expected to vary, when the standard deviation is \(8\) and the sample size is \(64\).
Step 2
Step 2 - Write the formula.
In this problem: The standard error is the standard deviation divided by the square root of the sample size, so bigger samples give smaller errors.
Step 3
Step 3 - Substitute σ and n into the formula.
In this problem: Replacing \(\sigma\) with \(8\) and \(n\) with \(64\) gives \(SE = \frac{8}{\sqrt{64}}\).
Step 4
Step 4 - Work out the square root of n.
In this problem: The square root of \(64\) is \(\sqrt{64} = 8\).
Step 5
Step 5 - Divide to get the standard error.
In this problem: Dividing gives \(8 \div 8 = 1\).
Final Answer
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}\).
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\).
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\).
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.
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.
Final Answer
Calculator and Practice Mode
Want to check your own working? The One-Sample Z-Test Calculator solves any problem you type in and shows every step, so you can compare it line by line with your answer and find exactly where a mistake crept in. When you are ready to test yourself, One-Sample Z-Test Practice gives you a new problem at Easy, Medium or Hard level, checks your answer and shows the full working whenever you get one wrong. Practice Mode for this calculator is available on the Pro plan.