How it works
A two-way table sorts the same group two ways at once: rows for one question, columns for another, with totals at the edges.
- P(A): the A total ÷ the grand total.
- P(A and B): the one cell where A and B meet ÷ the grand total.
- P(A | B), read "the probability of A given B": you already know B happened, so only the B row or column counts. Divide the cell by the B total, not the grand total.
Example: 40 of 100 people are adults, and 10 of those adults own a bike. P(bike | adult) = = , but P(adult and bike) = = .
Independent events: A and B are independent when P(A | B) = P(A): knowing B tells you nothing about A.
Multiplication rule: P(A and B) = P(A) × P(B | A). Picking twice with replacement, the second pick has the same chances as the first; without replacement, one fewer item is left, so subtract 1 from the count and from the total.
Worked example
| Grade | Online | In person | Total |
|---|---|---|---|
| 9th grade | 29 | 5 | 34 |
| 10th grade | 31 | 5 | 36 |
| 11th grade | 23 | 55 | 78 |
| Total | 83 | 65 | 148 |
- The group is the students who prefer online classes: 83 in all, and 29 of them are in 9th grade.
- 29 ÷ 83 = 0.3494.
- As a percent: 34.94%, which rounds to 35%.
Answer: 35
Common mistakes
- Dividing by the grand total after "given". 200 people, 60 women, 15 women walk to work. P(walks | woman) = 15/60 = 1/4. "Given" shrinks the group to the row total, not 200.
- Using the column total instead of the row. If 40 people walk, 15/40 is P(woman | walks), a different question. Check which group the word "given" or "of the" names.
- Using a row total for "and". "Woman and walks" is one cell out of everyone: 15/200 = 3/40. Only "given" changes the denominator.
- Counting the overlap twice for "or". P(woman or walks) = (60 + 40 − 15) ÷ 200 = 85/200 = 17/40. Adding 60 + 40 counts the 15 walking women twice.