In: Statistics and Probability
12. Political Party Affiliation and Class level
Freshman Sophomore Junior Senior Total
Democrat 1 4 5 3 13
Republican 4 8 4 2 18
Green 1 3 3 2 9
Libertarian 1 1 2 1 5
Peace/Freedom 2 3 3 2 10
Total 6 15 12 7 55
Perform a hypothesis test to determine whether there is an association between class levels and political party affiliation.
Assume a level of significance to be 5%
Chi-Square Independence test - Results |
(1) Null and Alternative Hypotheses The following null and alternative hypotheses need to be tested: H0: The two variables - class levels and political party affiliation are independent Ha: The two variables - class levels and political party affiliation are dependent This corresponds to a Chi-Square test of independence. (2) Degrees of Freedom The number of degrees of freedom is df = (5 - 1) * (4 - 1) = 12 (3) Critical value and Rejection Region Based on the information provided, the significance level is α=0.05, the number of degrees of freedom is df = (5 - 1) * (4 - 1) = 12, so the critical value is 21.0261. Then the rejection region for this test becomes R={χ2:χ2>21.0261}. (4)Test Statistics The Chi-Squared statistic is computed as follows: (5)P-value The corresponding p-value for the test is p=Pr(χ2>3.7892)=0.9869 (6)The decision about the null hypothesis Since it is observed that χ2=3.7892<χ2_crit=21.0261, it is then concluded that the null hypothesis is NOT rejected. (7)Conclusion It is concluded that the null hypothesis Ho is NOT rejected. Therefore, there is NOT enough evidence to claim that the two variables - class levels and political party affiliation are dependent, at the 0.05 significance level. Conditions: a. The sampling method is simple random sampling. b. The data in the cells should be counts/frequencies c. The levels (or categories) of the variables are mutually exclusive. |
Let me know in the comments if anything is not clear. I will reply ASAP! Please do upvote if satisfied!