In: Statistics and Probability
Lets apply the Chi-square Test of Independence to our example where we have as random sample of 500 U.S. adults who are questioned regarding their political affiliation and opinion on a tax reform bill. We will test if the political affiliation and the opinion on a tax reform bill are dependent at a 5% level of significance. The observer contingency table is given below. Also we often want to include each cell's expected count and contribution to the Chi-square test statistic which can be done by the software
favor | indifferent | total | |
democrat | 138 | 83 | 285 |
republican | 64 | 67 | 215 |
total | 202 | 150 | 500 |
Solution:
i)
We have to check dependent or independent of two variables Political Affiliation and Opinion on Tax Reform.
Doing a Chi-square test we have to check.
The null and alternative hypothesis is
H0: There is independence between Political Affiliation and Opinion on Tax Reform.
H1: There is the dependency between Political Affiliation and Opinion on Tax Reform.
ii)
Test statistic is
O: Observed frequency
E: Expected frequency.
E = ( Row total*Column total) / Grand total
Degrees of freedom = ( Number of rows - 1)*(Number of columns - 1)
= ( 2 - 1 ) ( 3 - 1 ) = 1 2 = 2
Level of significance = 0.01
Critical value = 9.210 ( Using chi-square table)
Test statistic > Critical value we reject null hypothesis.
Conclusion: There is the dependency between Political Affiliation and Opinion on Tax Reform.