In: Math
The government conducts a survey of the population and finds that 208 of 681 respondents report voting for party A last election, and 284 of 512 respondents report voting for party A for the next election. If you are conducting a hypothesis testing with a null hypothesis of p1=p2{"version":"1.1","math":"<math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi>p</mi><mn>1</mn></msub><mo>=</mo><msub><mi>p</mi><mn>2</mn></msub></math>"}, calculate p{"version":"1.1","math":"<math xmlns="http://www.w3.org/1998/Math/MathML"><menclose notation="top"><mi>p</mi></menclose></math>"} .
Solution:-
State the hypotheses. The first step is to state the null hypothesis and an alternative hypothesis.
Null hypothesis: P1 = P2
Alternative hypothesis: P1
P2
Note that these hypotheses constitute a two-tailed test.
Formulate an analysis plan. For this analysis, the significance level is 0.05. The test method is a two-proportion z-test.
Analyze sample data. Using sample data, we calculate the pooled sample proportion (p) and the standard error (SE). Using those measures, we compute the z-score test statistic (z).
p = (p1 * n1 + p2 *
n2) / (n1 + n2)
p = 0.41241
SE = sqrt{ p * ( 1 - p ) * [ (1/n1) + (1/n2)
] }
SE = 0.02879
z = (p1 - p2) / SE
z = - 8.66
where p1 is the sample proportion in sample 1, where p2 is the sample proportion in sample 2, n1 is the size of sample 1, and n2 is the size of sample 2.
Since we have a two-tailed test, the P-value is the probability that the z-score is less than -8.66 or greater than 8.66.
Thus, the P-value = less than 0.001.
Interpret results. Since the P-value (almost 0) is less than the significance level (0.05), we cannot accept the null hypothesis.
From the above test we have sufficient evidence in the favor of the claim that two proportions are different.