Introduction
The simplest type of hypothesis test is the Single Sample Z test.
This test compares a sample mean against a distribution of population means to determine if it is likely that the sample mean came from the population mean. This hypothesis test is not very common because it is rare to have population standard deviation information. Although uncommon, the single sample z test is easy to calculate and serves a good foundation for other hypothesis tests (such as t tests) which are very common.
The easiest way to understand single sample z tests is to work through an example.
Let's imagine that we want to determine if the students at our school have different IQs than the general population. Our sample is 100 students, and the average IQ is 103, which is 3 points higher than the population mean of 100 (with a standard deviation of 10). How can we test the hypothesis that the students are smarter than the general population?
Step 1: We need to make sure we are running the correct hypothesis test. Since we are comparing a sample mean against a population mean, then this has to be a single sample z test (z because the population mean and standard deviation was given to us and the scores were given as normal).
Step 2: We need to identify an acceptable level of error for your test. This is easy because the standard level of acceptable error is .05. Remember that this is called the alpha level and is indicated by α=.05.
Step 3: We need to create a distribution of means from the population distribution of scores. The mean distribution is easy to create given our knowledge of the central limit theorem -- it will have a mean of 100 and a standard error that is √
N
times skinnier. With N=100 in our example, this mean distribution would have a standard error equal to the standard deviation of the scores divided by the square root of the sample size..
σ
X
=
σ
X
/√
N
σ
X
=
10
/√
100
σ
X
=
1
Step 4: Now that we've calculated the standard error (
σ
X
), we can calculate the z score of our sample mean on the mean distribution where the sample size is 100. Remember that this formula for the z score for a mean is ...
Z=(
X
-μ)/
σ
X
Z=(103-100)/1
Z=3
Step 5: We need to determine the critical value on the mean distribution that will allow us to define a rejection region which has
a probability low enough that we can reject the null hypothesis. Since this is a z distribution and the question asks if the mean of our school is different than the population mean, then we have a two-tailed test with α=.05. Looking up the critical value on the Z table, we find Z=1.96 for this kind of hypothesis test.
Step 6: Lastly, we just compare the z score of the sample mean to the critical value of 1.96 to decide if we should reject the null hypothesis. Because the z score of 3 is greater than 1.96, then we can conclude the observed sample mean is in the rejection region of the null hypothesis distribution. In other words, the observed difference between our sample mean and the population mean is very unlikely to have been due to chance variability, so we reject that idea and conclude that our students are actually smarter than the general population.
Here's a display of the distributions for the hypothesis test for the previous problem.
Display of Single Sample Z hypothesis test
As the display shows, the sample mean is well into the red rejection region which defines which sample means are unlikely to occur given the null hypothesis. Of course, we define 'unlikely' as the size of the rejection region, which is .05 in this case.
H
ere's another problem with the solution worked out.
The mean IQ from a sample of 36 students is 102. Consider the hypothesis test that compares this sample mean of 102 to the population mean of 100. Assume that the scores are normally distributed,
σ
X
=12,α=.05,tails=2.
What are the results of the hypothesis test?
Answer:
Observed Z value of 1.00 is within area of critical value of -1.96 to 1.96
FAIL TO REJECT NULL HYPOTHESIS
Step 1:Choose statistical test.
What type of variable is it? How many groups are there? Are the groups related?
Variable type is ratio. Comparing a sample mean against population mean. Use single sample Z test
Step 2:Calculate Standard Error.
σ
X
=
σ
X
/
√
N
σ
X
=
σ
X
/
√
36
=2
Step 3:Calculate Z value of sample mean.
Z=(
X
-μ)/
σ
X
Z=(
X
-μ)/
σ
X
=(102-100)/2=1.00
Step 4:Lookup critical value.
Use Z table
For 2 tails and α=.05 critical value is 1.96
Step 5:Test Hypothesis.
Is observed Z value in rejection region?
Observed Z value of 1.00 is within area of critical value of -1.96 to 1.96
FAIL TO REJECT NULL HYPOTHESIS
Display of mean distribution for single sample z hypothesis test #2
Here we can see that the null hypothesis is not rejected because the sample mean does not fall in the rejection region. Therefore, the experiment concludes that the observed difference between the sample mean and the population mean is not great enough to reject the idea that the sample mean came from the population.
It is possible to have single sample t tests as well, but these are very atypical because such a test would require the population mean to be known without knowing the population standard deviation. Therefore, single sample t tests are not covered on this website.
Definitions
Single Sample Z test:
Hypothesis Test that compares a sample mean against a population mean. Population mean and standard deviation must be known.
Easy Questions
1. A single sample Z-test is used to test if a sample mean is likely to have come from a population. In order to perform such a hypothesis test, we need to know the population _____________________ and _____________________ .
Mean, Standard deviation
2. Why are single sample Z-tests not used very often?
Mean and Standard deviation of population are usually not known. Also, experiments usually compare effects between conditions.
3. I am testing to see if my sample mean of 200 is different from a
population with a known mean of 190 and a known standard deviation of
20. What kind of statistical test should I use?
Single sample Z-test
4. Why are single sample t tests almost never done?
Because single sample t tests require knowing the population mean without knowing the population standard deviation -- which is very rare.
Medium Questions
5. The mean IQ from a sample of 196 students is 101.5. Consider the hypothesis test that compares this sample mean of 101.8 to the population mean of 100. Previous evidence suggests that the students in the sample are smarter than the general population. Assume that the scores are normally distributed,
σ
X
=14,α=.05. What are the results of the hypothesis test?
Answer:
Observed Z value of 1.80 is above critical value of 1.64
REJECT NULL HYPOTHESIS
Step 1:Choose statistical test.
What type of variable is it? How many groups are there? Are the groups related?
Variable type is ratio. Comparing a sample mean against population mean. Use single sample Z test with 1 tail because previous evidence suggests that sample students are smarter than population.
Step 2:Calculate Standard Error.
σ
X
=
σ
X
/
√
N
σ
X
=
σ
X
/
√
N
=14/
√
196
=1
Step 3:Calculate Z value of sample mean.
Z=(
X
-μ)/
σ
X
Z=(
X
-μ)/
σ
X
=(101.8-100)/1=1.80
Step 4:Lookup critical value.
Use Z table
For 1 tails and α=.05 critical value is 1.64
Step 5:Test Hypothesis.
Is observed Z value in rejection region?
Observed Z value of 1.80 is above critical value of 1.64
REJECT NULL HYPOTHESIS
Answer Image
6. The mean IQ from a sample of 196 students is 101.5. Consider the hypothesis test that compares this sample mean of 101.5 to the population mean of 100. Assume that the scores are normally distributed,
σ
X
=14,α=.05,tails=2. What are the results of the hypothesis test?
Answer:
Observed Z value of 1.50 is within area of critical value of -1.96 to 1.96
FAIL TO REJECT NULL HYPOTHESIS
Step 1:Choose statistical test.
What type of variable is it? How many groups are there? Are the groups related?
Variable type is ratio. Comparing a sample mean against population mean. Use single sample Z test
Step 2:Calculate Standard Error.
σ
X
=
σ
X
/
√
N
σ
X
=
σ
X
/
√
N
=14/
√
196
=1
Step 3:Calculate Z value of sample mean.
Z=(
X
-μ)/
σ
X
Z=(
X
-μ)/
σ
X
=(101.5-100)/1=1.50
Step 4:Lookup critical value.
Use Z table
For 2 tails and α=.05 critical value is 1.96
Step 5:Test Hypothesis.
Is observed Z value in rejection region?
Observed Z value of 1.50 is within area of critical value of -1.96 to 1.96
FAIL TO REJECT NULL HYPOTHESIS
Answer Image