Student/Statistics/TwoSampleZTest/overview - Maple Help

Student[Statistics][TwoSampleZTest] Overview

overview of the Two Sample Z-Test

Description

 • 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:
 1 The two populations studied are assumed to be normally distributed.
 2 The two standard deviations of the two populations are known.
 • The formula is:

$Z=\frac{\mathrm{Mean}\left(X\right)-\mathrm{Mean}\left(Y\right)-\mathrm{\beta }}{\sqrt{\frac{{\mathrm{\sigma }}_{1}^{2}}{{N}_{1}}+\frac{{\mathrm{\sigma }}_{2}^{2}}{{N}_{2}}}}$

 where $X$ is the sample drawn from the first population, $Y$ is the sample drawn from the second population, $\mathrm{\beta }$ is the test value of the difference, ${\mathrm{\sigma }}_{1}$ is the known standard deviation of the first population, ${\mathrm{\sigma }}_{2}$ is the known standard deviation of the second population, ${N}_{1}$ is the sample size of $X$, and ${N}_{2}$ is the sample size of $Y$.
 When ${N}_{1}$ and ${N}_{2}$ are sufficiently large, $Z$ is approximately $\mathrm{Normal}\left(0,1\right)$.

Example

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) Dog Lifespan(years) Cat Lifespan(years) 1 5.3 1 8.4 2 13.6 2 10.7 3 15 3 9.5 4 14 4 9.8 5 11 5 13 6 9.4 6 8.6 7 12.2 7 12 8 12.8 8 8 9 13.8 9 10.5 10 10 10 6.4 11 8.5 11 12.7 12 15.5 12 6.8 13 15 14 11 15 11.1

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.

 1 Determine the null hypothesis:
 Null Hypothesis: The average difference between the lifespan of dogs and cats is 5 years
 2 Substitute the information into the formula:
 $\mathrm{Mean}\left(X\right)=11.6917$,  $\mathrm{Mean}\left(Y\right)=10.2333$,  $\mathrm{\beta }=5$, ${\mathrm{\sigma }}_{1}=4$,  ${\mathrm{\sigma }}_{2}=3$,  ${N}_{1}=10$,  ${N}_{2}=15$
 $z=\frac{\left(\left(11.69167-10.23333\right)-5\right)}{\sqrt{\left(\frac{{4}^{2}}{12}+\frac{{3}^{2}}{15}\right)}}=-2.54715$
 3 Compute the p-value:
 $p-\mathrm{value}=\mathrm{Probability}\left(|Z|>|-2.54715|\right)=\mathrm{Probability}\left(Z<-2.54715\right)+\mathrm{Probability}\left(Z>2.54715\right)=0.0108607$,     $Z˜\mathrm{Normal}\left(0,1\right)$
 4 Draw the conclusion:
 This statistical test provides evidence that the null hypothesis is false, so we reject the null hypothesis.