When Two Categorical Variables Meet
In Frequency Tables and Relative Frequency, you learned how a frequency table organizes counts for one categorical variable. A two-way table organizes counts for two categorical variables at once. Its rows list the categories of one variable, and its columns list the categories of the other. Each inside entry tells how many individuals fall into both categories at the same time.
For example, a school might record each student’s grade and primary after-school activity. Grade is one categorical variable, and primary activity is another. A two-way table can show the number of students in each grade-and-activity combination, along with totals that summarize entire rows and columns.
To read a cell, find the row category and the column category, then locate where that row and column intersect. A cell is not the total for the whole row or column. Those totals are placed at the ends of the rows or the bottom of the columns. The count in the bottom-right corner, when shown, is the grand total: the number of individuals represented throughout the table.
A Two-Way Table of 200 Students
The following fictional table summarizes the primary after-school activity reported by 200 students. Each student is counted once, in one grade and one activity category. The activity categories are intended to cover all responses in this example.
| Grade | Sports | Arts | Neither | Row total |
|---|---|---|---|---|
| Grade 9 | 28 | 18 | 14 | 60 |
| Grade 10 | 26 | 17 | 12 | 55 |
| Grade 11 | 22 | 15 | 13 | 50 |
| Grade 12 | 16 | 11 | 8 | 35 |
| Column total | 92 | 61 | 47 | 200 |
The two variables appear along the table’s edges. The row labels give grades; the column labels give activity categories. For instance, the cell where Grade 10 and Arts meet contains 17. That is the count for students who are both in Grade 10 and in the Arts category. It is not the number of all Grade 10 students and not the number of all students in Arts.
The number at the end of the Grade 10 row is 55. It is the row total, found by adding the counts across that row: \(26+17+12=55\). The number at the bottom of the Arts column is 61. It is the column total, found by adding the counts down that column: \(18+17+15+11=61\). The grand total, 200, counts all students represented in the table.
The layout matters when describing a count. A useful sentence names both categories for an inside cell, one category for a row or column total, and the whole group for the grand total. As in Writing a Complete Variable Classification Answer, be specific about what the recorded categories mean rather than reporting an unexplained number.
How to Read and Check the Totals
When a question refers to a two-way table, first decide whether it asks about a combination of categories or a whole category. A combination points to one inside cell. A whole row or column points to its total. A question about everyone in the table points to the grand total.
Read the row and column headings so you know which categorical variables the table organizes.
For two categories together, find their intersecting cell. For one category, look for the total at the end of its row or column.
Read the entry directly, or add the relevant cell counts if a total is missing.
Verify the totals when possible, then describe what the count represents in context.
A basic check is that each row total equals the sum of its cells, and each column total equals the sum of its cells. The row totals should then add to the grand total. The column totals should also add to that same grand total. These checks help identify arithmetic or transcription errors.
Both routes give 200 in the student table. This agreement is expected because each student is counted once in exactly one row and one column category. If the two sums do not match, revisit the counts and calculations. Do not assume which number is wrong until you check the table.
Worked Examples: Finding Cells and Totals
Worked Example: Read a Cell at an Intersection
Use the table of 200 students. How many Grade 10 students are in the Arts category? State what the count means.
Locate the row: Find Grade 10. Then locate the Arts column. Their intersection contains 17.
Interpret: The cell count is 17. In context, 17 students in the table are both in Grade 10 and in the Arts category. This count describes the combination of the two categories; it is not a total for all Grade 10 students or all students in Arts.
Worked Example: Find a Row Total and a Column Total
From the same table, find the number of Grade 11 students represented and the number of students in the Sports category. Show the addition for each total.
Find the Grade 11 row total: Add the three activity counts in the Grade 11 row:
There are 50 Grade 11 students represented. This is the total for that grade across all three listed activity categories.
Find the Sports column total: Add the Sports counts for all four grades:
There are 92 students in the Sports category across the four grades. As a check, the displayed table’s row totals add to \(60+55+50+35=200\), and its column totals add to \(92+61+47=200\). Both totals agree with the grand total.
Worked Example: Find a Missing Cell Count
Suppose the Grade 12 row is partly covered, but you can still read its row total, 35, and the visible counts for Sports and Arts, 16 and 11. How many Grade 12 students are in Neither?
Use the meaning of a row total: The Grade 12 row total is the sum of its three activity counts. Let \(x\) be the missing count in the Neither cell. Then:
Solve for the missing count: The two visible counts add to 27, so:
The missing cell count is 8. In context, 8 Grade 12 students are in the Neither category. Check by adding the full row: \(16+11+8=35\), which matches its row total.
Common Mistakes and AP Exam Tips
- Reporting a cell as a total. The Grade 10–Arts cell is 17, but the Grade 10 row total is 55 and the Arts column total is 61. Read the headings before naming what a count represents.
- Adding across the wrong direction. To find a row total, add across that row. To find a column total, add down that column. Mark the requested row or column before calculating.
- Using only one category to describe a cell. A cell count involves both its row and column categories. A complete description says, for example, “17 Grade 10 students are in Arts,” not merely “17 students are in Arts.”
- Confusing a total with a cell count. The bottom-right grand total includes every cell. It is not the count for the final row category or final column category.
- Leaving out what the number counts. A full-credit response identifies the count and describes the relevant students in context. For a total, name its grade or activity category; for an inside cell, name both.
- Skipping a useful check. Confirm that row totals and column totals each add to the grand total. If they disagree, check the additions and the table entries instead of choosing one total without explanation.
The table’s arrangement can vary: one variable may be listed in rows and the other in columns, or their positions may be switched. The meanings of cells and totals do not change. Follow the labels in the table rather than assuming that grades always belong in rows or activities always belong in columns.
Check Your Understanding
Use the two-way table of 200 students to answer each question. Show addition when finding a total.
- How many Grade 9 students are in the Arts category? What two categories does this cell count combine?
- How many students are represented in the Grade 10 row? Identify this number as a cell count or a row total.
- How many students are in the Neither column across all grades? Show how the column total is calculated.
- What is the grand total, and what group does it represent?
- If the Grade 11 row total is 50 and its Sports and Arts counts are 22 and 15, find the Neither count and check the row sum.