The Addition Rule in a Table

Category: Probability   Level: 301

P(A ∪ B) = P(A) + P(B) - P(A ∩ B)

A two-way table splits the deck by two yes or no questions. The row total and the column total share one cell, so adding both totals counts that cell twice.

Step through it

Watch it

Animated walkthrough

Step by step

Step 1: Sort the deck two ways

Each card lands in exactly one cell: heart or not, face card or not. The four cells add to 52.

3 + 10 + 9 + 30 = 52

Step 1: Sort the deck two ways

Step 2: Total the heart row

The heart row adds to 13.

P(A) = 13/52

Step 2: Total the heart row

Step 3: Total the face card column

The face card column adds to 12. The top left cell now sits inside both outlines.

P(B) = 12/52

Step 3: Total the face card column

Step 4: Subtract the shared cell

Row plus column counts the 3 heart face cards twice, so take them away once. The three inner cells touched by either outline add to the same answer.

13 + 12 - 3 = 3 + 10 + 9 = 22

Step 4: Subtract the shared cell

All steps at once

Storyboard

Generate it yourself

cd svg-generator
python3 -m svgmath render addition-rule-table --out /tmp/addition-rule-table

Source: svgmath/diagrams/probability.py