In: Statistics and Probability
A political researcher wishes to know if political affiliation and age are related. He has collected data on 380380 persons in three age categories. Is there evidence that age and political affiliation are related?
Age | Democrat | Republican | Independent | Total |
---|---|---|---|---|
1818-3131 | 4646 | 4949 | 2626 | 121121 |
3232-5151 | 5656 | 5555 | 3131 | 142142 |
5252-6868 | 4646 | 4646 | 2525 | 117117 |
Total | 148148 | 150150 | 8282 | 380380 |
Copy Data
Step 4 of 8:
Find the value of the test statistic. Round your answer to three decimal places
Let denote the observed and expected frequencies in the given cells of the cross tab data. Here, Ei, i = 1,2,..,n are the cell frequencies we would have obtained when the variables Political affiliation and Age were independent.
We are asked to test whether the observed frequencies are the same as what is expected.
To test:
H0: There is no association between political affiliation and age Vs Ha: There is a significant association between political affiliation and age
Vs
The appropriate statistical test to test the existence of relationship between the two categorical variables would be a Chi-square test of Association, where we test whether the observed distribution is the same as the expected. The test statistic is given by:
where r = No. of rows and c = No. of columns; with rejection region of the test given by,
Here, r = 3 and c = 3.
To obtain the expected frequency off a cell, we may divide the product of its corresponding row and column totals by the grand total:
Age | Democratic | Republican | Independent |
18-31 | (148x121)/380 = 47.126 | (150x121)/380 = 47.763 | (82x121)/380 = 26.111 |
32-51 | (148x142)/380 = 55.305 | (150x142)/380 = 56.053 | (82x142)/380 = 30.642 |
52-68 | (148x117)/380 = 45.568 | (150x117)/380 = 46.184 | (82x117)/380 =25.247 |
Substituting the values in the test statistic:
Oi | Ei | (Oi-Ei)2 | (Oi-Ei)2 / Ei |
46 | 47.126 | 1.268 | 0.027 |
56 | 55.305 | 0.483 | 0.009 |
46 | 45.568 | 0.187 | 0.004 |
49 | 47.763 | 1.530 | 0.032 |
55 | 56.053 | 1.109 | 0.020 |
46 | 46.184 | 0.034 | 0.001 |
26 | 26.111 | 0.012 | 0.000 |
31 | 30.642 | 0.128 | 0.004 |
25 | 25.247 | 0.061 | 0.002 |
0.099 |
Hence, the test statistic obtained is:
0.099