Two-Way Table vs Frequency Table

Both terms below come up in the same part of the course, and students mix them up. Here is each one defined on its own, side by side, so you can see where they part company.

Two-way table

Graphs and displays

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 nn. Every individual lands in exactly one cell, so the cells add back to nn.

Take 450 applicants to two programs, cross-classified by sex and by admission decision within each program.

ProgramMen admittedWomen admitted
A80 of 10045 of 50
B10 of 10040 of 200
Both90 of 20085 of 250

Collapsed over program, men were admitted at 90/200=0.4590 / 200 = 0.45 and women at 85/250=0.3485 / 250 = 0.34, 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.

Full entry for two-way table

Frequency table

Graphs and displays

A frequency table lists the categories or value ranges of a variable alongside the count of observations in each.

A frequency table pairs each category, or each class interval, with the number of observations in it. The counts add to nn. A relative frequency column divides each count by nn and adds to 1. The table is the numeric form of a bar graph or a histogram and holds exactly the same information, which is why the table is usually the more precise thing to report.

Thirty exam scores fall into the classes 60 to 70, 70 to 80, 80 to 90 and 90 to 100 with counts 4, 9, 12 and 5, under the usual rule that a class holds values at or above its lower bound and below its upper one. The relative frequency of the 80 to 90 class is 12/30=0.4012 / 30 = 0.40. Estimating the mean from the table means assuming every score sits at its class midpoint: 65(4)+75(9)+85(12)+95(5)30=243030=81\frac{65(4) + 75(9) + 85(12) + 95(5)}{30} = \frac{2430}{30} = 81.

The wrong sentence is "the mean is (4+9+12+5)/4=7.5(4 + 9 + 12 + 5)/4 = 7.5." That averages the counts. The 7.5 is the average number of students per class interval, not the average score. One column says how many and the other says how much, and only the second one is the variable.

Grouping is where the information goes. That 81 is an estimate, not the mean. Had every score sat at the bottom of its class the mean would be 76, and at the top of its class it would be 86, so the table pins the true mean only to somewhere between 76 and 86. No further arithmetic on the table narrows that, because the individual values are gone. An ungrouped table, one row per distinct value, keeps them.

For a categorical variable there is no mean to estimate at all, so the table supports the mode and the proportions and stops there. Tables for one categorical variable are topic 1.3.

Full entry for frequency table

Where each one fits in the course