liveBook · Manning

Independence

As explained in Grokking Machine Learning

A probabilistic relationship in which the occurrence of one event does not change the probability of another event.

Two events are independent when the occurrence of one does not change the probability of the other. For independent events E and F, P(E ∩ F) = P(E) · P(F). section 8.2

Estimating a shared outcome

On an island, half the people are women and one-tenth have brown eyes. If gender and eye color are independent, estimate that 1/20 of the people—50 out of 1,000—are women with brown eyes. The estimate depends on the independence assumption; the actual number could differ. section 8.2

In spam detection, assuming words are independent makes it easier to estimate the probability of an email containing several words. For example, if 20% contain “lottery” and 10% contain “sale,” the independence assumption estimates that 2% contain both. The assumption can be a useful approximation, not a guarantee. section 8.2

Figure 8.11 Say 20% of the emails contain the word lottery, and 10% of the emails contain the word sale. We make the naive assumption that these two words are independent of each other. Under this assumption, the percentage of emails that contain both words can be estimated as 2%, namely, the product of 20% and 10%.

The figure illustrates estimating the proportion of emails containing both “lottery” and “sale” by multiplying their individual proportions. section 8.2

To practice, decide whether event pairs are independent: outcomes of separate coin throws, outcomes of two dice, or rain and the day of the week. Give mathematical or verbal reasons as appropriate. section 8.5

How Grokking Machine Learning covers it

How deep it goes
Defines independence, states the product rule, and applies the assumption in estimates and exercises.
Examples
Uses gender and eye color, email words, coin and dice outcomes, and weather-event pairs.
What you can do after
Evaluate whether event pairs are independent and estimate joint probabilities under an independence assumption.
How it connects
Connects independence to the product rule, conditional probability, and the naive Bayes model.

Also explained in

Compare how 7 books explain independence →

Related concepts

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