Skip to content

Business Mathematics and Statistics · Ch 8 — Sampling Techniques and Statistical Inference

Chi-Square Test for Independence of Attributes

8

Chi-Square Test for Independence of Attributes

The chi-square (χ2\chi^2) 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 OO, with attribute-1 categories as rows and attribute-2 categories as columns.

Under the null hypothesis H0H_0: the two attributes are independent, the expected frequency for each cell is calculated as:

E=Row Total×Column TotalGrand TotalE = \dfrac{\text{Row Total} \times \text{Column Total}}{\text{Grand Total}}

The test statistic compares the observed and expected frequencies, cell by cell:

χ2=∑(O−E)2E\chi^2 = \sum \dfrac{(O - E)^2}{E}

summed over every cell of the table. This statistic is compared against the critical value of χ2\chi^2 for the appropriate degrees of freedom, df=(r−1)(c−1)df = (r-1)(c-1), where rr is the number of rows and cc the number of columns, at the chosen level of significance. Some commonly used critical values:

Degrees of freedom5% significance1% significance
13.8416.635
25.9919.210
37.81511.345

Decision rule: if the calculated χ2\chi^2 exceeds the critical value, reject H0H_0 — the two attributes are associated (not independent); if the calculated value is less than the critical value, do not reject H0H_0 — the sample gives no evidence of association, and the attributes may be treated as independent. …

Definition 1Contingency Table

A two-way table of observed frequencies cross-classifying two categorica …

Definition 2Chi-square Test of Independence

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 ( …