Conditional probability is the probability of an event when another event is known to have occurred. The notation P(A|B) means “the probability of A given B.” For example, P(rain today | living in the Amazon) = 0.8 means an 80% chance of rain under that condition. section 1.1
Spam and the word “lottery”
In a dataset of 100 emails, 20 are spam. Among the 20 emails containing “lottery,” 15 are spam, so the probability an email is spam given that it contains “lottery” is 15/20 = 0.75. The condition changes the estimate from the overall spam probability of 0.2. section 8.2
Figure 8.7 From the previous tree, we have removed the two branches where the emails don’t contain the word lottery. Out of the original 100 emails, we have 20 left that contain lottery. Because of these 20 emails, 15 are spam, we conclude that the probability that an email is spam given that it contains the word lottery is 0.75.
Follow the probability tree as emails without “lottery” are removed, leaving the conditional group. section 8.2










