In: Statistics and Probability
I want to conduct the following test at the α=0.01 level of significance by determining the null and alternative hypotheses, the test statistic, and the p-value. These samples were obtained independently using simple random sampling. Test whether p1≠p2. Sample data are: x1=28, n1=255, x2=38, and n2=301
Solution :
Given that,
This is the two tailed test .
The null and alternative hypothesis is ,
H0 : P1 = P2
Ha : P1 P2
1
= x1 / n1 = 28 / 255 = 0.1098
2
= x2 / n2 = 38 / 301 = 0.1262
= (x1 + x2) / (n1 + n2)
= (28 + 38) / (301 + 255) = 0.1187
1 -
= 0.8813
Z = (1
-
1) /
* (1 -
) (1 / n1 + 1 / n2)
Z = (0.1098 - 0.1262) /
0.1187 * 0.8813 (1 / 255 + 1 / 301)
Z = -0.597
Test statistic = -0.597
P(z < -0.597) = 0.2753
P-value = 2 * 0.2753 = 0.5506