Association in 2-way contingency tables tutorial
Learn how to test for association between two categorical variables, and reorganize the categories to emphasize the pattern of association.
Snee collected data on the hair color and eye color of 592 students on a statistics course. The question is how to understand the association between the two variables. For more information see Story: Patterns of Association.
In this tutorial you will perform the following tasks:
- Cross tabulation of the data
Create a contingency table and test the hypothesis of independence. - Displaying patterns of association
Add a mosaic plot to display the pattern of association. - Reordering data
Reorder the categories to emphasize the pattern and uncover the relationship.