Chi-Square Tests of Independence and Homogeneity
Apply the chi-square statistic to two-way contingency tables: the test of independence (one sample, two categorical variables) and the test of homogeneity (several samples, one categorical variable). Both tests use the same expected counts, test statistic, and degrees of freedom; only the sampling design and hypotheses differ.
Step 1 of 157%
Tutorial
Testing Independence of Two Categorical Variables
The chi-square test of independence assesses whether two categorical variables measured on the same sample of subjects are statistically independent. The data are organized in an contingency table of observed counts .
The hypotheses are
Under , the expected count in cell is
where is the th row total, is the th column total, and is the grand total.
For example, consider the table
The expected count in cell is