Or

4
Tutorials that teach
Conditional Probability and Contingency Tables

Take your pick:

Author:
Jonathan Osters

This lesson will demonstrate finding conditional probabilities from a contingency table.

Tutorial

Source: Tables created by the author

In this tutorial, you're going to learn about conditional probability in the context of two-way tables. We can use two-way tables to find conditional probabilities.

So first, a definition. Conditional probability is the probability that some event-- we might call it B-- occurs given that some other event has already occurred. It's written this way, probability of B given A.

So suppose that middle school students were asked which was their dominant hand. And the results are shown in the two-way table here. So if a student is a sixth grader, I'm telling you she's a sixth grader. What's the probability that he or she is left-handed? So what we're going to do is essentially isolate the sixth grade row.

What I'm really asking in conditional probability formula notation is this, the probability of left hand given that he or she's a sixth grader. The formula looks like this. The probability of L and 6, left hand and sixth grade, over the probability of sixth grade.

We can look at it like this. The probability that a student is left-handed and a sixth grader is 9 out of the 338 middle schoolers. The probability that a student is just straight up in sixth grade is 110 out of the 338. That reduces to 9 out of 110.

Notice we can use the probabilities, which were both divided by 338, the grand total. Or we can just use the frequencies from the cells and from the marginal distributions in the column or row totals here, these row totals or these column totals. So this is all the left-handed sixth graders. And this was all the sixth graders.

Let's look at another question. What is the probability that a left-handed student is in sixth grade? At first glance, this looks like the same question. But I've actually switched it around. What's the probability that a student is in sixth grade given that they are a lefty?

So it's the same probability of L and 6. But the denominator is different, or probability of L. Remember, we can use probabilities or just the straight up frequencies from the table. Probability of L and six, the frequency there was 9. The lefties, there were 51 of them. So the answer is 9 out of 51.

So try these on your own. What is the probability that a seventh grade student is ambidextrous? And what is the probability that a student is right-handed given that he or she is an eighth grader? Scribble these off to the side as you pause the video.

Hopefully what you came up with were these. The probability of A, ambidextrous, given they're a seventh grader is 0 out of 121. 0. What about this one? The probability of a right-handed student given that they are an eighth grader, 93 eighth grade righties, from this cell here, over 107 eighth graders.

It's also worth noting that you can use a two-way table that actually has probabilities in it, or relative frequencies, instead of straight up frequencies. This means 5% of all of these kids are boys that enjoy cheese pizza. 12% of all of the kids are boys that enjoy pepperoni, et cetera.

The probability of a student preferring cheese pizza given that he's a boy, you can use the same with the marginal distributions in the row totals here and the column totals here. But you use the probabilities instead of the frequencies. So the probability that a student enjoys cheese and is a boy is the 0.05 value from the table. And the probability of being a boy, in this particular sample, 36% of the sample were boys. And so that reveals that there's about 14% probability that if you are a boy that you'll prefer cheese pizza.

And so to recap, conditional probability is the probability that some other event follows some other event which has already occurred. It's calculated by dividing the joint probability, probability of A and B, by the probability of the event which has already occurred. In most cases, we were using the probability of A. This formula works for all events, not just for independent events, not just for mutually exclusive events, all events. So this is a really nice formula to know.

So we talked about conditional probability and the conditional probability formula in two-way tables. Good luck. And we'll see you next time.