Lesson 3: Dependent and Independent Events

Links

Compound events

In real life, we're often concerned with events that are made up of other events. Technically, any event that contains more than one outcome contains more than one other event, but the really interesting ones usually involve more than one experiment or trial. For example, with a deck of cards, "I drew a diamond" is an event that contains lots of other events, but it still is describing the result of one individual trial: we drew one card. An event like "I drew a diamond, then I drew a spade" is different in that it includes two different events from two different chance experiments. Technically, though, both of these still count as compound events, and we can use the same math to calculate their probabilities if we want. There are two main rules for compound events, the multiplication rule and the addition rule.

The multiplication rule is the simpler one. It applies when the compound event requires that two other events both need to occur for the compound event to occur. This is what our diamond-then-spade example is. The formal equation for this rule is pretty simple:

P(E1 and E2) = P(E1) * P(E2)

This just says that we need to multiply the two events together to get the probability that they'll both happen at the same time. If we have more events that need to happen, we can just multiply by their probabilities too. For instance, if we had three different events, we would do this:

P(E1 and E2 and E3) = P(E1) * P(E2) * P(E3)

The addition rule is a little more complicated. It applies when our compound event occurs when either one or the other, or both, need to occur for the compound event to occur. Just drawing one diamond from a deck of cards is this kind of compound event, because it occurs if we draw any one of the four diamonds from the deck. The addition rule is a little more complicated:

P(E1 or E2) = P(E1) + P(E2) - P(E1 and E2)

We need to subtract P(E1 and E2) because otherwise it would be included twice. If both events can occur at the same time, each of their probabilities also includes some outcomes where the other event occurred too, so we need to account for that when we perform our calculation. If E1 and E2 can't both occur at the same time, P(E1 and E2) will just be zero, and it won't matter. To demonstrate this, let's try some calculations for coin flips.

If we flip one coin, the probability that it will come up heads or tails is:

P(heads or tails) = 1/2 + 1/2 = 1

This is obviously right, because the coin only has two sides, and it has to land on one of them. The subtraction part of the addition rule doesn't change anything here, because it's impossible for the coin to land on both sides. Now, suppose we get wild and crazy and flip two coins at once. (We'll name them A and B.) The probability that they'll both come up heads is easy enough:

P(headsA and headsB) = 1/2 * 1/2 = 1/4

Now what about the probability that one or the other will come up heads? This is where we end up with a problem if we forget the subtraction:

P(headsA or headsB) = 1/2 + 1/2 = 1 (WRONG!)

This can't be right! This is saying that it's absolutely certain that one of them will come up heads, and we can prove that's not true, because there's a chance they could both come up tails:

P(tailsA and tailsB) = 1/2 * 1/2 = 1/4

What's wrong is that we're double-counting the outcomes where both coins come up heads. There are four ways this could come out: two heads, A comes up heads and B comes up tails, A comes up tails and B comes up heads, and two tails. The ½ probability for each coin coming up heads is also included in the two-heads outcome, so when we add the probabilities for the two coins together, we include it twice. When we subtract like the equation tells us to, it comes out right:

P(headsA or headsB) = (1/2 + 1/2) - (1/2 * 1/2) = 4/4 - 1/4 = 3/4

Independent and dependent events

So far, in our coin example, we've only worked with events that don't affect each other. Sometimes, though, the probability of one event happening is affected by another event. Before we can use the multiplication or addition rules, we have to figure out how to account for this in our probabilities.

We say that an event is independent when its outcome doesn't depend on the result of any other event. Real examples of compound events where everything is independent include flipping a coin over and over again, rolling two dice (what shows up on one die doesn't affect the other one), and drawing cards from a deck, if and only if you always put all the cards back before drawing another one. (Word problems will often call this "with replacement".) Let's go back to our card examples, and imagine that we want to know the probability of drawing a diamond, then a spade. If we do it this way, with replacement, we already know how the calculation needs to look:

P(diamond and spade) = 13/54 * 13/54 ~= 0.241 * 0.241 ~= 0.056

Conditional probability and dependent events

The obvious question now is: what about if we don't replace the first card before we draw the second? (Word problems will call this "without replacement".) The probabilites will change for the second card, because the deck is different. This involves something called conditional probabilities All this means is the probability of one event happening, on the condition that some other event happened first. Let's illustrate this with our diamond-then-spade compound event. When we first start, the deck has 54 cards in it, and thirteen of them are diamonds, so the probability is the same as it was for the last example:

P(diamond) = 13 / 54 ~= 0.241

Next, to figure out how likely it is we'll draw a spade next, we need to assume for a moment that we already drew the diamond. (If we didn't, that already means that the compound event didn't occur, since we needed a spade and a diamond.) When we go to draw our second card, there are still thirteen spades in the deck, but the size of the deck has changed: there are only 53 cards left, so the probability is slightly greater:

P(spade|diamond) = 13 / 53 ~= 0.245

The vertical bar in this equation is the mathematical notation for "given" or "after", in the field of probability theory, so we read the P(spade|diamond) part as "probability of spade given diamond", or "probability of spade after diamond". This is called the conditional probability of drawing a spade after drawing a diamond. There's not really any rule to figure this out from scratch, you just need to think about it carefully like we just did. (There is a formula to figure out conditional probabilities, but we'll wait to talk about it for a little bit. We need some more information to use it.)

Putting it all together

Now that we have our conditional probability, we can calculate the probability for the whole compound event. We can use the same multiplication rule that we did before, we just need to include the conditional probability for the dependent event:

P(E1 and E2) = P(E1) * P(E2|E1)

This one assumes we only have two events, and one of them is dependent on the other one. If you have more events than this in your compound event, and some of them are dependent, it will probably be easiest to break it up into events that each only include two events, like in the equation, and then use the product and addition rules to put them back together again.

Using this formula, and remembering the conditional probability for the spade that we came up with earlier, the complete probability calculation for the diamond-then-spade example we've been using is:

P(diamond and spade) = 13/54 * 13/53 ~= 0.241 * 0.245 ~= 0.059

Now we can use algebra to come up with something interesting. If we divide both sides of that equation, the product rule with the conditional probablitiy, by P(E1), we get a formula we can use to figure out conditional probabilities (this is the one we mentioned a little earlier):

P(E1 and E2) / P(E1) = P(E2|E1)

Applied to the diamond-and-spade example we've been using, it looks like this: P(spade|diamond) = (13/54 * 13/53) / 13/54 = 13/53 ~= 0.245

Our shiny new equation isn't really useful in this particular case, because we had to have the conditional probability to figure out P(diamond and spade) in the first place. With your carnival games, though, you'll often have an empirical probability to work with for your compound event, but you won't always have conditional probabilities for the individual events that make it up. This equation could come in handy if you want to break down your probabilities to help you make decisions about your game.

Review

So we don't forget, let's go back over what we learned: