The complement of an event is its opposite. If an email has a 0.2 probability of being spam, it has a 0.8 probability of being ham: P(ham) = 1 − P(spam). section 8.6
The same subtraction works inside a condition. If P('lottery' | spam) = 0.75, then P(no 'lottery' | spam) = 0.25. Complements fill in the probability of what did not happen. section 8.6
Email probabilities
Suppose 1/5 of emails are spam and 3/4 of spam emails contain “lottery.” The probability that spam emails do not contain the word is 1 − 3/4 = 1/4, or 0.25. section 8.6
Figure 8.6 The tree of possibilities. The root splits into two branches: spam and ham. Then each of these splits into two branches: when the email contains the word lottery, and when it doesn’t.
Follow the tree from spam or ham to emails containing “lottery” or not; complementary branches make the missing probabilities visible. section 8.6


