liveBook · Manning

Set intersection

As explained in Grokking Machine Learning, Second Edition

An event intersection is the event in which two or more events occur simultaneously.

A set or event intersection describes cases where two events happen at the same time. For email, “spam and contains lottery” is an intersection, written P(lottery ∩ spam). section 8.6

Spam emails containing “lottery”

Suppose 1/5 of emails are spam, and 3/4 of spam emails contain “lottery.” Multiply the probabilities: P(lottery ∩ spam) = (3/4)(1/5) = 3/20 = 0.15. Thus, 15 out of 100 emails are both spam and contain “lottery.” 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; multiplying branch probabilities gives each intersection probability. section 8.6

How Grokking Machine Learning, Second Edition covers it

How deep it goes
Defines intersection, derives the product rule, and works through four spam-and-word probability cases.
Examples
Uses spam, ham, and the presence or absence of the word “lottery” in a 100-email dataset and probability tree.
What it assumes
Assumes basic ratios and probabilities while connecting them to conditional probability.
What you can do after
Evaluate joint event probabilities by multiplying a conditional probability by the relevant event probability.
How it connects
Connects event intersection with conditional probability, the product rule, and naive Bayes.

Also explained in

Compare how 6 books explain set intersection →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Grokking Machine Learning, Second Edition. The section links point to the parts of the book it draws on.