here

advertisement
Test for Independence Solution #2
The null hypothesis: There is no difference in who males and females vote for.
The alternative hypothesis: There is a difference between who males and females
vote for.
Table converting percentages to counts
Candidate A
Male
44
96 x .44 = 42.24
Female
53
104 x .53 = 55.12
Table with counts and totals
Candidate A
Males
42
Females
55
97
Total
Candidate B
33
96 x .33 = 31.68
14
104 x .14 = 14.56
Candidate B
32
15
47
Candidate C
23
96 x .23 = 22.08
33
104 x .33 = 34.32
Candidate C
22
34
56
Total
96
104
200
Calculate expected frequencies
Eij = RiCj
N
E11 = (96)(97)
200
E13 = (96)(56)
200
E22 = (104)(47)
200
E11 = 9312
200
E13 = 5376
200
E22 = 4888
200
E11 = 46.56
E13 = 26.88
E22 = 24.44
E12 = (96)(47)
200
E21 = (104)(97)
200
E23 = (104)(56)
200
E12 = 4512
200
E21 = 10088
200
E23 = 5824
200
E12 = 22.56
E21 = 50.44
E23 = 29.12
1
Table with expected and observed frequencies
Candidate A
Candidate B
Males
42
32
(47)
(22)
Females
55
15
(51)
(24)
97
47
Total
Candidate C
22
(27)
34
(29)
56
Total
96
104
200
The expected frequency for males voting for Candidate B was rounded down (to 22 from
22.56) and the expected frequency for females voting for Candidate A was rounded up
(to 51 from 50.44). This is because of “selected rounding” which is used so the total
number of expected frequencies is the same as the number of observed frequencies.
Calculate chi-square
2 =  (O-E)2
E
2 = (42-47)2 + (32-22)2 + (22-27)2 + (55-51)2 + (15-24)2 + (34-29)2
47
22
27
51
24
29
2 = 25 + 100 + 25 + 16 + 81 + 25
47 22 27 51 24 29
2 = 0.53 + 4.55 + 0.93 + 0.31 + 3.38 + 0.86
2 = 10.56
df = (Ncolumns – 1)(Nrows – 1) = (3-1)(2-1) = (2)(1) = 2
p = 0.05, so our critical value with df = 2 is 5.99
Our obtained value is 10.56, which is greater than 5.99, so we reject our null hypothesis.
 Our study shows that both males and females prefer to vote for Candidate A.
2
Download