In: Statistics and Probability
use the following contingency table
a | b | c | total | |
1 | 15 | 30 | 45 | 90 |
2 | 40 | 45 | 50 | 135 |
total | 55 | 75 | 95 | 225 |
a. compute the expected frequency for each cell
b. compute x^2stat. is it significant at a=0.01
Solution:
Here, we have to use chi square test for independence of two categorical variables.
Null hypothesis: H0: Two variables are independent.
Alternative hypothesis: Ha: Two variables are dependent.
We assume level of significance = α = 0.01
Test statistic formula is given as below:
Chi square = ∑[(O – E)^2/E]
Where, O is observed frequencies and E is expected frequencies.
E = row total * column total / Grand total
We are given
Number of rows = r = 2
Number of columns = c = 3
Degrees of freedom = df = (r – 1)*(c – 1) = 1*2 = 2
α = 0.01
Critical value = 9.21034
(by using Chi square table or excel)
Calculation tables for test statistic are given as below:
Observed Frequencies |
||||
Column variable |
||||
Row variable |
a |
b |
c |
Total |
1 |
15 |
30 |
45 |
90 |
2 |
40 |
45 |
50 |
135 |
Total |
55 |
75 |
95 |
225 |
(Part a answer)
Expected Frequencies |
||||
Column variable |
||||
Row variable |
a |
b |
c |
Total |
1 |
22 |
30 |
38 |
90 |
2 |
33 |
45 |
57 |
135 |
Total |
55 |
75 |
95 |
225 |
Calculations |
||
(O - E) |
||
-7 |
0 |
7 |
7 |
0 |
-7 |
(O - E)^2/E |
||
2.227273 |
0 |
1.289474 |
1.484848 |
0 |
0.859649 |
Test Statistic = Chi square = ∑[(O – E)^2/E] = 5.861244
(Part b answer)
χ2 statistic = 5.861244
P-value = 0.053364
(By using Chi square table or excel)
P-value > α = 0.01
So, we do not reject the null hypothesis
This test is not significant at α = 0.01.