Business Mathematics and Statistics · Ch 8 — Sampling Techniques and Statistical Inference
Chi-Square Test for Independence of Attributes
Chi-Square Test for Independence of Attributes
The chi-square () test of independence examines whether two categorical (qualitative) attributes observed on the same set of units are statistically independent of each other, or whether they are associated. The data are arranged in a two-way contingency table of observed frequencies , with attribute-1 categories as rows and attribute-2 categories as columns.
Under the null hypothesis : the two attributes are independent, the expected frequency for each cell is calculated as:
The test statistic compares the observed and expected frequencies, cell by cell:
summed over every cell of the table. This statistic is compared against the critical value of for the appropriate degrees of freedom, , where is the number of rows and the number of columns, at the chosen level of significance. Some commonly used critical values:
| Degrees of freedom | 5% significance | 1% significance |
|---|---|---|
| 1 | 3.841 | 6.635 |
| 2 | 5.991 | 9.210 |
| 3 | 7.815 | 11.345 |
Decision rule: if the calculated exceeds the critical value, reject — the two attributes are associated (not independent); if the calculated value is less than the critical value, do not reject — the sample gives no evidence of association, and the attributes may be treated as independent. …
A two-way table of observed frequencies cross-classifying two categorica …
A test that checks whether two categorical attributes are statistically independent, using chi-square = sum (O-E)^2/E compared against a critical value with ( …