Categorical data sort observations into labels such as study method or completion status. A two-way table organizes two categorical variables at once, making overall, joint, marginal, and conditional probabilities visible from the same counts.
Learning objectives
- Identify cells, row totals, column totals, marginal frequencies, and the grand total.
- Calculate joint and marginal probabilities using the grand total.
- Calculate conditional probabilities using the given row or column as the restricted sample space.
- Convert table counts into overall or conditional relative frequencies.
- Complete missing entries and compare conditional rates accurately.
Two-way contingency tables
- Two-way contingency table
- A table that displays counts or relative frequencies for combinations of two categorical variables. One variable defines the rows and the other defines the columns.
| Study method / Assignment result | Completed | Not completed | Total |
|---|---|---|---|
| Digital | 42 | 8 | 50 |
| Paper | 31 | 14 | 45 |
| Mixed | 47 | 8 | 55 |
| Total | 120 | 30 | 150 |
| Table part | Meaning | Example from the table |
|---|---|---|
| Interior cell | Count satisfying one row and one column category | \(42\) digital students completed |
| Row total | Total for one study-method category | Digital total \(=42+8=50\) |
| Column total | Total for one result category | Completed total \(=120\) |
| Grand total | Total number of observations | Grand total \(=150\) |
Marginal and joint probabilities
Which count belongs in the numerator?
Marginal probability
Use a row or column total divided by the grand total when only one category is named.
Joint probability
Use one interior intersection cell divided by the grand total when the event says category A AND category B.
Marginal probability
Using the study-method table, what is the probability that a selected student completed the assignment?
- Use the column total
The completed column total is \(120\).
- Use the grand total
There are \(150\) students overall, so \(P(\text{completed})=120/150=4/5\).
Joint probability
What is the probability that a selected student used paper AND did not complete the assignment?
- Find the intersection
The paper/not-completed cell contains \(14\).
- Divide by everyone
A joint probability from the full table uses the grand total: \(14/150=7/75\).
Conditional probability: GIVEN creates a new denominator
The vertical bar is read as 'given.' The event after the bar defines the restricted sample space.
Selected condition: Given that the student used paper, restrict the sample space to the Paper row. The Completed cell is the intersection.
| Study method / Assignment result | Completed | Not completed | Total |
|---|---|---|---|
| Digital | 42 | 8 | 50 |
| Paper | 31 | 14 | 45 |
| Mixed | 47 | 8 | 55 |
| Total | 120 | 30 | 150 |
Read P(A | B) from a table
- Read the condition
Locate \(B\), the category after the vertical bar or the words 'given that.'
- Restrict the table
Use the \(B\) row or column total as the new denominator.
- Find the intersection
Within the restricted group, locate the count that also satisfies \(A\).
- Divide
Compute intersection count divided by condition total and simplify.
Conditional probability from a row
Given that a student used paper, what is the probability the assignment was completed?
- Condition total
The Paper row contains \(45\) students, so \(45\) is the denominator.
- Intersection
Among those students, \(31\) completed the assignment.
Relative frequencies and percentages
| Study method | Completed | Not completed | Overall row percentage |
|---|---|---|---|
| Digital | \(42/150=28\%\) | \(8/150\approx5.3\%\) | \(50/150\approx33.3\%\) |
| Paper | \(31/150\approx20.7\%\) | \(14/150\approx9.3\%\) | \(45/150=30\%\) |
| Mixed | \(47/150\approx31.3\%\) | \(8/150\approx5.3\%\) | \(55/150\approx36.7\%\) |
| Overall | \(120/150=80\%\) | \(30/150=20\%\) | \(100\%\) |
Missing values and comparing rates
Recover a missing cell
A row total is \(64\). Its first two cells are \(19\) and \(27\). What is the missing third cell?
- Use the row equation
The cells must sum to the row total: \(19+27+x=64\).
- Subtract known cells
\(x=64-19-27=18\).
Common mistakes and traps
- Using the grand total as the denominator after the question says 'given.'
- Reversing \(P(A\mid B)\) and \(P(B\mid A)\).
- Using a joint cell where a marginal row or column total is required.
- Adding row or column totals that already overlap at the grand total.
- Reading an overall percentage as though it were conditional within one group.
- Comparing group counts instead of group rates when group sizes differ.
- Treating category labels as numerical measurements simply because they appear in a table.
Choose the denominator
Using the study-method table, what is \(P(\text{mixed}\mid\text{not completed})\)?
- \(8/150\)
- \(8/55\)
- \(8/30\)
- \(30/150\)
Show answer and explanation
Answer: \(8/30=4/15\)
The condition is not completed, so use the not-completed column total \(30\) as the denominator.
What to remember
- Interior cells are joint counts; row and column totals are marginal frequencies.
- Marginal and joint probabilities from the full table use the grand total.
- The event after 'given' or after \(\mid\) defines the conditional denominator.
- Overall and conditional relative frequencies answer different questions.
- Validate every table by checking row totals, column totals, and the grand total.
Put these notes into practice
Apply the ideas with SAT-style questions, then reinforce key details with flashcards.