How To Create A Contingency Table
When evaluating the relationship between two or more different items or variables from an experiment, use a contingency table. This table allows for an at-a-glance analysis of observations between the variables. The most common type of contingency table is commonly referred to as the 2x2 or 2 row and 2 column contingency table, but can have as many rows and columns as needed for variables to be evaluated.
Step 1
Start with two outcomes. In this example, we will use pass versus fail. These are the columns in the table.
Step 2
Define the group variables. In our example, these will be the classes. They will be the rows for the table.
\(Pass Fail\)
Class 1 A B Class 2 C D
Step 3
Input the numbers. Instead of A, B, C and D in our example, we'll use some fictional numbers of students who passed and failed tests. In a real contingency table, numbers will be used, not variables.
\(Pass Fail\)
Class 1 13 7 Class 2 19 1
Step 4
Tally both ends. This is called "two-tallied."
\(Pass Fail Total\)
Class 1 13 7 20 Class 2 19 1 20 Total 32 8 40
Compute the P-value. The formula is A/(A+B) – C/(C+D).
TL;DR (Too Long; Didn't Read)
If the P-value is very small, it is statistically significant and not randomly occurring.
Cite This Article
MLA
Maynard, Missi. "How To Create A Contingency Table" sciencing.com, https://www.sciencing.com/create-contingency-table-10002873/. 24 April 2017.
APA
Maynard, Missi. (2017, April 24). How To Create A Contingency Table. sciencing.com. Retrieved from https://www.sciencing.com/create-contingency-table-10002873/
Chicago
Maynard, Missi. How To Create A Contingency Table last modified March 24, 2022. https://www.sciencing.com/create-contingency-table-10002873/