given data table is
|
group 1 |
group 2 |
yes |
711 |
263 |
no |
1159 |
313 |
calculating row and column total or sum
|
group 1 |
group 2 |
TOTAL |
yes |
711 |
263 |
974 |
no |
1159 |
313 |
1472 |
TOTAL |
1870 |
576 |
2446 |
For expected count, take sum of each row and column
then multiply the row and column total for individual value and
divide by the grand total, we get
Table for expected count |
group 1 |
group 2 |
yes |
(1870*974)/2446 = 744.636 |
(576*974)/2446 = 229.364 |
no |
(1870*1472)/2446 = 1125.364 |
(576*1472)/2446 = 346.636 |
Contribution to chi square is calculated (observed -
expected)^2/(expected)
Observed |
Expected |
Contribution |
711 |
744.636 |
(711-744.636)^2/744.636 = 1.519 |
263 |
229.364 |
(263-229.364)^2/229.364 = 4.933 |
1159 |
1125.364 |
(1159-1125.364)^2/1125.364 = 1.005 |
313 |
346.636 |
(313-346.636)^2/346.636 = 3.264 |
Chi square = 1.519 + 4.933 + 1.005 + 3.264
= 10.721