Using Two-Way Tables
for Probability
Organize two categories at once, then read the table as a sample space to find probabilities and test for independence.
What Is a Two-Way Table?
A two-way frequency table sorts each object by two categories at once. One category labels the rows, the other labels the columns, and each cell counts the objects that share both traits.
A Real Example
We surveyed 100 students about their favorite subject. Each student is classified by grade level (rows) and favorite subject (columns).
| Math | Science | English | Total | |
|---|---|---|---|---|
| 10th Grade | 18 | 20 | 12 | 50 |
| 11th Grade | 15 | 14 | 21 | 50 |
| Total | 33 | 34 | 33 | 100 |
Three Kinds of Frequencies
The Table Is a Sample Space
To find a probability, divide the relevant count by the total. The grand total is the denominator for any "out of everyone" probability.
Conditional Probability
"Given" restricts the sample space to one row or one column. Read \( P(A \mid B) \) as "probability of \(A\), given \(B\)."
Testing for Independence
Two events \(A\) and \(B\) are independent when knowing one does not change the chance of the other. The formal test:
Marginal vs Conditional
| Marginal \(P(A)\) | Conditional \(P(A\mid B)\) | |
|---|---|---|
| Sample space | Everyone | Only group \(B\) |
| Denominator | Grand total | Marginal total of \(B\) |
| Question form | "What is \(P(A)\)?" | "\(P(A)\) given \(B\)?" |
| Table region | A margin total | One row or column |
A Four-Step Approach
Worked Example: Marginal
Find \( P(\text{11th grade}) \) for a randomly chosen student.
| Math | Science | English | Total | |
|---|---|---|---|---|
| 10th Grade | 18 | 20 | 12 | 50 |
| 11th Grade | 15 | 14 | 21 | 50 |
| Total | 33 | 34 | 33 | 100 |
Worked Example: Conditional
Find \( P(\text{English} \mid \text{11th grade}) \).
| Math | Science | English | Total | |
|---|---|---|---|---|
| 10th Grade | 18 | 20 | 12 | 50 |
| 11th Grade | 15 | 14 | 21 | 50 |
| Total | 33 | 34 | 33 | 100 |
Worked Example: Independence
Are "Science" and "10th grade" independent? Compare the conditional to the marginal.
Common Mistakes
Summary Cheat Sheet
| You want... | Numerator | Denominator |
|---|---|---|
| \( P(A) \) | Marginal of \(A\) | Grand total |
| \( P(A \text{ and } B) \) | Joint cell | Grand total |
| \( P(A \mid B) \) | Joint cell | Marginal of \(B\) |
| Independence? | Check \( P(A\mid B) = P(A) \) | |
Question 1 of 5
From the survey of 100 students, what is \( P(\text{Math}) \) for a randomly chosen student? (Math marginal = 33)
Question 2 of 5
10th grade has 50 students; 18 chose Math. What is \( P(\text{Math} \mid 10\text{th grade}) \)?
Question 3 of 5
Which cell of a two-way table gives a joint frequency?
Question 4 of 5
\( P(\text{Science}) = 0.34 \) and \( P(\text{Science} \mid 11\text{th grade}) = \frac{14}{50} = 0.28 \). What can you conclude?
Question 5 of 5
For independent events, what should be true about \( P(A \mid B) \) and \( P(A) \)?