# Conditional Probability

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:

\(P(A)=\frac{\text{Number of desired outcomes}}{\text{Total number of possible outcomes}}\)

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 would be 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).

\(P(A)=\frac{\text{Number of desired outcomes}}{\text{Total number of possible outcomes}}=\frac{3}{10}\)

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 \(\frac{10}{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.

## Conditional Probability Formula

There’s a handy formula we can use:

\(P(B|A)=\frac{P(B\text{ and }A)}{P(A)}\)

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 \(\frac{1}{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 \(\frac{5}{10}\). Now that our formula is complete we can simply divide \(\frac{1}{10}\) by \(\frac{5}{10}\) and we get \(\frac{1}{5}\), which is equal to 0.2, or 20%.

Note that this formula can also be written as follows:

\(P(B|A)=\frac{P(B∩A)}{P(A)}\)

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 \(\frac{24}{216}\) by \(\frac{144}{216}\) using fraction division and the 216s can cancel out so we are left with \(\frac{24}{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!

## Conditional Probability Practice Questions

**Question #1:**

What is the formula for conditional probability?

**Answer:**

The conditional probability formula allows us to determine the probability that Event *B* will occur, given the knowledge that Event *A* has already occurred. \(P(B|A)\) stands for “the probability of *B* given *A*.” The probability of Event *B* can be determined by dividing the probability of Events *A* and *B* occurring by the probability of Event *A* occurring.

**Question #2:**

The Venn diagram below shows sections for the probability of Event *A* occurring and the probability of Event *B* occurring. What does the shaded middle section represent?

The shaded middle section represents \(P(\frac{A}{B})\)

The shaded middle section represents \(P(A\text{ and }B)\)

The shaded middle section represents \(P(A\text{ not occurring})\)

The shaded middle section represents \(P(B\text{ not occurring})\)

**Answer:**

The middle section of the Venn diagram represents the overlap of Events *A* and *B*, where both events occur.

**Question #3:**

Which Venn diagram represents the following scenario:

100 customers have purchased cars at Jason’s car dealership this year. 40 of those customers purchased cars with touch-screen GPS, and 30 customers purchased cars with snow tires. 20 customers purchased cars with both touch-screen GPS and snow tires.

**Answer:**

The far left portion of the Venn diagram represents the customers who purchased cars with touch-screen GPS but no snow tires. The far right portion of the Venn diagram represents the customers who purchased cars with snow tires but not touch-screen GPS. The middle section represents customers who purchased cars with both touch-screen GPS *and* snow tires.

**Question #4:**

Consider the same group of 100 customers from Jason’s car dealership. 40 purchased GPS, 30 purchased snow tires, and 20 purchased both. If a randomly selected customer has purchased the GPS, what would the probability be that they also purchased the snow tires?

20%

30%

33%

40%

**Answer:**

The conditional probability formula can be used to solve this problem. The probability of Event *A* occurring (customer purchasing GPS) is 60 out of 100 customers, or 0.6. The probability of Event *B* occurring (customer purchasing snow tires) is 50 out of 100, or 0.5. The probability of a customer purchasing both, or Event *A* and *B* occurring, is 20 out of 100, or 0.2.

We know \(P(A)=0.6\) and \(P(A\text{ and }B)=0.2\) so we can plug these into the formula.

\(P(B|A)=\frac{P(A\text{ and }B)}{P(A)}\) becomes \(P(B|A)=\frac{0.2}{0.6}\) which simplifies to 0.33 or 33%.

**Question #5:**

Sybil took two science tests. The probability of her passing both tests is 0.6 and the probability of her passing the first test is 0.8. What is the probability of her passing the second test if she passed the first test?

65% chance of passing the second test

75% chance of passing the second test

85% chance of passing the second test

95% chance of passing the second test

**Answer:**

The conditional probability formula can be used to solve this problem. The probability of Event *A* occurring (passing the first test) is 0.8. The probability of Event *A* and *B* occurring (passing both tests) is 0.6.

We know \(P(A)=0.8\) and \(P(A\text{ and }B)=0.6\) so we can plug these into the formula.

\(P(B|A)=\frac{P(A\text{ and }B)}{P(A)}\) becomes \(P(B|A)=\frac{0.6}{0.8}\) which simplifies to 0.75 or 75%.