where
is the ith row total and
is the jth
column total.
EXAMPLE: Each of 250 job applicants at a large firm was classified in two ways: (1) whether or not they got a job offer; and (2) their ethnic group.
Do the data indicate that receiving a job offer is independent of the ethnicity of the applicant? We obtain the following output from Stataquest:
| col
row| 1 2 3 | Total
-----------+-------------------------+-------
1 | 24 13 18 | 55
2 | 124 39 32 | 195
-----------+-------------------------+-------
Total| 148 52 50 | 250
Pearson chi2(2) = 8.8688 Pr = 0.012