# Independent and Dependent Events

Suppose we have a jar with 10 pieces of chocolate candy and 5 pieces of vanilla candy. Clearly, the chocolate candy is far superior, which is why we went out and bought twice as many of them.

We take one piece of candy at random from the jar, put it back, then take a second piece of candy at random from the jar. The event of selecting first chocolate and then vanilla candy is a compound event, since this is made up of two events (taking a chocolate candy first, and taking a vanilla candy second). The math would be easiest if we simply took and ate all 15 pieces of candy, but we don't want to ruin our appetite.

### Sample Problem

Take that jar with 10 pieces of chocolate candy and 5 pieces of vanilla candy. We take one piece of candy at random from the jar, put it back, then take a second piece of candy at random from the jar.

1. What is the probability of the first candy being chocolate?

2. What is the probability of the first candy being vanilla?

3. What is the probability of the second candy being chocolate?

4. What is the probability of the second candy being vanilla?

5. What is the probability of us actually being able to put that piece of candy back once we have it in our grasp?

1.

2.
3. Since we put the first candy back, this is the same as the probability of the first candy being chocolate:

4. Since we put the first candy back, this is the same as the probability of the first candy being vanilla:

5. Not good...have you tasted these things?

The two events in the experiment above (selecting chocolate first and vanilla second) are independent. When you finally move out of your parents' house and are "independent" yourself, you'll be able to eat all of the chocolate and vanilla candy you like.

Intuitively, we know the two events have nothing to do with each other. The probability of selecting vanilla second is the same whether or not the first candy is chocolate. Generalizing this idea, two events are independent if the probability of one event happening stays the same whether the other event happens or not. Case in point, the chances of the Seahawks winning on Sunday are independent of which socks you decide to wear. Despite what you may argue to your less superstitious comrades.

Now let's change the rules of the experiment and see what happens.

### Sample Problem

Suppose we have a jar with 10 pieces of chocolate candy and 5 pieces of vanilla candy. We take one piece of candy at random from the jar, eat it, and then take a second piece of candy at random from the jar. Ooh, we like where we're going with this.

1. IF the first candy is chocolate, what is the probability of the second candy being chocolate?

2. IF the first candy is chocolate, what is the probability of the second candy being vanilla?

3. IF the first candy is vanilla, what is the probability of the second candy being vanilla?

1. After eating one chocolate candy there are now 9 pieces of chocolate and 5 pieces of vanilla candy in the jar, so the probability of getting chocolate is now .

2.

Now the two events (selecting chocolate first, selecting vanilla second) are dependent. The probability of selecting vanilla second depends on whether the first candy was chocolate. Similarly, the chances of the Seahawks winning on Sunday are dependent on whether or not you decide to kidnap their star quarterback. Just kidding...the Seahawks don't have a star quarterback.

Look, we said we have a lot of feelings about football.

Formally, we say two events A and B are independent if

(probability A occurs AND B occurs) = (probability A occurs)(probability B occurs).

We don't need to say it while wearing a tuxedo. We don't need to be that formal.

### Sample Problem

Let A be the event of rolling 1 on a die and B be the event of flipping tails on a coin. Then events A and B are independent.

Look at the sample space for the experiment where we roll a die and flip a coin:

There's one favorable outcome for the compound event of A (rolling 1) and B (flipping tails), so

.

Now look at the probabilities of the individual events:

Since

,

which is the same as the probability we found for the compound event, we conclude that events A and B are independent.

### Sample Problem

If we roll two dice, the event of rolling 5 on the first die and the event of the numbers on the two dice summing to 8 are dependent.

It might help to look at the possible sums when we roll two dice. The numbers going down the side of the below chart correspond to the first die, and the numbers going across the top correspond to the second die. Just be glad we're not using that 20-sided die we mentioned earlier.

The compound event of rolling 5 on the first die and the numbers summing to 8 has only one favorable outcome, out of 36 total:

Therefore,

.

Not great odds. Hope you didn't bet the farm on that, or we know some cows and chickens who will be very unhappy.

Now we look at the individual events.

To check how many ways the numbers on the dice can sum to 8, we look at the table again:

Since there are 5 ways for the numbers on the dice to sum to 8 out of 36 possible outcomes,

.

Finally, we check the independence condition.

This is not the same as

so the events are NOT independent; they're dependent. In other words, you can claim them on your tax return. #oldpeoplejokes