overview of the Two Sample Z-Test
Two Sample Z Test is used to test if the difference in the means of two samples collected from two populations, each assumed to be normally distributed, is equal to the difference of the means of the two populations.
To use this test, the standard deviations of the two populations must be known. However, since the cases where the standard deviations are provided are rare, Two Sample T Test is more often used to test for the difference between means.
Requirements for using Two Sample Z Test:
The two populations studied are assumed to be normally distributed.
The two standard deviations of the two populations are known.
The formula is:
where X is the sample drawn from the first population, Y is the sample drawn from the second population, β is the test value of the difference, σ1 is the known standard deviation of the first population, σ2 is the known standard deviation of the second population, N1 is the sample size of X, and N2 is the sample size of Y.
When N1 and N2 are sufficiently large, Z is approximately Normal⁡0,1.
Lily, a statistician, decided to have a pet in her home, but she had a hard time making up her mind between cat and dog. A friend told her that the average lifespan of dogs is 5 years longer than that of cats. She was more of a cat person; however, if her friend's theory was true, she would get a dog. In order to verify her friend's theory, she investigated pets that had recently passed away and found the lifespan of 12 dogs and 15 cats.
X (Sample of the lifespan of dog)
Y (Sample of the lifespan of cat)
In addition to these data, she also learned from a doctor in an animal hospital that the lifespan of dogs is normally distributed with standard deviation equal to 4 years and that of cat is equal to 3 years. Then she went on to test her friend's theory using all the information she collected.
Determine the null hypothesis:
Null Hypothesis: The average difference between the lifespan of dogs and cats is 5 years
Substitute the information into the formula:
Mean⁡X=11.6917, Mean⁡Y=10.2333, β=5, σ1=4, σ2=3, N1=10, N2=15
Compute the p-value:
Draw the conclusion:
This statistical test provides evidence that the null hypothesis is false, so we reject the null hypothesis.
Download Help Document
What kind of issue would you like to report? (Optional)