Statistics & Probability
GradesGrade 8Statistics & ProbabilityTwo-Way Tables & Categorical Data

Two-Way Tables & Categorical Data

📊 Statistics & Probability
📋

Two-Way Tables & Categorical Data

Two-way tables organize categorical data for two variables — use them to spot patterns and relative frequencies.

A two-way table (also called a contingency table) displays the frequencies of two categorical variables simultaneously. Rows represent one category and columns represent another. You can analyze joint frequencies (individual cells), marginal frequencies (row and column totals), and relative frequencies (proportions).

🎓Sports preference by grade
Survey of 100 students:

           Soccer  Basketball  Total
Grade 7:     18        12       30
Grade 8:     35        35       70
Total:        53        47      100

P(soccer | grade 8) = 35/70 = 50%
P(soccer | grade 7) = 18/30 = 60%

Grade 7 students prefer soccer at a higher rate.
Relative frequency=cell counttotal count (or row/column total)\text{Relative frequency} = \frac{\text{cell count}}{\text{total count (or row/column total)}}

Reading a two-way table:

1Joint frequency: a value in any interior cell (e.g., 18 grade 7 soccer players)
2Marginal frequency: a row or column total (e.g., 53 total soccer players)
3Row relative frequency: divide each row cell by the row total
4Column relative frequency: divide each column cell by the column total
5Overall relative frequency: divide each cell by the grand total

Joint Frequency

Interior cell countsHow many items fall in BOTH categoriesExample: 35 grade-8 basketball players

Marginal Frequency

Row or column totalsHow many items are in ONE category totalExample: 70 grade-8 students total

To compare groups fairly, use relative frequencies (proportions), not raw counts — especially when group sizes differ.

💡

Remember This!

Always check that row totals and column totals add up to the grand total. If they do not, there is an error in the table.

✏️ Try It!

In a two-way table: 40 students prefer math, 60 prefer science. Of the 40 math-preferrers, 25 are in grade 7. What fraction of math-preferrers are in grade 7?

Take Quiz 📝 — 25 Questions