Contingency table
A contingency table cross-tabulates counts of observations by two categorical variables at once, the source for computing joint, marginal and conditional proportions.
See it move
A retailer cross-tabulates 250 customers by region and payment method: 90 pay by card and 60 pay cash in the North, 70 pay by card and 30 pay cash in the South. The row and column margins, 150 North, 100 South, 160 card, 90 cash, give each category's total on its own.
The formula
Variables
- Expected count in row i, column j
- Total of row i
- Total of column j
- Grand total of all observations
Gives the expected count in a contingency table cell if the two variables were independent, for comparison against the observed count.
Check yourself
A table of 300 shoppers cross-tabulates membership (Member / Non-member) against channel (Online / In-store): Member-Online = 80, Member-In-store = 70, Non-member-Online = 60, Non-member-In-store = 90. Under the assumption that membership and channel are independent, what is the expected count for Member-Online?