Chi-square test of independence
Testing whether two categorical factors are related, such as defect type and production line.
The chi-square test of independence checks whether two classifications are related. Arrange counts in a table (for example, defect type by production line) and compare each cell with the count expected if the two were unrelated:
Reading the result
A small p-value says the distribution of one factor depends on the other. Look at which cells contribute most to the statistic, or at the standardized residuals, to see where the relationship lies.
Example uses
- Are some defect types concentrated on one line?
- Does pass rate depend on supplier?
- Do complaint categories differ by region?
Cautions
- Expected counts should be at least about 5 in most cells. For small 2-by-2 tables, use Fisher's exact test.
- Each unit should be counted once. Counting the same part in two cells breaks the test.
- Association is not cause. A line may show more scratches because it runs the parts that scratch easily.
Stat > Crosstabs with chi-square, Fisher's exact test and cell contributions.
See also
References
- Agresti, A. An Introduction to Categorical Data Analysis. Wiley.