In computing, a contingency table (also known as a cross-tabulation or crosstab) is a type of table in a matrix format that displays the (multi-dimensional) frequency distribution of the variables. It is a useful tool for organizing and understanding a large set of data, and for testing out hypotheses about the underlying structure of that data.
Contingency tables are used in a number of related disciplines such as survey research, medicine, genetics, and market research. In survey research, contingency tables help identify relationships between variables, such as the link between gender and brand preference. In genetics, tables aid research into genealogical relationships between members of a family. In market research, they are used to identify customer preferences in terms of product types, feature sets, etc.
A contingency table is a cross-tabulation of two or more categorical variables (factors or treatments) and their frequencies, graphically displaying the counts (frequencies or percentages) of various combinations of those variables.
A contingency table can be used to identify significant trends and patterns in data as well as spot potential outliers or otherwise unexpected results. It is also useful for analyzing large data sets or those with many variables, as it provides a visual representation of the data in one space. It is also useful in determining the dependence between two associated variables.
In web analytics, a contingency table is used when trying to identify which of two variables is driving the traffic to a particular website or application. For example, a web analyst might use a contingency table to investigate the contribution of organic and paid sources of traffic to the website.
Overall, contingency tables are a great way to look for patterns that may exist among two different variables and are critical for working with large datasets in any discipline.