Understanding Dependent Events

Introduction

Welcome back to How Events Influence Each Other! You have completed two lessons so far, which puts you right at the midpoint of this course. In Lesson 1, we explored what it means for events to be independent, and in Lesson 2, we used the multiplication rule to calculate the probability that two independent events both occur. Those ideas work perfectly when one event has no effect on the other.

But what happens when it does? In many real situations, the outcome of one event changes the playing field for the next. This third lesson focuses on understanding those situations, known as dependent events. We will learn to recognize them, see why they behave differently from independent events, and trace exactly how the first outcome reshapes the probabilities that follow.

When One Outcome Affects Another

Let's build some intuition with a simple thought experiment. Imagine a bowl on a table containing 3 chocolate bars and 2 bags of chips. You reach in without looking and grab one snack. Then you reach in again for a second snack.

Here is the key question: is the mix of snacks in the bowl the same the second time you reach in? Clearly not. You already removed one item, so the total count dropped from 5 to 4, and the count of one snack type went down by one. The probability of what you grab second depends on what you grabbed first.

Now compare that to a different version: you grab a snack, put it back, shake the bowl, and then grab again. This time the bowl is identical for both grabs, so the second grab is unaffected by the first. That version gives us independent events, just like the ones we studied earlier. The "without replacement" version does not, and that difference is the heart of this lesson.

What Makes Events Dependent

Two events are dependent when the occurrence or outcome of the first event changes the probability of the second event. In other words, if knowing what happened in event AA gives us different numbers for event BB than we would have had without that knowledge, the events are dependent.

As you may recall from Lesson 1, independent events passed a simple test: does knowing AA's outcome change P(B)P(B)? If the answer was "no," the events were independent. For dependent events the answer is "yes." The probability of BB shifts depending on which outcome AA produced.

Here is a compact comparison to keep the two ideas straight:

FeatureIndependent EventsDependent Events
Does the first outcome affect the second?NoYes
Does the pool of outcomes change?NoYes
P(B)P(B) after learning AA's outcomeStays the sameChanges
Sign up

Join the 1M+ learners on CodeSignal

Be a part of our community of 1M+ users who develop and demonstrate their skills on CodeSignal