Skip to main content

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.

ByHoang TruongUpdated

See it move

Loading infographic...

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.

Where it fits
TopicDescriptive StatisticsCoreSubjectData Analysis & StatisticsCoreTopicCommon Significance TestsCore

The formula

LaTeX
Eij=Ri×CjNE_{ij} = \frac{R_i \times C_j}{N}

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

PracticeCORE

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?

Select an answer to check your understanding.
Contingency table — Edlintics Glossary