Course contentsShow
← Machine Learning and Deep Learning
Lesson 56 of 3,5381. Mathematical Foundations for Machine LearningFree lesson

Independence of Events

Define statistical independence and recognize when events are independent versus dependent.

Independence of Events

What you'll learn: You'll discover when two events don't affect each other's probability—a crucial concept for building accurate ML models.

What Is Independence?

Two events are independent if knowing that one occurred tells you nothing about whether the other will occur. Their probabilities don't influence each other.

Mathematically, events A and B are independent when:

P(A ∩ B) = P(A) × P(B)

In other words, the probability of both happening equals the product of their individual probabilities.

Using conditional probability (from our previous lesson), independence also means:

P(A | B) = P(A)

Learning that B happened doesn't change what we believe about A.

Recognizing Independence vs. Dependence

Independent example: Flipping a fair coin twice. Getting heads on the first flip doesn't affect the second flip. If P(first heads) = 0.5 and P(second heads) = 0.5, then P(both heads) = 0.5 × 0.5 = 0.25. ✓

Dependent example: Drawing two cards from a deck without replacement. If you draw an ace first (probability 4/52), the probability of drawing another ace becomes 3/51—not 4/52. The first event changed the sample space, making these dependent.

The Intuition

Think of independence like separate coin flips in different rooms—what happens in one room has zero impact on the other. Dependence is like pulling socks from the same drawer—each sock you remove changes what's left.

In machine learning, we often assume features are independent to simplify calculations (like in Naive Bayes classifiers), even when they're slightly dependent in reality.

Key Takeaway: Events are independent when one occurring doesn't change the probability of the other; check this by verifying P(A ∩ B) = P(A) × P(B).