Hey guys! Today we’re going to take a look at conditional probability. This type of probability is all about finding the odds of something happening given that something else has already occurred.
Let’s start with a refresher on basic probability. The probability of something happening can be expressed as the number of desired outcomes divided by the number of total possible outcomes, like this:
Here’s an example of a basic probability problem: There are 10 marbles in a bag. 3 are blue, 3 are red, and 4 are white. What are the odds of pulling out a red marble? To solve this, we’d place the number of desired outcomes on the top (in this case it’d 3 because there are three red marbles) and the total number of possible outcomes on the bottom (this is 10 since there are ten total marbles in the bag).
Seems pretty straightforward, right? Well, conditional probability adds a bit of a twist to this, as the objects or people in question often have more than one possible attribute. Let’s look at another example problem:
Out of 100 houses sold, 40 were sold with a garage only, 30 were sold with a pool only, and 10 were sold with both a garage and a swimming pool, leaving 20 houses sold with neither. Given that a house was sold with a garage, what are the odds that it was also sold with a pool?
It’s not immediately obvious what to do with all that information. But if we draw it as a Venn diagram we can make more sense of it:
We can now see the overlap between the houses sold with garages and the houses sold with pools, all within the larger set of houses sold. It’s easier to see now that of the 50 houses that were sold with a garage, 10 of them also had a swimming pool. So the odds are 10 over 50, which can be expressed as the fraction one fifth, or 0.2, or 20%.
Fortunately, there’s a faster way to do this than by drawing a diagram every time you encounter a conditional probability question. There’s a handy formula we can use:
We read this formula as “the probability P of event B happening given that event A has happened is equal to the probability of events B and A happening over the probability that event A has happened.” In these types of problems, both probabilities on the right side of the equation are usually given or can be determined from a sentence or table. So in our sample problem, the P(B and A) happening is the 10 houses out of 100 that were sold with both a garage and a swimming pool. This fraction can be written as 1 over 10. The P(A) is the probability of a house being sold with a garage (event A) which is 50 houses out of the 100, or 5 out of 10. Now that our formula is complete we can simply divide 1 over 10 by 5 over 10 and we get 1 over 5, which is equal to 0.2 or 20% just as we figured out from our drawing.
Note that this formula can also be written as follows:
The only difference is that the numerator is written as the intersection of event A and event B happening. In other words, the area where the two circles intersect in our drawing.
Let’s try one more with numbers that aren’t quite so neat.
In a small town, there are 216 men. 144 of them have brown hair and 56 of them have mustaches. 24 of the men have brown hair and mustaches. What are the odds that a man chosen at random has a mustache given that he has brown hair?
Let’s plug into our formula. The probability of event A (brown hair) AND event B (mustache) is the 24 men with both divided by the 216 total men. The probability of event A (brown hair) is 144 divided by the original 216 men. We divide 24/216 by 144/216 using fraction division and the 216s can cancel out so we are left with 24 over 144. We can then divide this to get a decimal of 0.1666666 (repeating) as a decimal, or in percentage form that would be roughly 16.67%.
I hope this increased your odds of understanding conditional probability. Thanks for watching!