A contingency table is a statistical tool that organizes and displays the frequencies of different outcomes for two or more categorical variables. Typically represented in a matrix format, the rows and columns of the table correspond to the different categories of each variable, allowing for a clear comparison of their relationships.
For instance, in a study analyzing the relationship between gender and preference for a product, a contingency table would show the number of males and females who prefer or do not prefer the product. This helps in identifying patterns or associations between the variables. The values within the cells of the table represent the counts or frequencies of observations that fall into the respective categories.
Contingency tables are particularly useful for conducting tests of independence, such as the Chi-square test, which assesses whether the distribution of one variable is independent of the distribution of another. By analyzing the data in a contingency table, researchers can derive insights about the interactions between different categorical variables, making it a fundamental tool in fields such as social sciences, marketing, and healthcare analytics.