A two-way table sorts data by two categories at once: one runs across the columns, the other down the rows. Each inner cell is a count of items that match both labels — its row label and its column label. The totals sit in the margins: a Total column on the right adds up each row, a Total row along the bottom adds up each column.
Suppose we ask every pupil in a class whether they walk, take the bus, or come by car, and we split that by boys and girls. One category (travel) goes across, the other (boys/girls) goes down:
| Walk | Bus | Car | Total | |
|---|---|---|---|---|
| Boys | 8 | 5 | 2 | 15 |
| Girls | 6 | 7 | 2 | 15 |
| Total | 14 | 12 | 4 | 30 |
Read across the boys' row: