Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools

How to Find Probabilities from a Two-Way Table

A two-way table counts every combination of two categories. Every probability you need is one number from the table divided by one total; the question decides which total.

Recognize the task

A table of counts with two categories, such as studied or not against passed or failed, smokers against non-smokers by gender. Questions ask for "both", "either", or "given". Test: is each person counted in exactly one cell?
Tables are introduced in contingency tables; row and column totals give marginal probabilities.

Steps

StepOn 200 students: studied 90 pass, 30 fail; did not study 40 pass, 40 fail
1Add the row and column totals. The grand total is the sum of all cells.studied 120120, not 8080; pass 130130, fail 7070; total 200200
2For "both", divide one cell by the grand total. This is the joint probability.P(S∩pass)=90200=0.45P(S \cap \text{pass}) = \frac{90}{200} = 0.45
3For one category, divide its total by the grand total. This is the marginal probability.P(pass)=130200=0.65P(\text{pass}) = \frac{130}{200} = 0.65
4For "given", divide the cell by the total of the condition. The condition is your new sample space (conditional probability).P(pass∣S)=90120=0.75P(\text{pass} \mid S) = \frac{90}{120} = 0.75

Worked examples

Example 1 · a marginal

column total
P(fail)=70200P(\text{fail}) = \frac{70}{200}
fail column over grand total
=720= \frac{7}{20}

Example 2 · the reverse conditional

condition on a column
given pass: the pass column, 130130 students
P(S∣pass)=90130=913P(S \mid \text{pass}) = \frac{90}{130} = \frac{9}{13}

Example 3 · are studying and passing independent?

independence
P(S) P(pass)=0.6⋅0.65=0.39P(S)\,P(\text{pass}) = 0.6 \cdot 0.65 = 0.39
what independence would give
P(S∩pass)=0.45≠0.39P(S \cap \text{pass}) = 0.45 \neq 0.39
from the cell
dependent

See it happen

The grand total is the whole sample space; a row or a column is a smaller sample space. A conditional probability simply swaps the denominator from the grand total to the row or column of the condition. Explore it in the contingency table tool or the joint probability calculator.

Common mistakes

Grand total for a conditional

✗ P(pass∣S)=90200P(\text{pass} \mid S) = \frac{90}{200}
✓ divide by the studied row: 90120\frac{90}{120}

Row and column swapped

✗ P(S∣pass)=90120P(S \mid \text{pass}) = \frac{90}{120}
✓ the condition is pass, so use its column: 90130\frac{90}{130}

Counting a cell twice for "or"

✗ P(S∪pass)=120+130200P(S \cup \text{pass}) = \frac{120 + 130}{200}
✓ subtract the shared cell: 120+130−90200=0.8\frac{120 + 130 - 90}{200} = 0.8