Two-way table
By Jude Wallis · Published
A two-way table displays counts for two categorical variables at once, with one variable's categories as rows and the other's as columns.
A two-way table, also called a contingency table, cross-classifies every individual by two categorical variables at once. Each cell holds the count of individuals in that row category and that column category. The row and column totals are the margins and the grand total is . Every individual lands in exactly one cell, so the cells add back to .
Take 450 applicants to two programs, cross-classified by sex and by admission decision within each program.
| Program | Men admitted | Women admitted |
|---|---|---|
| A | 80 of 100 | 45 of 50 |
| B | 10 of 100 | 40 of 200 |
| Both | 90 of 200 | 85 of 250 |
Collapsed over program, men were admitted at and women at , and the misreading writes itself: "45 percent of men were admitted against 34 percent of women, so the process favored men." Put the third variable back and women were admitted at the higher rate in both programs, 0.90 against 0.80 in A and 0.20 against 0.10 in B. The overall gap comes from where the applicants went, since 200 of the 250 women applied to program B, which admits few of anyone. A comparison that reverses when a lurking variable is restored is Simpson's paradox, and a collapsed two-way table is where it hides.
So a table already summed over a variable you were never shown cannot be un-summed. Neither can a table of percentages: row percentages alone give no counts, no grand total, and therefore no expected counts, so they cannot feed a chi-square test. Percentages are for reading, and counts are what the table has to store.
Two-way tables are topic 2.1, and they are the input to the chi-square test for homogeneity or independence in topics 3.14 and 3.15.
Where this comes up
- AP Stats 2.1: Two-Way TablesAP topic
- How to read a two-way table: joint, marginal, conditionalGuide
- Two-way table probability practice problemsPractice
- Chi-square two-way table practice problemsPractice
- AP Stats 2.2: Two-Way Table Summary StatsAP topic
- P(A|B) vs P(B|A): which conditional do I need?Guide
- How to check if two events are independentGuide
- How to find p-hat (the sample proportion)Guide
25 pages on the site use this term.
More graphs and displays terms, or browse the full statistics glossary.