A contingency table is a statistical table that displays the frequencies of data elements according to defined categorical variables. The table consists of columns and rows which each represent a separate categorical variable and is used to display frequency relationships between two separate categorical variables. Often in the margins there are also totals of each row or column that are known as “marginal distributions.” Contingency tables are also commonly referred to as “two-way tables” or “crosstabulations.”
**Note that the contingency table to the right has two rows and two columns representing each categorical variable. Where the rows and columns intersect there exists a numerical value representing frequencies of elements that fall under each variable. There also are marginal distributions.**
Ways contingency tables can be particularly useful:
- easy to view and analyze data
- allows for simple comparisons between categories
- can contain multiple categorical variables
- simple to calculate conditional distributions
Contingency tables can often be misused if there exists relationships between rows and columns and thus they are not independent of one another. One way in which this can be determined is by using the chi-squared test which can be explained in correspondence the example above here.