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.
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
The heart row adds to 13.
P(A) = 13/52
The face card column adds to 12. The top left cell now sits inside both outlines.
P(B) = 12/52
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
cd svg-generator python3 -m svgmath render addition-rule-table --out /tmp/addition-rule-table
Source: svgmath/diagrams/probability.py