Conditional Probability

How to handle Dependent Events

Life is full of random events! You need to get a "feel" for them to be a smart and successful person.

Independent Events

Events can be " Independent ", meaning each event is not affected by any other events.

Example: Tossing a coin.

Each toss of a coin is a perfect isolated thing.

What it did in the past will not affect the current toss.

The chance is simply 1-in-2, or 50%, just like ANY toss of the coin.

So each toss is an Independent Event .

Dependent Events

But events can also be "dependent" ... which means they can be affected by previous events ...

Example: Marbles in a Bag

2 blue and 3 red marbles are in a bag.

What are the chances of getting a blue marble?

The chance is 2 in 5

But after taking one out the chances change!

So the next time:

This is because we are removing marbles from the bag.

So the next event depends on what happened in the previous event, and is called dependent .

Replacement

Note: if we replace the marbles in the bag each time, then the chances do not change and the events are independent :

  • With Replacement: the events are Independent (the chances don't change)
  • Without Replacement: the events are Dependent (the chances change)

Dependent events are what we look at here.

Tree Diagram

A Tree Diagram is a wonderful way to picture what is going on, so let's build one for our marbles example.

There is a 2/5 chance of pulling out a Blue marble, and a 3/5 chance for Red:

We can go one step further and see what happens when we pick a second marble:

If a blue marble was selected first there is now a 1/4 chance of getting a blue marble and a 3/4 chance of getting a red marble.

If a red marble was selected first there is now a 2/4 chance of getting a blue marble and a 2/4 chance of getting a red marble.

Now we can answer questions like "What are the chances of drawing 2 blue marbles?"

Answer: it is a 2/5 chance followed by a 1/4 chance :

Did you see how we multiplied the chances? And got 1/10 as a result.

The chances of drawing 2 blue marbles is 1/10

We love notation in mathematics! It means we can then use the power of algebra to play around with the ideas. So here is the notation for probability:

P(A) means "Probability Of Event A"

In our marbles example Event A is "get a Blue Marble first" with a probability of 2/5:

And Event B is "get a Blue Marble second" ... but for that we have 2 choices:

  • If we got a Blue Marble first the chance is now 1/4
  • If we got a Red Marble first the chance is now 2/4

So we have to say which one we want , and use the symbol "|" to mean "given":

P(B|A) means "Event B given Event A"

In other words, event A has already happened, now what is the chance of event B?

P(B|A) is also called the "Conditional Probability" of B given A.

And in our case:

P(B|A) = 1/4

So the probability of getting 2 blue marbles is:

And we write it as

"Probability of event A and event B equals the probability of event A times the probability of event B given event A "

Let's do the next example using only notation:

Example: Drawing 2 Kings from a Deck

Event A is drawing a King first, and Event B is drawing a King second.

For the first card the chance of drawing a King is 4 out of 52 (there are 4 Kings in a deck of 52 cards):

P(A) = 4/52

But after removing a King from the deck the probability of the 2nd card drawn is less likely to be a King (only 3 of the 51 cards left are Kings):

P(B|A) = 3/51

P(A and B) = P(A) x P(B|A) =(4/52)x (3/51) = 12/2652 = 1/221

So the chance of getting 2 Kings is 1 in 221, or about 0.5%

Finding Hidden Data

Using Algebra we can also "change the subject" of the formula, like this:

Start with:   P(A and B) = P(A) x P(B|A)
Swap sides:   P(A) x P(B|A) = P(A and B)
Divide by P(A):   P(B|A) = P(A and B) / P(A)

And we have another useful formula:

"The probability of event B given event A equals the probability of event A and event B divided by the probability of event A "

Example: Ice Cream

70% of your friends like Chocolate, and 35% like Chocolate AND like Strawberry.

What percent of those who like Chocolate also like Strawberry?

P(Strawberry|Chocolate) = P(Chocolate and Strawberry) / P(Chocolate)

50% of your friends who like Chocolate also like Strawberry

soccer teams

Big Example: Soccer Game

You are off to soccer, and want to be the Goalkeeper, but that depends who is the Coach today:

  • with Coach Sam the probability of being Goalkeeper is 0.5
  • with Coach Alex the probability of being Goalkeeper is 0.3

Sam is Coach more often ... about 6 out of every 10 games (a probability of 0.6 ).

So, what is the probability you will be a Goalkeeper today?

Let's build a tree diagram . First we show the two possible coaches: Sam or Alex:

The probability of getting Sam is 0.6, so the probability of Alex must be 0.4 (together the probability is 1)

Now, if you get Sam, there is 0.5 probability of being Goalie (and 0.5 of not being Goalie):

If you get Alex, there is 0.3 probability of being Goalie (and 0.7 not):

The tree diagram is complete, now let's calculate the overall probabilities. Remember that:

P(A and B) = P(A) x P(B|A)

Here is how to do it for the "Sam, Yes" branch:

(When we take the 0.6 chance of Sam being coach times the 0.5 chance that Sam will let you be Goalkeeper we end up with an 0.3 chance.)

But we are not done yet! We haven't included Alex as Coach:

With 0.4 chance of Alex as Coach, followed by the 0.3 chance gives 0.12

And the two "Yes" branches of the tree together make:

0.3 + 0.12 = 0.42 probability of being a Goalkeeper today

(That is a 42% chance)

One final step: complete the calculations and make sure they add to 1:

0.3 + 0.3 + 0.12 + 0.28 = 1

Yes, they add to 1 , so that looks right.

Friends and Random Numbers

Here is another quite different example of Conditional Probability.

4 friends (Alex, Blake, Chris and Dusty) each choose a random number between 1 and 5. What is the chance that any of them chose the same number?

Let's add our friends one at a time ...

First, what is the chance that Alex and Blake have the same number?

Blake compares his number to Alex's number. There is a 1 in 5 chance of a match.

As a tree diagram :

Note: "Yes" and "No" together  makes 1 (1/5 + 4/5 = 5/5 = 1)

Now, let's include Chris ...

But there are now two cases to consider:

  • If Alex and Blake did match, then Chris has only one number to compare to.
  • But if Alex and Blake did not match then Chris has two numbers to compare to.

And we get this:

For the top line (Alex and Blake did match) we already have a match (a chance of 1/5).

But for the "Alex and Blake did not match" there is now a 2/5 chance of Chris matching (because Chris gets to match his number against both Alex and Blake).

And we can work out the combined chance by multiplying the chances it took to get there:

Following the "No, Yes" path ... there is a 4/5 chance of No, followed by a 2/5 chance of Yes:

Following the "No, No" path ... there is a 4/5 chance of No, followed by a 3/5 chance of No:

Also notice that when we add all chances together we still get 1 (a good check that we haven't made a mistake):

(5/25) + (8/25) + (12/25) = 25/25 = 1

Now what happens when we include Dusty?

It is the same idea, just more of it:

OK, that is all 4 friends, and the "Yes" chances together make 101/125:

Answer: 101/125

But here is something interesting ... if we follow the "No" path we can skip all the other calculations and make our life easier:

The chances of not matching are:

(4/5) × (3/5) × (2/5) = 24/125

So the chances of matching are:

1 - (24/125) = 101/125

(And we didn't really need a tree diagram for that!)

And that is a popular trick in probability:

It is often easier to work out the "No" case (and subtract from 1 for the "Yes" case)

(This idea is shown in more detail at Shared Birthdays .)

  • Skip to secondary menu
  • Skip to main content
  • Skip to primary sidebar

Statistics By Jim

Making statistics intuitive

Conditional Probability: Definition, Formula & Examples

By Jim Frost 4 Comments

What is Conditional Probability?

A conditional probability is the likelihood of an event occurring given that another event has already happened. Conditional probabilities allow you to evaluate how prior information affects probabilities. For example, what is the probability of A given B has occurred? When you incorporate existing facts into the calculations, it can change the likelihood of an outcome.

Typically, the problem statement for conditional probability questions assumes that the initial event occurred or indicates that an observer witnesses it. The goal is to calculate the chances of the second event under the condition that the first event occurred.

This concept might sound complicated, but it makes sense that knowing an event occurred can affect the chances of another event.

For example, if someone asks you, what is the likelihood that you’re carrying an umbrella? Wouldn’t your first question be, is it raining? Obviously, knowing whether it is raining affects the chances that you’re carrying an umbrella.

Related post : Probability Fundamentals

Conditional Probability Examples

P (A|B) denotes the conditional probability of event A occurring given that event B has occurred.

Meme of a cat enjoying a cardboard box.

P (Cat | Open box on floor) = 0.8

This notation indicates that the chances of someone owning a cat given the presence of an open box on their floor is 0.8.

I know because I own cats and often have an empty box on my floor for them to enjoy!

For a more serious conditional probability example, consider medical testing, such as COVID tests. In this context, evaluating conditional probabilities is critical. You need to know the likelihood of obtaining a positive test result when a person has COVID and the chances of a negative result when a person does not have COVID.

For studies that assess medical tests, researchers already know whether a volunteer has COVID (or whatever disease they’re testing). They then administer a COVID test and record the results. Consequently, we’re evaluating the likelihood of a test result given the known status of a participant.

The following conditional probability notation represents these two cases:

  • P (Positive COVID test | Person has COVID)
  • P (Negative COVID test | Person does not have COVID)

Tests can perform well for one, both, or neither of these conditions. They need high conditional probabilities for both cases to limit the chances for false negatives and positives, respectively.

Conditional Probability Formula

Use the following conditional probability formula to find the probability of A given B:

Formula for conditional probability.

In the conditional probability formula, the numerator of the ratio is the joint chance that A and B occur together. We need the joint likelihood in the numerator because we’re interested in the subset of cases where both events happen.

The denominator of the conditional probability formula is the likelihood that B occurs. We use that value in the denominator because the chances of event B defines the total sample space. Remember, the nature of a conditional probability is that a given event occurs, and the denominator accounts for that occurrence.

In the conditional probability formula, the numerator is a subset of the denominator. Together, the formula gives us the ratio of the chances of both events occurring relative to the likelihood that the given event occurs, which is the conditional probability!

Therefore, if the ratio equals one, event A always occurs when event B has occurred. Conversely, when the ratio equals zero, event A never occurs after B happens. For most conditional probability examples, the ratio is somewhere between 0 and 1, indicating that A sometimes occurs after B. Hence, we find the probability of A given B!

Related post : Joint Probability: Definition, Formula & Examples

Worked Conditional Probability Example

Let’s return to the conditional probability example of carrying an umbrella when it’s raining. Assume that a study in a rainy city assesses chances related to rainy days and carrying umbrellas. The researchers were out observing the weather and people.

We want to see how the chances of carrying an umbrella change depending on whether it is raining or not. That requires calculating the following two conditional probabilities:

  • P (Umbrella | Rain): What is the likelihood that someone is carrying an umbrella given that it is raining.
  • P (Umbrella | No Rain): What is the likelihood that someone is carrying an umbrella given that it is not raining.

To find our answers, we’ll use the following two conditional probability formulas:

Formula for the conditional probability of carrying an umbrella when it is raining.

The researchers find the following probabilities:

  • P(Umbrella ⋂ Rain): 0.20
  • P(Umbrella ⋂ No Rain): 0.40
  • P(Rain): 0.25
  • P(No Rain): 0.75

Calculating the Conditional Probabilities

If you look at the joint likelihoods in the first two bullets, it appears that the chance of carrying an umbrella when it’s not raining (0.40) is higher than when it is raining (0.20). That seems backward, and we’ll come back to that. For the correct answer, we need to calculate the conditional probability. Let’s plug these numbers into the conditional probability formula!

Example calculations for conditional probabilities.

Based on the conditional probabilities, we see that people are more likely to carry an umbrella given that it’s raining (0.80) compared to when it’s not raining (0.53). That makes sense!

The joint likelihoods were misleading because they do not account for the fact that days with no rain are three times as likely as rainy days (0.75 vs. 0.25)! In this study, you’re more likely to see people carrying umbrellas when there’s no rain because there are many more days with no rain. The conditional probabilities consider that fact.

This example of conditional probabilities involves dependent events. We know that’s the case because when you change the initial event, the chances of the second event change. Consequently, the likelihood of the second event depends on the first event.

Now, let’s see what happens when we look at independent events.

Related post : Venn diagrams can display probabilities effectively

Example of Conditional Probabilities with Independent Events

When you assess conditional probabilities of independent events, the following is true:

P (A|B) = P (A)

What does that mean?

The probability of A given that B occurred equals the likelihood of A. In other words, whether B occurs or not has no effect on the chances of A. That makes sense because the events are independent ! There’s also a mathematical proof for it, which I won’t cover.

Image of dice being rolled.

Imagine we’re playing a game. For each turn, you roll two dice, but you roll them one at a time. You want to roll two sixes. The dice rolls are independent events because the outcome of the first roll does not affect the second roll.

Learn more about Independent Events: Definition & Probability .

Calculations

We’ll use the conditional probability formula to find the likelihood of rolling a second six given that the first roll was a six. For this example, I’ll denote the first six as 6 1 and the second as 6 2 .

Formula for conditional probability of rolling a second six after rolling the first six.

Because these are independent events, we can use the multiplication rule to calculate the joint probability of P (P 2 ⋂ P 1 ).  Each roll has a 1/6 = 0.167 chance of getting a six.

Consequently, the joint likelihood of two sixes is: P (6 2 ⋂ P 1 ) = 0.167 * 0.167 = 0.028

And the chance of rolling a six on the first throw: P (6 1 ) = 0.167

By entering these values into the conditional probability formula, we know that the chances of rolling a 2 nd six given that the first roll was a six is the following:

Example calculations.

No surprise. The chance of throwing that 2 nd six is still 1/6. The first six doesn’t affect the likelihood at all, which makes sense for independent events!

You can also calculate conditional probabilities and other types using contingency tables. To learn about that, read my post Using Contingency Tables to Calculate Probabilities .

Share this:

problem solving in conditional probability

Reader Interactions

' src=

January 11, 2022 at 1:38 am

Appreciate the explanation. I do have a question which I think conditional probability is the best solution but I could be wrong.

For example: there are 20 envelopes. 10 have money and 10 do not. What is the probability of selecting an envelope with money before selecting 3 envelopes with no money? I am needing to find out the probability of selecting 1 thru 10 with money before getting 3 with no money.

Clear as mud?

' src=

October 19, 2021 at 10:52 am

I think you mean 6 not P on this statement

“Consequently, the joint probability of two sixes is: P (62 ⋂ 61) = 0.167 * 0.167 = 0.028”

' src=

October 20, 2021 at 12:58 am

What I wrote is correct. It’s standard probability notation the signifies the joint probability of rolling two sixes. The P just means “probability.”

' src=

October 18, 2021 at 7:59 am

Very clear explanation. Thank you.

Comments and Questions Cancel reply

7.9 Conditional Probability and the Multiplication Rule

Learning objectives.

After completing this section, you should be able to:

  • Calculate conditional probabilities.
  • Apply the Multiplication Rule for Probability to compute probabilities.

Back in Example 7.18 , we constructed the following table ( Figure 7.38 ) to help us find the probabilities associated with rolling two standard 6-sided dice:

For example, 3 of these 36 equally likely outcomes correspond to rolling a sum of 10, so the probability of rolling a 10 is 3 36 = 1 12 3 36 = 1 12 . However, if you choose to roll the dice one at a time, the probability of rolling a 10 will change after the first die comes to rest. For example, if the first die shows a 5, then the probability of rolling a sum of 10 has jumped to 1 6 1 6 —the event will occur if the second die also shows a 5, which is 1 of 6 equally likely outcomes for the second die. If instead the first die shows a 3, then the probability of rolling a sum of 10 drops to 0—there are no outcomes for the second die that will give us a sum of 10.

Understanding how probabilities can shift as we learn new information is critical in the analysis of our second type of compound events: those built with “and.” This section will explain how to compute probabilities of those compound events.

Conditional Probabilities

When we analyze experiments with multiple stages, we often update the probabilities of the possible final outcomes or the later stages of the experiment based on the results of one or more of the initial stages. These updated probabilities are called conditional probabilities .

In other words, if O O is a possible outcome of the first stage in a multistage experiment, then the probability of an event E E conditional on O O (denoted P ( E | O ) P ( E | O ) , read “the probability of E E given O O ”) is the updated probability of E E under the assumption that O O occurred.

In the example that opened this section, we might consider rolling two dice as a multistage experiment: rolling one, then the other. If we define E E to be the event “roll a sum of 10,” O O to be the event “first die shows 5,” and Q Q to be the event “first die shows 3,” then we computed P ( E ) = 1 12 P ( E ) = 1 12 , P ( E | O ) = 1 6 P ( E | O ) = 1 6 , and P ( E | Q ) = 0 P ( E | Q ) = 0 .

Example 7.31

Computing conditional probabilities.

  • April is playing a coin-flipping game with Ben. She will flip a coin 3 times. If the coin lands on heads more than tails, April wins; if it lands on tails more than heads, Ben wins. Let A A be the event “April wins,” H H be “first flip is heads,” and T T be “first flip is tails.” Compute P ( A ) P ( A ) , P ( A | H ) P ( A | H ) , and P ( A | T ) P ( A | T ) .
  • You are about to draw 2 cards without replacement from a deck containing only these 10 cards: A ♡ A ♡ , A ♠ A ♠ , A ♣ A ♣ , A ♢ A ♢ , K ♠ K ♠ , K ♣ K ♣ , Q ♡ Q ♡ , Q ♠ Q ♠ , J ♡ J ♡ , J ♠ J ♠ . We’ll define the following events: F F is “both cards are the same rank,” A A is “first card is an ace,” and K K is “first card is a king.” Compute P ( F | A ) P ( F | A ) and P ( F | K ) P ( F | K ) .
  • Jim’s sock drawer contains 5 black socks and 3 blue socks. To avoid waking his partner, Jim doesn’t want to turn the lights on, so he puts on 2 socks at random. Let M M be the event “Jim’s 2 socks match,” let K K be the event “the sock on Jim’s left foot is black,” and let L L be the event “the sock on Jim’s left foot is blue.” Compute P ( M ) P ( M ) , P ( M | K ) P ( M | K ) , and P ( M | L ) P ( M | L ) .

Step 1. The sample space is {HHH, HHT, HTH, THH, HTT, THT, TTH, TTT}. The event A A consists of the first 4 of those outcomes: HHH, HHT, HTH, and THH. Thus, P ( A ) = 4 8 = 1 2 P ( A ) = 4 8 = 1 2 .

Step 2. Now, let’s compute P ( A | H ) P ( A | H ) . We are assuming the result of the first flip is heads. That leaves us with 4 possible outcomes: HHH, HHT, HTH, and HTT. Of those, April wins 3 (HHH, HHT, HTH) and loses one (HTT). So, P ( A | H ) = 3 4 P ( A | H ) = 3 4 .

Step 3. If the result of the first flip is instead tails, the 4 possible outcomes are THH, THT, TTH, and TTT. Of those, April wins 1 (THH) and loses 3 (THT, TTH, TTT). So, P ( A | T ) = 1 4 P ( A | T ) = 1 4 .

Step 1. If the event A A happens, then 1 of the 4 aces is drawn first; the remaining cards in the deck are 3 aces, 2 kings, 2 queens, and 2 jacks. In order for the event F F to occur, the second card drawn has to be an ace. Since there are 3 aces among the remaining 9 cards, P ( F | A ) = 3 9 = 1 3 P ( F | A ) = 3 9 = 1 3 .

Step 2. If the event K K happens instead, then the first card drawn is a king. That leaves 4 aces, 1 king, 2 queens, and 2 jacks in the deck. Under the assumption that the first card is a king, the event F F will occur only if the second card is also a king. Since only one of the remaining 9 cards is a king, we have P ( F | K ) = 1 9 P ( F | K ) = 1 9 .

Step 1. We can view the event M M as a compound event using “or”: both socks are blue or both socks are black. Let’s compute the probability that both socks are blue using combinations. We’re choosing 2 socks from a group of 8; 3 of the 8 are blue. So, P ( both socks blue ) = 3 C 2 8 C 2 = 3 28 P ( both socks blue ) = 3 C 2 8 C 2 = 3 28 . Similarly, P ( both socks black ) = 5 C 2 8 C 2 = 10 28 P ( both socks black ) = 5 C 2 8 C 2 = 10 28 . Therefore, since these events are mutually exclusive, we can use the Addition Rule: P ( M ) = P ( both socks blue ) + P ( both socks black ) = 3 28 + 10 28 = 13 28 P ( M ) = P ( both socks blue ) + P ( both socks black ) = 3 28 + 10 28 = 13 28 .

Step 2. If the sock on Jim’s left foot is black (i.e., K K occurred), then there are 4 remaining black socks of the 7 in the drawer. So, P ( M | K ) = 4 7 P ( M | K ) = 4 7 .

Step 3. If the sock on Jim’s left foot is blue ( L L occurred), then there are 2 blue socks among the 7 remaining in the drawer. So, P ( M | L ) = 2 7 P ( M | L ) = 2 7 .

Your Turn 7.31

In Tree Diagrams, Tables, and Outcomes , we introduced the concept of dependence between stages of a multistage experiment. We stated at the time that two stages were dependent if the result of one stage affects the other stage. We explained that dependence in terms of the sample space, but sometimes that dependence can be a little more subtle; it’s more properly understood in terms of conditional probabilities. Two stages of an experiment are dependent if P ( E | F ) ≠ P ( E | F ′ ) P ( E | F ) ≠ P ( E | F ′ ) for some outcome of the second stage E E and outcome of the first stage F F .

Protecting Bombers in World War II

In his book How Not to Be Wrong , Jordan Ellenberg recounts this anecdote: During World War II, the American military wanted to add additional armor plating to bomber aircraft, in order to reduce the chances that they get shot down. So, they collected data on planes after returning from missions. The data showed that the fuselage, wings, and fuel system had many more bullet holes (per unit area) than the engine compartments, so the military brass wanted to add additional armor to the parts of the plane that were hit most often. Luckily, before they added the armor to the planes, they asked for a second opinion. Abraham Wald, a Jewish mathematician who had fled the rising Nazi regime, pointed out that it was far more important that the armor plating be added to areas where there were fewer bullet holes. Why? The planes they were studying had already completed their missions, so the military was essentially looking at conditional probabilities: the probability of suffering a bullet strike, given that the plane made it back safely. More bullet holes in an area on the plane indicated that was a region that wasn’t as important for the plane’s survival!

Compound Events Using “And” and the Multiplication Rule

For multistage experiments, the outcomes of the experiment as a whole are often stated in terms of the outcomes of the individual stages. Commonly, those statements are joined with “and.” For example, in the sock drawer example just above, one outcome might be “the left sock is black and the right sock is blue.” As with “or” compound events, these probabilities can be computed with basic arithmetic.

Multiplication Rule for Probability: If E E and F F are events associated with the first and second stages of an experiment, then P ( E and ⁢ F ) = P ( E ) × P ( F | E ) P ( E and ⁢ F ) = P ( E ) × P ( F | E ) .

In The Addition Rule for Probability , we considered probabilities of events connected with “and” in the statement of the Inclusion/Exclusion Principle. These two scenarios are different; in the statement of the Inclusion/Exclusion Principle, the events connected with “and” are both events associated with the same single-stage experiment (or the same stage of a multistage experiment). In the Multiplication Rule, we’re looking at events associated with different stages of a multistage experiment.

Example 7.32

Using the multiplication rule for probability.

You are president of a club with 10 members: 4 seniors, 3 juniors, 2 sophomores, and 1 first-year. You need to choose 2 members to represent the club on 2 college committees. The first person selected will be on the Club Awards Committee and the second will be on the New Club Orientation Committee. The same person cannot be selected for both. You decide to select these representatives at random.

  • What is the probability that a senior is chosen for both positions?
  • What is the probability that a junior is chosen first and a sophomore is chosen second?
  • What is the probability that a sophomore is chosen first and a senior is chosen second?
  • We need the probability that a senior is chosen first and a senior is chosen second. These are two stages of a multistage experiment, so we’ll apply the Multiplication Rule for Probability: P ( senior chosen first and senior chosen second ) = P ( senior chosen first ) × P ( senior chosen second | senior chosen first ) . P ( senior chosen first and senior chosen second ) = P ( senior chosen first ) × P ( senior chosen second | senior chosen first ) . Since there are 4 seniors among the 10 members, P ( senior chosen first ) = 4 10 = 2 5 P ( senior chosen first ) = 4 10 = 2 5 . Next, assuming a senior is chosen first, there are 3 seniors among the 9 remaining members. So, P ( senior chosen second | senior chosen first ) = 3 9 = 1 3 P ( senior chosen second | senior chosen first ) = 3 9 = 1 3 . Putting this all together, we get P ( senior chosen first and senior chosen second ) = 2 5 × 1 3 = 2 15 P ( senior chosen first and senior chosen second ) = 2 5 × 1 3 = 2 15 .
  • There are 3 juniors among the 10 members, so P ( junior chosen first ) = 3 10 P ( junior chosen first ) = 3 10 . Assuming a junior is chosen first, there are 2 sophomores among the remaining 9 members, so P ( sophomore chosen second | junior chosen first ) = 2 9 P ( sophomore chosen second | junior chosen first ) = 2 9 . Thus, using the Multiplication Rule for Probability, we have P ( junior chosen first and sophomore chosen second ) = 3 10 × 2 9 = 1 15 P ( junior chosen first and sophomore chosen second ) = 3 10 × 2 9 = 1 15 .
  • The probability that a sophomore is chosen first is 2 10 = 1 5 2 10 = 1 5 , and the probability that a senior is chosen second given that a sophomore was chosen first is 4 9 4 9 . Thus, using the Multiplication Rule for Probability, we have: P ( sophomore chosen first and senior chosen second ) = 1 5 × 4 9 = 4 45 P ( sophomore chosen first and senior chosen second ) = 1 5 × 4 9 = 4 45 .

Your Turn 7.32

Work it out, the birthday problem.

One of the most famous problems in probability theory is the Birthday Problem, which has to do with shared birthdays in a large group. To make the analysis easier, we’ll ignore leap days, and assume that the probability of being born on any given date is 1 365 1 365 . Now, if you have 366 people in a room, we’re guaranteed to have at least one pair of people who share a single birthday. Imagine filling the room by first admitting someone born on January 1, then someone born on January 2, and so on… The 365th person admitted would be born on December 31. If you add one more person to the room, that person’s birthday would have to match someone else’s.

Let’s look at the other end of the spectrum. If you choose two people at random, what is the probability that they share a birthday? As with many probability questions, this is best addressed by find out the probability that they do not share a birthday. The first person’s birthday can be anything (probability 1), and the second person’s birthday can be anything other than the first person’s birthday (probability 364 365 364 365 ). The probability that they have different birthdays is 1 × 364 365 = 364 365 1 × 364 365 = 364 365 . So, the probability that they share a birthday is 1 − 364 365 = 1 365 1 − 364 365 = 1 365 .

What if we have three people? The probability that they all have different birthdays can be obtained by extending our previous calculation: The probability that two people have different birthdays is 364 365 364 365 , so if we add a third to the mix, the probability that they have a different birthday from the other two is 363 365 363 365 . So, the probability that all three have different birthdays is 364 365 × 363 365 ≈ 0.9918 364 365 × 363 365 ≈ 0.9918 , and thus the probability that there’s a shared birthday in the group is 1 − 0.9918 ≈ 0.0082 1 − 0.9918 ≈ 0.0082 .

The big question is this: How many people do we need in the room to have the probability of a shared birthday greater than 1 2 1 2 ? Make a guess, then with a partner keep adding hypothetical people to the group and computing probabilities until you get there!

It is often useful to combine the rules we’ve seen so far with the techniques we used for finding sample spaces. In particular, trees can be helpful when we want to identify the probabilities of every possible outcome in a multistage experiment. The next example will illustrate this.

Example 7.33

Using tree diagrams to help find probabilities.

The board game Clue uses a deck of 21 cards: 6 suspects, 6 weapons, and 9 rooms. Suppose you are about to draw 2 cards from this deck. There are 6 possible outcomes for the draw: 2 suspects, 2 weapons, 2 rooms, 1 suspect and 1 weapon, 1 suspect and 1 room, or 1 weapon and 1 room. What are the probabilities for each of these outcomes?

Step 1: Let’s start by building a tree diagram that illustrates both stages of this experiment. Let’s use S, W, and R to indicate drawing a suspect, weapon, and room, respectively ( Figure 7.39 ).

Step 2: We want to start computing probabilities, starting with the first stage. The probability that the first card is a suspect is 6 21 = 2 7 6 21 = 2 7 . The probability that the first card is a weapon is the same: 2 7 2 7 . Finally, the probability that the first card is a room is 9 21 = 3 7 9 21 = 3 7 .

Step 3: Let’s incorporate those probabilities into our tree: label the edges going into each of the nodes representing the first-stage outcomes with the corresponding probabilities ( Figure 7.40 ).

Note that the sum of the probabilities coming out of the initial node is 1; this should always be the case for the probabilities coming out of any node!

Step 4: Let’s look at the case where the first card is a suspect. There are 3 edges emanating from that node (leading to the outcomes SS, SW, and SR). We’ll label those edges with the appropriate conditional probabilities, under the assumption that the first card is a suspect. First, there are 5 remaining suspect cards among the 20 left in the deck, so P ( second is suspect | first is suspect ) = 5 20 = 1 4 P ( second is suspect | first is suspect ) = 5 20 = 1 4 . Using similar reasoning, we can compute P ( second is weapon | first is suspect ) = 6 20 = 3 10 P ( second is weapon | first is suspect ) = 6 20 = 3 10 and P ( second is room | first is suspect ) = 9 20 P ( second is room | first is suspect ) = 9 20 .

Step 5: Checking our work, we see that the sum of these 3 probabilities is again equal to 1. Let’s add those to our tree ( Figure 7.41 ).

Step 6: Let’s continue filling in the conditional probabilities at the other nodes, always checking to make sure the sum of the probabilities coming out of any node is equal to 1 ( Figure 7.42 ).

Step 7: We can compute the probability of landing on any final node by multiplying the probabilities along the path we would take to get there. For example, the probability of drawing a suspect first and a weapon second (i.e., ending up on the node labeled “SW”) is 2 7 × 3 10 = 3 35 2 7 × 3 10 = 3 35 , as illustrated in Figure 7.43 .

Step 8: Let’s fill in the rest of the probabilities ( Figure 7.44 ).

Step 9: A helpful feature of tree diagrams is that the final outcomes are always mutually exclusive, so the Addition Rule can be directly applied. For example, the probability of drawing one suspect and one room (in any order) would be P ( S R ) + P ( R S ) = 9 70 + 9 70 = 9 35 P ( S R ) + P ( R S ) = 9 70 + 9 70 = 9 35 . We can find the probabilities of the other outcomes in a similar fashion, as shown in the following table:

Outcome Probability
2 suspects
2 weapons
2 rooms
1 suspect and 1 weapon
1 suspect and 1 room
1 weapon and 1 room

Checking once again, the sum of these 6 probabilities is 1, as expected.

Your Turn 7.33

The monty hall problem.

On the original version of the game show Let’s Make a Deal , originally hosted by Monty Hall and now hosted by Wayne Brady, one contestant was chosen to play a game for the grand prize of the day (often a car). Here’s how it worked: On the stage were three areas concealed by numbered curtains. The car was hidden behind one of the curtains; the other two curtains hid worthless prizes (called “Zonks” on the show). The contestant would guess which curtain concealed the car. To build tension, Monty would then reveal what was behind one of the other curtains, which was always one of the Zonks (Since Monty knew where the car was hidden, he always had at least one Zonk curtain that hadn’t been chosen that he could reveal). Monty then turned to the contestant and asked: “Do you want to stick with your original choice, or do you want to switch your choice to the other curtain?” What should the contestant do? Does it matter?

With a partner or in a small group, simulate this game. You can do that with a small candy (the prize) hidden under one of three cups, or with three playing cards (just decide ahead of time which card represents the “Grand Prize”). One person plays the host, who knows where the prize is hidden. Another person plays the contestant and tries to guess where the prize is hidden. After the guess is made, the host should reveal a losing option that wasn’t chosen by the contestant. The contestant then has the option to stick with the original choice or switch to the other, unrevealed option. Play about 20 rounds, taking turns in each role and making sure that both contestant strategies (stick or switch) are used equally often. After each round, make a note of whether the contestant chose “stick” or “switch” and whether the contestant won or lost. Find the empirical probability of winning under each strategy. Then, see if you can use tree diagrams to verify your findings.

Check Your Understanding

Section 7.9 exercises.

  • P ( tile shows A )
  • P ( tile shows A | tile shows a vowel )
  • P ( tile shows a vowel )
  • P ( tile shows a vowel | tile shows a letter that comes after M alphabetically )
Class Year
First-Year Sophomore Junior Senior Totals
138 121 148 132 539
258 301 275 283 1117
142 151 130 132 555
175 197 203 188 763
713 770 756 735 2974

In the following exercises deal with the game “Punch a Bunch,” which appears on the TV game show The Price Is Right . In this game, contestants have a chance to punch through up to 4 paper circles on a board; behind each circle is a card with a dollar amount printed on it. There are 50 of these circles; the dollar amounts are given in this table:

Dollar Amount Frequency
$25,000 1
$10,000 2
$5,000 4
$2,500 8
$1,000 10
$500 10
$250 10
$100 5

Contestants are shown their selected dollar amounts one at a time, in the order selected. After each is revealed, the contestant is given the option of taking that amount of money or throwing it away in favor of the next amount. (You can watch the game being played in the video Playing “Punch a Bunch.” ) Jeremy is playing “Punch a Bunch” and gets 2 punches.

This book may not be used in the training of large language models or otherwise be ingested into large language models or generative AI offerings without OpenStax's permission.

Want to cite, share, or modify this book? This book uses the Creative Commons Attribution License and you must attribute OpenStax.

Access for free at https://openstax.org/books/contemporary-mathematics/pages/1-introduction
  • Authors: Donna Kirk
  • Publisher/website: OpenStax
  • Book title: Contemporary Mathematics
  • Publication date: Mar 22, 2023
  • Location: Houston, Texas
  • Book URL: https://openstax.org/books/contemporary-mathematics/pages/1-introduction
  • Section URL: https://openstax.org/books/contemporary-mathematics/pages/7-9-conditional-probability-and-the-multiplication-rule

© Jul 25, 2024 OpenStax. Textbook content produced by OpenStax is licensed under a Creative Commons Attribution License . The OpenStax name, OpenStax logo, OpenStax book covers, OpenStax CNX name, and OpenStax CNX logo are not subject to the Creative Commons license and may not be reproduced without the prior and express written consent of Rice University.

Conditional Probability Explained (with Formulas and Real-life Examples)

Join over 2 million students who advanced their careers with 365 Data Science. Learn from instructors who have worked at Meta, Spotify, Google, IKEA, Netflix, and Coca-Cola and master Python, SQL, Excel, machine learning, data analysis, AI fundamentals, and more.

problem solving in conditional probability

Have you ever wondered what the likelihood of getting your dream job or winning the lottery is? At first glance, the idea seems completely out of reach, because these instances are influenced by many different factors. This is where probability comes in. While it may not help you win the lottery, it helps you calculate the odds for a variety of different scenarios – in fact, you’ve probably used it multiple times just today.

In less casual terms, probability is used by many industry professionals for its ability to resolve complex real-world problems in a more quantifiable way. Whether it’s through the different types of distribution , expected values, or mathematical modeling methods like the Monte Carlo simulation, mastering this theory will help you make a giant leap towards a successful data science career .

In this tutorial, we will introduce you to the key concept of conditional probability and how it applies to real-life instances. You will also learn how to:

  • Distinguish between independent and dependent events
  • Interpret the conditional probability formula
  • Apply the law of total probability

What Is Conditional Probability?

Essentially, conditional probability is the likelihood of an event occurring, assuming a different one has already happened. Otherwise said, there must be some sort of relationship with the past. Moreover, its formula, which we will expand on in this tutorial, is based on the Bayes’ Theorem .

But first, in order to fully understand how to calculate conditional probability, we must look at the events that can affect it.

What Are Independent and Dependent Events?

There are two types of events that can influence conditional probability:

  • Independent

It’s important to know the differences in order to successfully solve a problem. In fact, we use conditional probability to distinguish between the events.

What Is an Independent Event?

We call the theoretical probability that remains unaffected by other occurrences an independent event.

The easiest example is a coin flip – you always have a 50% chance of landing on your desired side, regardless of the result of the previous throw. In this case, we have two events – A and B. If A is flipping heads and B represents getting the same on the previous try, the probability doesn’t change – it remains 0.5. Therefore, we say that:

\[P(A) = P(A|B) = 0.5\]

What this means is that the probability of the coin landing on heads in a new flip is unconditional with respect to previous flips.

In cases where any two events are independent, the probability of their intersection is the product of the individual probabilities:

\[P(A \cap B) = P(A) \times P(B)\]

What Is a Dependent Event?

The probabilities of dependent events vary as conditions change.

For instance, what is the probability of drawing the Queen of Spades? Normally, we have exactly one favorable outcome and 52 elements in the sample space, so the result is:

\[P(A) =  \frac {1}{52}\]

Now, imagine we know that we drew a spade . The new sample space contains all the 13 cards from the suit only and the probability becomes:

\[P(A|B) =  \frac {1}{13}\]

The two events are, therefore, dependent.

Alternatively, our sample can consist of only four cards if we know that the one we have drawn is a queen instead of a spade. Thus, the probability of drawing the Queen of Spades becomes:

\[P(A|B) =  \frac {1}{4}\]

That is because the probability of getting our desired card alters if we know it is a queen. In other words, A and C are also dependent.

With this example, you could clearly see how the probability of an event changes depending on the information we have.

The Conditional Probability Formula

By definition, the conditional probability equals the probability of the intersection of events A and B over the probability of event B occurring:

\[P(A|B) =  \frac {P (A \cap B)}{P (B)}\]

This holds true only if the probability of $B > 0$. This is logically so because if we have $P(B) = 0$, then the event would never occur. Thus, $P(A|B)$ would not be interpretable.

First, to satisfy the conditional probability formula, we need both events B and A to occur simultaneously. This suggests that the intersection of A and B would consist of all our favorable outcomes.

Second, the conditional probability requires that event B occurs, so the sample space would simply be all outcomes where event B is satisfied.

It’s important to remember that the order in which we write the elements for the conditional probability is crucial. $P(A|B)$ is not the same as $P(B|A)$, even if the numeric values are equal.

To illustrate, let’s explore the characteristics of Hamilton College’s class of 2018:

  • 5% percent of the students who got a degree in Economics graduated with honors
  • At the same time, 5% of all students who graduated with honors completed a concentration in Economics

These two statements might have the same conditional probability, but they hold completely different meanings.

In particular, the first suggests that only four of the 80 Economics majors graduated with a distinction:

\[P(H|E) =  \frac {4}{80}\]

Meanwhile, the second statement shows that four out of the 80 students who graduated with high grades completed a degree in Economics:

\[P(E|H) =  \frac {4}{80}\]

Conditional Probability in Real Life: An Example

Many scientific papers rely on conducting experiments or surveys. They often provide summarized statistics we use to analyze and interpret how certain factors affect one another.

Imagine you conducted a survey where you asked 100 men and women of all ages if they eat meat and obtain the following results:

 
15 32 47
29 24 53
44 56 100

We see 15 of the 47 women that participated are vegetarian, as well as 29 out of the 53 men.

Now, if A represents being vegetarian and B represents being a woman, then $P(A|B)$ and $P(B|A)$ express different events.

The likelihood of a woman being vegetarian is:

\[P(A|B) = \frac {15}{47} \]

Meanwhile, the likelihood of a vegetarian being a woman is:

\[P(B|A) = \frac {15}{44} \]

Based on these outcomes, we can conclude that it is more likely for a vegetarian to be female, than for a woman not to eat meat. This goes to show that in probability theory things are never straightforward.

The Law of Total Probability

Now that you understand the distinctions between the different conditional probabilities of two events, we can introduce an important concept – the law of total probability.

Let’s say A is the union of some infinitely many events:

\[A = B_1 \cup B_2 \cup~...~\cup B_n\]

This law dictates that the probability of A is:

\[P(A) = P(A|B_1) \times P(B_1) + P(A|B_2) \times P(B_2)...\]

So, going back to our survey example, the probability of being vegetarian equals

\[ P(vegetarian) = P(vegetarian|male) \times P(male) \ + P(vegetarian|female) \times P(female) \]

If we plug in values from the results table, we get that the probability of being vegetarian equals:

\[\frac {29}{53} \times \frac {53}{100} + \frac {15}{47} \times \frac {47}{100} = 0.44\]

Therefore, according to the survey, there is a 44% chance of someone being vegetarian.

Conditional Probability: Next Steps

As you can see, there are many benefits to learning how to apply probability in order to solve real-life problems. In fact, the theory is used in branches such as finance , business analytics , healthcare , and many more. In other words, it is indeed an essential skill for everyone looking to work with data.

Are you ready for the next step toward a career in data science?

The 365 Data Science Program offers self-paced courses led by renowned industry experts. Starting from the very basics all the way to advanced specialization, you will learn by doing with a myriad of practical exercises and real-world business cases. If you want to see how the training works, start with our free lessons by signing up below.

World-Class

Data Science

Learn with instructors from:

Viktor Mehandzhiyski

Instructor at 365 Data Science

Victor holds a double degree in Mathematics and Economics from Hamilton College and The London School of Economics and Political Science. His wide range of competencies along with his warm and friendly approach to teaching, have contributed to the success of a great number of students. Victor’s list of courses include: Data Preprocessing with NumPy, Probability, and Time Series Analysis with Python.

We Think you'll also like

Examples of Numerical and Categorical Variables

Statistics Tutorials

Examples of Numerical and Categorical Variables

Article by Iliya Valchanov

Probability Distribution: Understanding Discrete Uniform Distribution

Calculating and Using Covariance and Linear Correlation Coefficient

Calculating and Using Covariance and Linear Correlation Coefficient

False Positive vs. False Negative: Type I and Type II Errors in Statistical Hypothesis Testing

False Positive vs. False Negative: Type I and Type II Errors in Statistical Hypothesis Testing

Conditional Probability Calculator

Conditional probability definition - what is conditional probability, how do i calculate conditional probability, conditional probability examples and solutions.

The conditional probability calculator helps you to determine the probability of an event occurring, provided it is conditional on another event .

Read further and we explain:

  • What conditional probability is;
  • How to calculate conditional probability ; and
  • In addition, we show you a real-life conditional probability example where you can also learn how to find it in practice.

If you would like to discover the connection between conditional probability and Bayes' theorem, you may check our Bayes' theorem calculator .

In probability theory, conditional probability quantifies the probability (or likelihood) of an event occurring given that another event has already occurred . This requires that probability of the second event occurring is affected by the first event happening. It is computed by multiplying the probability of the first event by the updated probability of the second, or conditional, event.

Which situations involve conditional probability? Keep reading the article to find it out!

You need the take the following steps to compute the conditional probability of P(A|B):

Determine the total probability of a given final event, B:

P(B) = P(A∩B) + P(Ā∩B) = P(A) * P(B|A) + P(Ā) * P(B|Ā)

Compute the probability of that event :

P(A∩B) = P(A) * P(B|A)

Divide the two numbers :

P(A|B) = P(A∩B) / P(B)

Let's consider a real-life example to demonstrate how to find conditional probability and show the relevance of conditional probability .

Assume that in a population, 5 percent are affected by a disease (denoted by D D D ). A test is available to check if a given person is infected.

The test's sensitivity (also known as the true positive rate ) is 91% , meaning that if the person is infected , the probability for a negative test result (denoted by □ \Box □ ) is 0.09 . On the other hand, the test's specificity (or true negative rate ) is 95% , implying that the probability of having a positive test result (assigned by ⊕ \oplus ⊕ ) when the person doesn't have the disease is 0.05 .

Now, let's consider a random person from the population taking the test and receiving a positive result. How do you find the conditional probability that the person really does have the disease ? We formulate it as P ( D ∩ ⊕ ) P(D \cap \oplus) P ( D ∩ ⊕ ) , that you read as the conditional probability of being infected given that the person has a positive test result .

We can summarize the above problem with the following conditional probability tree diagram :

Conditional probability tree diagram showing the example.

Translating into mathematical formulas, we can obtain the following equations explaining how to find conditional probability:

So, how to solve conditional probability in this situation?

You need to take the following steps :

  • Compute the total probability of having a positive result:
  • Compute the probability of an event when the random person is infected and the test result is positive. You can use the conditional probability definition:
  • Divide the two numbers , taking into account the conditional probability rules:

Thus, the conditional probability that a random person is infected that has a positive test result is 0.4892 , which is almost fifty percent - nearly analogical to tossing a fair coin. You can try to verify the result with our conditional probability calculator if you want.

Note, that the above-described situation may represent the early stages of the COVID pandemic. Even though only a tiny portion of the population has been infected (thus having antibodies), some countries strongly supported wide-range testing based on antibodies with nearly the same parameters. Therefore, it is particularly important to consider the entire clinical state of a patient with signs and symptom before taking the test, as they may present a positive result without being infected. Taking these steps increases the accuracy of the test result.

Which situations involve conditional probability?

There are many real-life situations where conditional probability matters. For example, the probability of winning the second round of a game given that you won the first round . Or the probability that it will rain given that it is cloudy.

What is the conditional probability rule?

Conditional probability measures the chances that an event occurs, given that another event has also occurred . Typically, it is stated as P(B|A) (read as the probability of B given A), where the probability of B depends on the probability of A's occurrence.

Can the conditional probability be zero?

Yes. If the probability of a given final event is zero, the conditional probability of a previous event given that final event is zero.

problem solving in conditional probability

Coefficient of determination

Humans vs vampires, schwarzschild radius.

  • Biology (103)
  • Chemistry (101)
  • Construction (148)
  • Conversion (304)
  • Ecology (32)
  • Everyday life (263)
  • Finance (597)
  • Health (443)
  • Physics (513)
  • Sports (108)
  • Statistics (184)
  • Other (186)
  • Discover Omni (40)

Conditional Probability

The conditional probability , as its name suggests, is the probability of happening an event that is based upon a condition. For example, assume that the probability of a boy playing tennis in the evening is 95% (0.95) whereas the probability that he plays given that it is a rainy day is less which is 10% (0.1). Then the former case is just normal probability whereas the latter case is the conditional probability. In this example, we represent the two probabilities as P(Play tennis) = 0.95 and P(Play tennis | Rainy day) = 0.1.

Let us learn more about conditional probability along with its formula, examples, and practice questions.

1.
2.
3.
4.
5.

What Is Conditional Probability?

Conditional probability is one of the important concepts in probability and statistics . The "probability of A given B" (or) the "probability of A with respect to the condition B" is denoted by the conditional probability P(A | B) (or) P (A / B) (or) P\(_B\)(A). Thus, P(A | B) represents the probability of A which happens after event B has happened already. the probability of an event may alter if there is a condition given.

Definition of Conditional Probability

If A and B are two events associated with the same sample space of a random experiment, the conditional probability of event A given that B has occurred is given by P(A/B) = P( A ∩ B)/ P (B) , provided P(B) ≠ 0.

Let us understand conditional probability with an example. Let us find the conditional probability of getting at least two tails given that it is a head on the first toss when 3 coins are tossed. The sample space, S (the list of all outcomes) when 3 coins are tossed is given as follows:

What Is Conditional Probability? Example

Let us assume the two events A and B as follows:

  • A = the event of getting at least two tails
  • B = the event of getting a head on the first toss

Then, A = {HTT, THT, TTH, TTT} and B = {HHH, HHT, HTH, HTT}.

Then P(A) = 4/8 = 1/2 and P(B) = 4/8 = 1/2.

We have to find the probability of getting at least two tails given that it is a head on the first toss. It means, out of all elements of B, we have to choose only the ones with two tails. We can see that among the elements of B, there is only one element (which is HTT) with two tails. Thus, the required probability is P(A | B) = 1/4 (only 1 outcome of B is favorable to A out of 4 outcomes of B).

Conditional Probability Formula

In the above example, we have got P(A | B) = 1/4, here 1 represents the element HTT which is present both in "A and B" and 4 represents the total number of elements in B. Using this, we can derive the formula of conditional probability as follows.

P(A | B) = P(A ∩ B) / P(B) (Note that P(B) ≠ 0 here)

Similarly, we can define P(B | A) as follows:

P(B | A) = P(A ∩ B) / P(A) (Note that P(A) ≠ 0 here)

These formulas are also known as the "Kolmogorov definition" of conditional probability.

conditional probability formula

  • P(A | B) = The probability of A given B (or) the probability of A which happens after B
  • P(B | A) = The probability of B given A (or) the probability of B which happens after A
  • P(A ∩ B) = The probability of happening of both A and B
  • P(A) = The probability of A
  • P(B) = The probability of B

Derivation of Conditional Probability

Note that the elements of B which favor the event A are the common elements of A and B. i.e. the sample points of A ∩ B.

Thus P(A/B) = Number of events favorable to A ∩ B ÷ Number of events favorable to B.

P(A/B) = \(\dfrac{\dfrac{n(A ∩ B)}{n(S)}}{\dfrac{n(B)}{n(S)}}\)

Thus P(A | B) = P(A ∩ B) / P(B)

Properties of Conditional Probability

Here are some properties of conditional probability along with their proofs (derivations) which we may need to use while solving the problems. All these properties depend on the conditional probability formula (which is mentioned in the previous section).

Let S be the sample space of an experiment and A be any event. Then P(S | A) = P(A | A) = 1.

By the formula of conditional probability,

P(S | A) = P(S ∩ A) / P(A) = P(A) / P(A) = 1

P(A | A) = P(A ∩ A) / P(A) = P(A) / P(A) = 1

Hence property 1 is proved.

Let S be the sample space of an experiment and A and B be any two events. Let E be any other event such that P(E) ≠ 0. Then P((A ⋃ B) | E) = P(A | E) + P(B | E) - P((A ∩ B) | E).

P((A ⋃ B) | E) = [P((A ⋃ B) ∩ E)] / P(E)

= [ P(A ∩ E) ⋃ P(B ∩ E) ] / P(E) (using a property of sets )

= [P(A ∩ E) + P(B ∩ E) - P(A ∩ B ∩ E)] / P(E) (using addition theorem of probability )

= P(A ∩ E) / P(E) + P(B ∩ E) / P(E) - P(A ∩ B ∩ E) / P(E)

= P(A | E) + P(B | E) - P((A ∩ B) | E) (By conditional probability formula)

Hence property 2 is proved.

P(A' | B) = 1 - P(A | B), where A' is the complement of the set A.

By Property 1, we have P(S | B) = 1.

We know that S = A ⋃ A'. Thus by the above property,

P( A ⋃ A' | B) = 1

Since A and A' are disjoint events,

P(A | B) + P(A' | B) = 1

  • P(A' | B) = 1 - P(A | B)

Hence property 3 is proved.

Dependent and Independent Events

The definition of independent and dependent events is connected to conditional probability. Let us see the definitions of independent and dependent events along with their formulas.

  • Dependent Events

Dependent events , as the name suggests, are any two events in which the happening of one event depends on the happening of the other event.

  • If A depends on B, then the probability of A is P(A | B).
  • If B depends on A, then the probability of B is P(B | A).

By the conditional probability formulas,

P(A | B) = P(A ∩ B) / P(B) ⇒ P(A ∩ B) = P(A | B) · P(B)

P(B | A) = P(A ∩ B) / P(A) ⇒ P(A ∩ B) = P(B | A) · P(A)

Thus, two event A and B are said to be dependent events if one of the conditions is satisfied.

  • P(A ∩ B) = P(A | B) · P(B) (or)
  • P(A ∩ B) = P(B | A) · P(A)
  • Independent Events

Independent events , as the name suggests, are any two events in which the happening of one event does not depend on the happening of the other event. i.e., if A and B are independent then P(A | B) = P(A) and P(B | A) = P(B). Thus, to get the formula of independent events, we just need to replace P(A | B) with P(A) (or P(B | A) with P(B)) in one of the above (dependent events) formulas. Hence, two events are said to be independent if

P(A ∩ B) = P(A) · P(B)

This is also called as multiplication rule of probability.

☛ Also Check:

  • Probability
  • Addition Theorem of Probability

Important Notes:

  • The probability of A given B is called the conditional probability and it is calculated using the formula P(A | B) = P(A ∩ B) / P(B).
  • The events that are part of conditional probability are dependent events. For example, if we have P(A | B) anywhere in the problem, then it means that A and B are dependent.
  • If two events A and B are independent, then P(A | B) = P(A) and P(B | A) = P(B).
  • For any two events A and B, P(A ∩ B) = P(A) · P(B). This is called the multiplication theorem of probability.

Examples of Conditional Probability

Example 1: The table below shows the occurrence of diabetes in 100 people. Let D and N be the events where a randomly selected person "has diabetes" and "not overweight". Then find P(D | N).

  Diabetes (D) No Diabetes (D')
Not overweight (N) 5 45
Overweight (N') 17 33

From the given table, P(N) = (5+45) / 100 = 50/100.

P(D ∩ N) = 5/100.

By the conditional probability formula,

P(D | N) = P(D ∩ N) / P(N)

= (5/100) / (50/100)

Answer: P(D | N) = 1/10.

Example 2: The probability that it will be sunny on Friday is 4/5. The probability that an ice cream shop will sell ice creams on a sunny Friday is 2/3 and the probability that the ice cream shop sells ice creams on a non-sunny Friday is 1/3. Then find the probability that it will be sunny and the ice cream shop sells the ice creams on Friday.

Let us assume that the probabilities for a Friday to be sunny and for the ice cream shop to sell ice creams be S and I respectively. Then,

P(S) = 4/5.

P(I | S) = 2/3.

P(I | S') = 1/3.

We have to find P(S ∩ I).

We can see that S and I are dependent events. By using the dependent events' formula of conditional probability,

P(S ∩ I) = P(I | S) · P(S) = (2/3) · (4/5) = 8/15.

Answer: The required probability = 8/15.

Example 3: If a fair die is rolled twice, observe the numbers that face up. Find the conditional probability that the sum of the numbers is 7, given that the first number is 2.

Let us determine the sample space of rolling a die twice. S = {(1,1), (1,2), (1,3), (1,4), (1,5), (1,6), (2,1), (2,2), (2,3), (2,4), (2,5), (2,6), (3,1), (3,2), (3,3), (3,4), (3,5), (3,6)(4,1), (4,2), (4,3), (4,4), (4,5), (4,6), (5,1), (5,2), (5,3), (5,4), (5,5), (5,6), (6,1), (6,2), (6,3), (6,4), (6,5), (6,6) }

Considering events A and B as given: we have

A : the sum of the numbers is 7. Thus set A = {(1,6),(2,5), (3,4), (4,3), (5,2),(6,1) }

B: the first number is 2. Thus set B = {(2,1), (2,2), (2,3), (2,4), (2,5), (2,6)}

A ∩ B: {(2,5)}

By the conditional probability, we know that P(A ) = P(A ∩ B) / P(B)

P(A ) = \(\dfrac{\dfrac{1}{36}}{\dfrac{6}{36}}\)

P(A ) = 1/6

Answer: The conditional probability that the sum of the numbers is 7, given that the first number is 2 is 1/6

go to slide go to slide go to slide

problem solving in conditional probability

Book a Free Trial Class

Practice Questions on Conditional Probability

Faqs on conditional probability.

The conditional probability is the probability of happening of an event of A given that another event B has already occurred. It is denoted by P(A | B) and it is calculated by the formula P(A | B) = P(A ∩ B) / P(B).

What Is Conditional Probability Formula?

The conditional probability of A given B is given as P(A | B) = P(A ∩ B) / P(B) and the conditional probability of B given A is P(B | A) = P(A ∩ B) / P(A).

What Are the Properties of Conditional Probability?

Here are the important properties of conditional probability. In all the properties, assume that S is the sample space and A, B, and E are the events.

  • P(S | A) = P(A | A) = 1.
  • P((A ⋃ B) | E) = P(A | E) + P(B | E) - P((A ∩ B) | E)

Which Example Does Best describe Conditional Probability?

Assume that there are 100 blood donors available in a hospital. Among them, a non-diabetic person has to be chosen given that his blood group is O + . This situation best describes conditional probability. If N and O are the events of selecting a non-diabetic person and a person with the blood group O + respectively, then the conditional probability representing the above situation is P(N | O) and is calculated using the formula, P(N | O) = P(N ∩ O) / P(O).

Which Theorem Best Explains Conditional Probability and Independence?

The multiplication theorem of probability (which is derived from conditional probability) best describes the independent events. According to this, two events A and B are said to be independent if P(A ∩ B) = P(A) · P(B).

How To Read Conditional Probability P(A | B)?

The conditional probability P(A | B) is read as "the probability of A given B" (or) "the probability of A after B has happened". P(A | B) can also be written as P(A/B) (or) P\(_B\)(A).

Why Is Conditional Probability Important?

The conditional probability is important when we have to find the probability of an event that depends on another event. If event A depends on another event B (i.e., event A happens after B has happened), then the probability of event A is denoted by the conditional probability P(A | B) and is calculated using the formula P(A/B) = P(A ∩ B)/P(B).

  • FOR INSTRUCTOR
  • FOR INSTRUCTORS

Video Available

1.4.0 Conditional Probability

In this section, we discuss one of the most fundamental concepts in probability theory. Here is the question: as you obtain additional information, how should you update probabilities of events? For example, suppose that in a certain city, $23$ percent of the days are rainy. Thus, if you pick a random day, the probability that it rains that day is $23$ percent: $$P(R)=0.23, \textrm{where } R \textrm{ is the event that it rains on the randomly chosen day.}$$ Now suppose that I pick a random day, but I also tell you that it is cloudy on the chosen day. Now that you have this extra piece of information, how do you update the chance that it rains on that day? In other words, what is the probability that it rains given that it is cloudy? If $C$ is the event that it is cloudy, then we write this as $P(R | C)$, the conditional probability of $R$ given that $C$ has occurred . It is reasonable to assume that in this example, $P(R | C)$ should be larger than the original $P(R)$, which is called the prior probability of $R$. But what exactly should $P(R | C)$ be? Before providing a general formula, let's look at a simple example.

I roll a fair die. Let $A$ be the event that the outcome is an odd number, i.e., $A=\{1,3,5\}$. Also let $B$ be the event that the outcome is less than or equal to $3$, i.e., $B=\{1,2,3\}$. What is the probability of $A$, $P(A)$? What is the probability of $A$ given $B$, $P(A|B)$?

This is a finite sample space, so $$P(A)=\frac{|A|}{|S|}=\frac{|\{1,3,5\}|}{6}=\frac{1}{2}.$$ Now, let's find the conditional probability of $A$ given that $B$ occurred. If we know $B$ has occurred, the outcome must be among $\{1,2,3\}$. For $A$ to also happen the outcome must be in $A \cap B=\{1,3\}$. Since all die rolls are equally likely, we argue that $P(A|B)$ must be equal to $$P(A|B)=\frac{|A \cap B|}{|B|}=\frac{2}{3}.$$

Now let's see how we can generalize the above example. We can rewrite the calculation by dividing the numerator and denominator by $|S|$ in the following way $$P(A|B)=\frac{|A \cap B|}{|B|}=\frac{\frac{|A \cap B|}{|S|}}{\frac{|B|}{|S|}}=\frac{P(A \cap B)}{P(B)}.$$ Although the above calculation has been done for a finite sample space with equally likely outcomes, it turns out the resulting formula is quite general and can be applied in any setting. Below, we formally provide the formula and then explain the intuition behind it.

If $A$ and $B$ are two events in a sample space $S$, then the conditional probability of $A$ given $B$ is defined as $$P(A|B)=\frac{P(A \cap B)}{P(B)}, \textrm{ when } P(B)>0.$$

Here is the intuition behind the formula. When we know that $B$ has occurred, every outcome that is outside $B$ should be discarded. Thus, our sample space is reduced to the set $B$ , Figure 1.21. Now the only way that $A$ can happen is when the outcome belongs to the set $A \cap B$. We divide $P(A \cap B)$ by $P(B)$, so that the conditional probability of the new sample space becomes $1$, i.e., $P(B|B)=\frac{P(B \cap B)}{P(B)}=1$.

Note that conditional probability of $P(A|B)$ is undefined when $P(B)=0$. That is okay because if $P(B)=0$, it means that the event $B$ never occurs so it does not make sense to talk about the probability of $A$ given $B$.

Conditional probability

  • Axiom 1: For any event $A$, $P(A|B) \geq 0$.
  • Axiom 2: Conditional probability of $B$ given $B$ is $1$, i.e., $P(B|B)=1$.
  • Axiom 3: If $A_1, A_2, A_3, \cdots$ are disjoint events, then $P(A_1 \cup A_2 \cup A_3 \cdots|B)=P(A_1|B)+P(A_2|B)+P(A_3|B)+\cdots.$
  • $P(A^c|C)=1-P(A|C)$;
  • $P(\emptyset|C)=0$;
  • $P(A|C) \leq 1$;
  • $P(A-B|C)=P(A|C)-P(A \cap B|C)$;
  • $P(A \cup B|C)=P(A|C)+P(B|C)-P(A \cap B|C)$;
  • if $A \subset B$ then $P(A|C) \leq P(B|C)$.
$P(A|B)$ $=\frac{P(A \cap B)}{P(B)}$
$= \frac{P(\emptyset)}{P(B)}$
$=0$.
$P(A|B)$ $=\frac{P(A \cap B)}{P(B)}$
$= \frac{P(B)}{P(B)}$
$=1$.
$P(A|B)$ $=\frac{P(A \cap B)}{P(B)}$
$= \frac{P(A)}{P(B)}$.

I roll a fair die twice and obtain two numbers $X_1=$ result of the first roll and $X_2=$ result of the second roll. Given that I know $X_1+X_2=7$, what is the probability that $X_1=4$ or $X_2=4$?

Let $A$ be the event that $X_1=4$ or $X_2=4$ and $B$ be the event that $X_1+X_2=7$. We are interested in $P(A|B)$, so we can use $$P(A|B)=\frac{P(A \cap B)}{P(B)}$$ We note that $$A=\{(4,1),(4,2),(4,3),(4,4),(4,5),(4,6),(1,4),(2,4),(3,4),(5,4),(6,4)\},$$ $$B=\{(6,1),(5,2),(4,3),(3,4),(2,5),(1,6)\},$$ $$A \cap B= \{(4,3),(3,4)\}.$$ We conclude $$P(A|B)=\frac{P(A \cap B)}{P(B)}$$ $$=\frac{\frac{2}{36}}{\frac{6}{36}}$$ $$=\frac{1}{3}.$$

Let's look at a famous probability problem, called the two-child problem. Many versions of this problem have been discussed [1] in the literature and we will review a few of them in this chapter. We suggest that you try to guess the answers before solving the problem using probability formulas.

  • What is the probability that both children are girls given that the first child is a girl?
  • We ask the father: "Do you have at least one daughter?" He responds "Yes!" Given this extra information, what is the probability that both children are girls? In other words, what is the probability that both children are girls given that we know at least one of them is a girl?
$P(A|B)$ $= \frac{P(A \cap B)}{P(B)}$
$= \frac{P(A)}{P(B)} \hspace{20pt}$ $(\textrm{since } A \subset B)$
$=\frac{\frac{1}{4}}{\frac{1}{2}}=\frac{1}{2}$.
$P(A|C)$ $= \frac{P(A \cap C)}{P(C)}$
$= \frac{P(A)}{P(C)} \hspace{20pt}$ $ (\textrm{since } A \subset C)$
$=\frac{\frac{1}{4}}{\frac{3}{4}}=\frac{1}{3}$.

Discussion: Asked to guess the answers in the above example, many people would guess that both $P(A|B)$ and $P(A|C)$ should be $50$ percent. However, as we see $P(A|B)$ is $50$ percent, while $P(A|C)$ is only $33$ percent. This is an example where the answers might seem counterintuitive. To understand the results of this problem, it is helpful to note that the event $B$ is a subset of the event $C$. In fact, it is strictly smaller: it does not include the element $(B,G)$, while $C$ has that element. Thus the set $C$ has more outcomes that are not in $A$ than $B$, which means that $P(A|C)$ should be smaller than $P(A|B)$.

It is often useful to think of probability as percentages. For example, to better understand the results of this problem, let us imagine that there are $4000$ families that have two children. Since the outcomes $(G,G),(G,B),(B,G)$, and $(B,B)$ are equally likely, we will have roughly $1000$ families associated with each outcome as shown in Figure 1.22. To find probability $P(A|C)$, we are performing the following experiment: we choose a random family from the families with at least one daughter. These are the families shown in the box. From these families, there are $1000$ families with two girls and there are $2000$ families with exactly one girl. Thus, the probability of choosing a family with two girls is $\frac{1}{3}$.

Figure

Let us write the formula for conditional probability in the following format $$\hspace{100pt} P(A \cap B)=P(A)P(B|A)=P(B)P(A|B) \hspace{100pt} (1.5)$$ This format is particularly useful in situations when we know the conditional probability, but we are interested in the probability of the intersection. We can interpret this formula using a tree diagram such as the one shown in Figure 1.23. In this figure, we obtain the probability at each point by multiplying probabilities on the branches leading to that point. This type of diagram can be very useful for some problems.

Tree diagram

Now we can extend this formula to three or more events: $$\hspace{70pt} P(A \cap B \cap C)=P\big(A \cap (B \cap C)\big)=P(A)P(B \cap C|A) \hspace{70pt} (1.6)$$ From Equation 1.5 , $$P(B \cap C)=P(B)P(C|B).$$ Conditioning both sides on $A$, we obtain $$\hspace{110pt} P(B \cap C|A)=P(B|A)P(C|A,B)\hspace{110pt} (1.7)$$ Combining Equation 1.6 and 1.7 we obtain the following chain rule: $$P(A \cap B \cap C)=P(A)P(B|A)P(C|A,B).$$ The point here is understanding how you can derive these formulas and trying to have intuition about them rather than memorizing them. You can extend the tree in Figure 1.22 to this case. Here the tree will have eight leaves. A general statement of the chain rule for $n$ events is as follows:

Chain rule for conditional probability: $$P(A_1 \cap A_2 \cap \cdots \cap A_n)=P(A_1)P(A_2|A_1)P(A_3|A_2,A_1) \cdots P(A_n|A_{n-1}A_{n-2} \cdots A_1)$$

In a factory there are $100$ units of a certain product, $5$ of which are defective. We pick three units from the $100$ units at random. What is the probability that none of them are defective?

$P(A_1 \cap A_2 \cap A_3)$ $=P(A_1)P(A_2|A_1)P(A_3|A_2,A_1)$
$=\frac{95}{100} \frac{94}{99} \frac{93}{98}$
$= 0.8560$

The print version of the book is available on .


  • Math Article

Conditional Probability

Class Registration Banner

Conditional probability is known as the possibility of an event or outcome happening, based on the existence of a previous event or outcome. It is calculated by multiplying the probability of the preceding event by the renewed probability of the succeeding, or conditional, event.

Here the concept of the independent event and dependent event occurs. Imagine a student who takes leave from school twice a week, excluding Sunday. If it is known that he will be absent from school on Tuesday then what are the chances that he will also take a leave on Saturday in the same week? It is observed that in problems where the occurrence of one event affects the happening of the following event, these cases of probability are known as conditional probability.

Table of Contents:

  • Marginal probability
  • Joint probability
  • Conditional probability and Bayes theorem

The probability of occurrence of any event A when another event B in relation to A has already occurred is known as conditional probability. It is depicted by P(A|B).

Conditional Probability

As depicted by the above diagram, sample space is given by S, and there are two events A and B. In a situation where event B has already occurred, then our sample space S naturally gets reduced to B because now the chances of occurrence of an event will lie inside B.

As we have to figure out the chances of occurrence of event A, only a portion common to both A and B is enough to represent the probability of occurrence of A, when B has already occurred. The common portion of the events is depicted by the intersection of both the events A and B, i.e. A ∩ B.

This explains the concept of conditional probability problems, i.e. occurrence of any event when another event in relation to has already occurred.

What is Marginal probability?

Marginal probability is the probability of an event happening, such as (p(A)), and it can be mentioned as an unconditional probability. It does not depend on the occurrence of another event. For example, the likelihood that a card is drawn from a deck of cards is black (P(black) = 0.5), and the probability that a card is drawn is 7 (P(7)=1/13), both are independent events since the outcome of another event does not condition the result of one event.

What is Joint Probability?

A joint probability is the probability of event A and event B happening, P(A and B). It is the likelihood of the intersection of two or more events. The probability of the intersection of A and B is written as P(A ∩ B). For example, the likelihood that a card is black and seven is equal to P(Black and Seven) = 2/52 = 1/26. (There are two Black-7 in a deck of 52: the 7 of clubs and the 4 of spades).

Also, read:

When the intersection of two events happen, then the formula for conditional probability for the occurrence of two events is given by;

Where P(A|B) represents the probability of occurrence of A given B has occurred.

N(A ∩ B) is the number of elements common to both A and B.

N(B) is the number of elements in B, and it cannot be equal to zero.

Let N represent the total number of elements in the sample space.

Conditional Probability Formula

Since N(A ∩ B)/N and N(B)/N denotes the ratio of the number of favourable outcomes to the total number of outcomes; therefore, it indicates the probability.

Therefore, N(A ∩ B)/N can be written as P(A ∩ B) and N(B)/N as P(B).

⇒ P(A|B) = P(A ∩ B)/P(B)

Therefore, P(A ∩ B) = P(B) P(A|B) if P(B) ≠ 0

= P(A) P(B|A) if P(A) ≠ 0

Similarly, the probability of occurrence of B when A has already occurred is given by,

P(B|A) = P(B ∩ A)/P(A)

To have a better insight, let us practice some conditional probability examples.

Conditional Probability and Bayes Theorem

Bayes’ theorem defines the probability of occurrence of an event associated with any condition. It is considered for the case of conditional probability. Also, this is known as the formula for the likelihood of “causes”.

Conditional probability

A tree diagram will help you in understanding the probability of different events in different cases.

Property 1: Let E and F be events of a sample space S of an experiment, then we have:

P(S|F) = P(F|F) = 1.

Property 2: If A and B are any two events of a sample space S and F is an event of S such that P(F) ≠ 0, then;

P((A ∪ B)|F) = P(A|F) + P(B|F) – P((A ∩ B)|F)

Property 3: P(A′|B) = 1 − P(A|B)

Problems and Solutions

Example 1: Two dies are thrown simultaneously, and the sum of the numbers obtained is found to be 7. What is the probability that the number 3 has appeared at least once?

Solution: The sample space S would consist of all the numbers possible by the combination of two dies. Therefore S consists of 6 × 6, i.e. 36 events.

Event A indicates the combination in which 3 has appeared at least once.

Event B indicates the combination of the numbers which sum up to 7.

A = {(3, 1), (3, 2), (3, 3)(3, 4)(3, 5)(3, 6)(1, 3)(2, 3)(4, 3)(5, 3)(6, 3)}

B = {(1, 6)(2, 5)(3, 4)(4, 3)(5, 2)(6, 1)}

P(A) = 11/36

P(B) = 6/36

P(A ∩ B) = 2/36

Applying the conditional probability formula we get,

P(A|B) = P(A∩B)/P(B) = (2/36)/(6/36) = ⅓

Example 2: In a group of 100 computer buyers, 40 bought CPU, 30 purchased monitor, and 20 purchased CPU and monitors. If a computer buyer chose at random and bought a CPU, what is the probability they also bought a Monitor?

Solution: As per the first event, 40 out of 100 bought CPU,

So, P(A) = 40% or 0.4

Now, according to the question, 20 buyers purchased both CPU and monitors. So, this is the intersection of the happening of two events. Hence,

P(A∩B) = 20% or 0.2

By the formula of conditional probability we know;

P(B|A) = P(A∩B)/P(B)

P(B|A) = 0.2/0.4 = 2/4 = ½ = 0.5

The probability that a buyer bought a monitor, given that they purchased a CPU, is 50%.

Frequently Asked Questions – FAQs

How do you find conditional probability, what is the difference between probability and conditional probability, why do we need conditional probability, what does given mean in probability, what is an example of conditional probability.

Quiz Image

Put your understanding of this concept to test by answering a few MCQs. Click ‘Start Quiz’ to begin!

Select the correct answer and click on the “Finish” button Check your score and answers at the end of the quiz

Visit BYJU’S for all Maths related queries and study materials

Your result is as below

Request OTP on Voice Call

MATHS Related Links

Leave a Comment Cancel reply

Your Mobile number and Email id will not be published. Required fields are marked *

Post My Comment

problem solving in conditional probability

Register with BYJU'S & Download Free PDFs

Register with byju's & watch live videos.

Reset password New user? Sign up

Existing user? Log in

Monty Hall Problem

Already have an account? Log in here.

  • Tiffany Wang
  • Geoff Pilling
  • Darryl Dennis
  • Infinity Mathematics
  • Tara Kappel
  • Sarthak Khattar
  • Yash Dev Lamba
  • Eli Strauss-Reis
  • daniel kanevsky

The Monty Hall problem is a famous, seemingly paradoxical problem in conditional probability and reasoning using Bayes' theorem . Information affects your decision that at first glance seems as though it shouldn't.

In the problem, you are on a game show, being asked to choose between three doors. Behind each door, there is either a car or a goat. You choose a door. The host, Monty Hall, picks one of the other doors, which he knows has a goat behind it, and opens it, showing you the goat. (You know, by the rules of the game, that Monty will always reveal a goat.) Monty then asks whether you would like to switch your choice of door to the other remaining door. Assuming you prefer having a car more than having a goat, do you choose to switch or not to switch?

The solution is that switching will let you win twice as often as sticking with the original choice, a result that seems counterintuitive to many. The Monty Hall problem famously embarrassed a large number of mathematicians with doctorate degrees when they attempted to "correct" Marilyn vos Savant's solution in a column in Parade Magazine . [1]

Possible Outcomes

Using bayes' theorem, variant: the random monty hall problem, example problems.

One way to see the solution is to explicitly list out all the possible outcomes, and count how often you get the car if you stay versus switch. Without loss of generality, suppose your selection was door \(1\). Then the possible outcomes can be seen in this table:

In two out of three cases, you win the car by changing your selection after one of the doors is revealed. This is because there is a greater probability that you choose a door with a goat behind it in the first go, and then Monty is guaranteed to reveal that one of the other doors has a goat behind it. Hence, by changing your option, you double your probability of winning.

Another way of seeing the same set of options is by drawing it out as a decision tree, as in the following image:

There are two aspects of the Monty Hall problem that many struggle to agree with. First, why aren’t the odds 50-50 after the host opens the door? Why is it that switching doors has a 2 in 3 chance of winning when sticking with the first pick only has a 1 in 3 chance? Secondly, why is it the case that if Monty opened a door truly randomly and happened to show a goat, then the odds of staying vs. switching doors are now 50-50? Bayes' theorem can answer these questions.

Bayes’ theorem is a formula that describes how to update the probability that a hypothesis is correct, given evidence. In this case, it’s the probability that our initially picked door is the one with the car behind it (that staying is right) given that Monty has opened a door showing a goat behind it: that Monty has shown us that one of the choices we didn’t pick was the wrong choice. Let \(H\) be the hypothesis "door 1 has a car behind it," and \(E\) be the evidence that Monty has revealed a door with a goat behind it. Then the problem can be restated as calculating \(P(H \mid E)\), the conditional probability of \(H\) given \(E\).

Since every door either has a car or a goat behind it, the hypothesis "\(\text{not} H\)" is the same as "door 1 has a goat behind it."

In this case, Bayes' theorem states that

\[P(H \mid E) = \frac{P(E \mid H)} {P(E)} P(H) = \frac{ P(E\mid H) \times P(H)} {P(E\mid H) \times P(H) + P(E\mid \text{not} H) \times P(\text{not} H)}. \]

The problem as stated says that Monty Hall deliberately shows you a door that has a goat behind it.

Breaking down each of the components of this equation, we have the following:

  • \( P(H) \) is the prior probability that door 1 has a car behind it, without knowing about the door that Monty reveals. This is \(\frac{1}{3}\).
  • \( P(\text{not} H) \) is the probability that we did not pick the door with the car behind it. Since the door either has the car behind it or not, \(P(\text{not} H) = 1 - P(H) = \frac{2}{3}\).
  • \( P(E \mid H) \) is the probability that Monty shows a door with a goat behind it, given that there is a car behind door 1. Since Monty always shows a door with a goat, this is equal to \(1\).
  • \( P(E\mid \text{not} H) \) is the probability that Monty shows the goat, given that there is a goat behind door 1. Again, since Monty always shows a door with a goat, this is equal to \(1\).

Combining all of this information gives

\[ P(H \mid E) = \frac {1 \times \frac13} {1 \times \frac13 + 1\times \frac23} = \frac {\hspace{1mm} \frac13\hspace{1mm} }{1} = \frac{1}{3}. \]

The probability that the car is behind door 1 is completely unchanged by the evidence. However, since the car can only either be behind door 1 or behind the door Monty didn't reveal, the probability it is behind the door that is not revealed is \(\frac{2}{3}\). Therefore, switching is twice as likely to get you the car as staying.

This result depends crucially on the fact that Monty was always guaranteed to open a door with a goat behind it, regardless of what door you picked initially. That is, \(P(E \mid H) = P(E \mid \text{not}H)\). Now consider what would happen if Monty randomly opened a door we did not pick and it contained a goat. What is the probability that our first pick is correct, regardless of which specific door we picked?

In this case, \( P(E \mid H), \) the probability that Monty will show us a door with a goat behind it given that our first pick was correct and does have a car behind it, is still \(1\). If you picked the door with the car, the two other doors are guaranteed to have a goat.

But \( P(E \mid \text{not} H) \) changes. This represents the probability that Monty picks a door with a goat behind it given that your original choice of door had a goat behind it. In this case, Monty chooses randomly between one door that has a goat behind it and one door that doesn't have a goat behind it. Therefore, the probability that he picks a door with a goat is \(P(E \mid \text{not} H) = \frac{1}{2}\).

Laying this out, we get

\[ P(H \mid E) = \frac{ P(E\mid H) \times P(H)} {P(E \mid H) \times P(H) + P(E \mid \text{not} H) \times P(\text{not} H)} = \frac{1\times \frac13} {1\times \frac13 + \frac12 \times \frac23} = \frac{\hspace{1mm} \frac13\hspace{1mm} } {\hspace{1mm}\frac23\hspace{1mm}} = \frac12. \]

There is a \(\frac12,\) or 50%, chance of our first pick being correct when Monty randomly opens a door and it happens to have a goat behind it. The naive reasoning that fooled so many mathematicians works in this case.

Many people have probably heard of the Monty Hall problem. Here is a different version of it.

You are playing on a game show and have made it to the last round. You have a chance to win a car! The game show host shows you three doors. He claims that behind one of the doors is the car, and behind the other two are goats. The game show host asks you to pick a door and explains what will happen after you pick your door. Before your door is opened, the host will open one of the other two doors at random . If that door reveals the car, you automatically win it! If it turns out to reveal a goat, you will have the option to swap your chosen door and open the door you didn't choose in the beginning. If the door you open reveals the car, you win the car.

So here is what happens: You pick the door on the right. The host chooses to open the door in the middle. As it turns out, that door was holding a goat. Now you have the option to switch. Should you switch, stick, or does it not matter what you choose to do?

Which action would give you the highest chance of winning the car?

Monty Hall decides to perform his final episode of the Let's Make a Deal series with a little twist, and Calvin is elated when he is the first contestant to be called to the stage. Everyone eagerly watches as Calvin approaches the stage, waiting to see the surprise Mr. Hall will present.

Mr. Hall then hollers into his microphone, "AND THE SURPRISE IS...... CALVIN WILL BE PLAYING WITH 1000 DOORS INSTEAD OF JUST 3." The audience gasps, but Mr. Hall keeps talking, explaining the rules:

  • 999 of the 1000 doors covers a pig, while the last covers the most amazing super special magnificent supercar of your dreams .
  • Calvin will pick 1 of the 1000 doors, after which I will open 998 doors which cover a pig, leaving two doors for Calvin to choose from.
  • Calvin will then have to choose whether to open the door he originally chose or the door I left closed.

Should Calvin open the door which he originally chose, or switch to the door which Mr. Hall did not open?

In a game show, there are 3 doors. Two doors have nothing behind them, but one door has a brand new shiny red car. The game show host knows which door has the car. You pick a door, and before the host opens it, he opens a door that you did not pick, which has nothing behind it. Now you have the choice of switching to the closed door that hasn't been touched yet, or staying at the door you originally picked.

Which choice is better, if you want the brand new shiny red car?

This is not an original problem.

A host places 100 boxes in front of you, one of which contains the holy grail.

You pick box 3. The host removes all the boxes except 3 and 42, stating that the holy grail is in one of these boxes.

What is the probability that the holy grail is in box 42?

Suppose you're a contestant on a game show and the host shows you 5 curtains. The host informs you that behind 3 of the curtains lie lumps of coal, but behind the other 2 curtains lie separate halves of the same $10,000 bill. He then asks you to choose 2 curtains; if these 2 curtains are the ones with the 2 bill halves behind them then you win the $10,000, otherwise you go home with nothing.

After you choose your 2 curtains, the host opens one of the remaining 3 curtains that he knows has just a lump of coal behind it. He then gives you the following options:

(0) stick with the curtains you initially chose, (1) swap either one of your curtains for one of the remaining curtains, or (2) swap both of your curtains for the remaining 2 curtains.

Let \(p(k), k = 0, 1, 2\), be the respective probabilities of winning the money in scenarios \((k)\) as outlined above. Then

\[p(2) - p(0) - p(1) = \dfrac{a}{b},\]

where \(a\) and \(b\) are coprime positive integers. Find \(a + b\).

You find yourself on a game show and there are 10 doors. Behind nine of them are assorted, random farm animals including a variety of pigs, goats, and geese, but behind one is a brand-new, shiny, gold car made of real gold!

The game proceeds as follows:

  • You pick a door.
  • The game show host then opens a door you didn't choose that he knows has only farm animals behind it.
  • You are then given the option to switch to a different, unopened door, after which he opens another door with farm animals behind it.

This process continues until there are only two doors left, one being your current choice. (Every time the host opens a door, you are given another option to switch or stick with the one you currently have selected.)

If you play optimally, your chances of winning the car are of the form \( \frac ab\), where \(a\) and \(b\) are coprime positive integers.

Find \(a+b\).

\(\) Details and Assumptions:

  • You know ahead of time that this process will continue until you are down to only two doors.
  • Assume that you prefer the car over any of the farm animals!

Photo credit: http://iloboyou.com/

More probability questions: Check out my other problems.

You find yourself on a game show, and the host presents you with four doors. Behind three doors are an assortment of gummy bears, and the remaining door has a pure gold car behind it!

You pick a door, and then the host reveals a door behind which he knows is only a couple of red gummy bears. Then you are given the choice to stick with your first choice or switch to one of the other two unopened doors.

If the probability that you will win the car if you switch is \( \frac ab\), where \(a\) and \(b\) are coprime positive integers, what is \(a+b?\)

More probability questions:

Photo credit: http://www.huffingtonpost.com/

On a game show, there is a popular game that is always carried out in the same way. A contestant is given the choice of three doors: behind one door is a car and behind the other two doors are goats. The contestant picks a door, say #1, and the host, who knows what's behind each door, always opens another door, say #3, to reveal a goat. Then, the contestant is given the option to switch to the other unopened door, door #2 in this case.

A long-term fan of the game show has noticed a hint in the staging of the game by the game show host. Thus, this fan can correctly guess the door with the car behind 50% of the time before any door selection is made.

Now, this fan has been selected as a contestant for the game. Using the best possible strategy, what is the probability (as a percentage) that this fan will end up with the car prize?

Question: Can you devise your own variations of the Monty Hall problem?

[1] Crockett, Zachary. The Time Everyone 'Corrected' the World's Smartest Woman. Priceonomics . 19 Feb 2015. Retrieved from http://priceonomics.com/the-time-everyone-corrected-the-worlds-smartest/ on 29 Feb 2016.

Problem Loading...

Note Loading...

Set Loading...

MathBootCamps

Conditional probability – notation and calculation.

When finding a conditional probability, you are finding the probability that an event A will occur, given that another event, event B, has occurred. In this article, we will look at the notation for conditional probability and how to find conditional probabilities with a table or with a formula. [adsenseWide]

Table of contents:

The image below shows the common notation for conditional probability. You can think of the line as representing “given”. On the left is the event of interest, and on the right is the event we are assuming has occurred.

Conditional probability notation. P(A|B) is read as probability of A given B.

With this notation, you could also use words to describe the events. For example, let’s say you wanted to find the probability someone buys a new car, when you know they have started a new job. This would be represented as:

Image showing conditional probability notation. In this example, we are finding the probability that someone buys a new car given that they started a new job. This is written P(new car | new job)

Example using a table of data

One of the common types of problems you will see uses a two-way table of data . Here, we will look at how to find different probabilities using such a table.

A survey asked full time and part time students how often they had visited the college’s tutoring center in the last month. The results are shown below.

two-way-table-conditional-probability-example

Suppose that a surveyed student is randomly selected.

(a) What is the probability the student visited the tutoring center four or more times, given that the student is full time?

Conditional probability is all about focusing on the information you know. When calculating this probability, we are given that the student is full time. Therefore, we should only look at full time students to find the probability.

Two way table with only the information about full time students highlighted. There were a total of 45 full times students with 8 having visited tutoring four or more times. Therefore P(four or more times |full time) = 8 / 45.

(b) Suppose that a student is part time. What is the probability that the student visited the tutoring center one or fewer times?

This one is a bit more tricky due to the wording. Think of it in the following way:

Since we are assuming (or supposing) the student is part time, we will only look at part time students for this calculation.

tTwo way table with only part time student data highlighted. In a total of 13 part time students, only 2 went to tutoring one or fewer times. Therefore P(one or fewer times | part time) = 2/13.

(c) If the student visited the tutoring center four or more times, what is the probability he or she is part time?

As above, we need to make sure we know what is given, and what we are finding.

For this question, we are only looking at students who visited the tutoring center four or more times.

Two way table with only the data for students who visited tutoring four or more times highlighted. There were 14 such students, and 6 were part time, so P( part time | four or more visits) = 6/14.

As you can see, when using a table, you just need to pay attention to which group from the table you should focus on.

Examples of using the formula to find conditional probability

In some situations, you will need to use the following formula to find a conditional probability.

The conditional probability formula. P(A give B) = P(A and B) divided by P(B).

This formula could actually be used with the table data, though it is often easier to apply in problems similar to the next example.

In a sample of 40 vehicles, 18 are red, 6 are trucks, and 2 are both. Suppose that a randomly selected vehicle is red. What is the probability it is a truck?

We are asked to find the following probability:

\(\text{P(truck}|\text{red)}\)

Applying the formula:

\(\begin{align}\text{P(truck}|\text{red)} &= \dfrac{\text{P(truck and red)}}{\text{P(red)}}\\ &= \dfrac{\tfrac{2}{40}}{\tfrac{18}{40}}\\ &= \dfrac{2}{18}\\ &= \dfrac{1}{9} \approx \boxed{0.11}\end{align}\)

The thinking behind the formula is very similar to the thinking used with the table. For example, notice that what we “know” ends up on the bottom of the fraction. We can also apply this to situations where we are given probabilities and not counts.

A board game comes with a special deck of cards, some of which are black, and some of which are gold. If a card is randomly selected, the probability it is gold is 0.20, while the probability it gives a second turn is 0.16. Finally, the probability that it is gold and gives a second turn is 0.08.

Suppose that a card is randomly selected, and it allows a player a second turn. What is the probability it was a gold card?

This time, we are given the following probabilities:

We are trying to calculate:

\(\text{P(gold}|\text{second turn)}\)

We can apply the formula to find this probability:

\(\begin{align}\text{P(gold}|\text{second turn)} &= \dfrac{\text{P(gold and second turn)}}{\text{P(second turn)}}\\ &= \dfrac{0.08}{0.16}\\ &= \boxed{0.5}\end{align}\)

You can see that this works out very nicely if you take a moment to write down the information given in the problem. In fact, you could really say that about any real-life/ word problem in math!

[adsenseLargeRectangle]

Conditional probability is different from other probabilities in that you know, or are assuming, that some other event has already occurred. Therefore when you calculate the probability, you must “narrow your focus” down to the known event. If you are given a table of data, this means focusing only on the row or column of interest. With the formula, this means that the probability of the known event will be in the denominator.

Share this:

  • Click to share on Twitter (Opens in new window)
  • Click to share on Facebook (Opens in new window)

Probability

Probability is traditionally considered one of the most difficult areas of mathematics , since probabilistic arguments often come up with apparently paradoxical or counterintuitive results. Examples include the Monty Hall paradox and the birthday problem . Probability can be loosely defined as the chance that an event will happen.

  • 1 Video For Beginners!
  • 2 Introductory Probability
  • 3.1 Types of Probability
  • 3.2.1 Introductory
  • 3.2.2 Intermediate
  • 4 Resources

Video For Beginners!

https://youtu.be/OOdK-nOzaII?t=979

Introductory Probability

Before reading about the following topics, a student learning about probability should learn about introductory counting techniques.

  • dependent probability
  • independent probability

Formal Definition of Probability

The foundations of probability reside in an area of analysis known as measure theory . Measure theory in general deals with integration , in particular, how to define and extend the notion of "area" or "volume." Intuitively, therefore, probability could be said to consider how much "volume" an event takes up in a space of outcomes. Measure theory does assume considerable mathematical maturity, so it is usually ignored until one reaches an advanced undergraduate level. Once measure theory is covered, probability does become a lot easier to use and understand.

$(\Omega, \mathfrak{a}, \mathit{P})$

We can interpret this as saying that the event of getting Heads, and the event of getting Tails, each take up an equal half of the set of possible outcomes; the event of getting Heads or Tails is certain, and likewise the event of getting neither Heads nor Tails has probability 0.

Of course, to understand this example doesn't need measure theory, but it does show how to translate a very basic situation into measure-theoretic language. Furthermore, if one wanted to determine whether the coin was fair or weighted, it would be difficult to do that without using inferential methods derived from measure theory.

Types of Probability

Part of a comprehensive understanding of basic probability includes an understanding of the differences between different kinds of probability problems.

  • algebraic probability
  • combinatorial probability problems involve counting outcomes.
  • geometric probability

Important subdivisions of probability include

  • stochastic processes
  • mathematical statistics

Example Problems

Introductory.

  • 2006 AMC 10B Problem 17
  • 2006 AMC 10B Problem 21

Intermediate

  • 2006 AIME II Problem 5
  • 2007 AIME II Problem 10
  • Introduction to Counting and Probability by David Patrick
  • Intermediate Counting and Probability by David Patrick
  • Combinatorics
  • Mathematics

Something appears to not have loaded correctly.

Click to refresh .

problem solving in conditional probability

IMAGES

  1. Conditional Probability

    problem solving in conditional probability

  2. Conditional Probability Formula

    problem solving in conditional probability

  3. Conditional Probability

    problem solving in conditional probability

  4. Conditional probability

    problem solving in conditional probability

  5. PPT

    problem solving in conditional probability

  6. Conditional Probability

    problem solving in conditional probability

VIDEO

  1. Conditional probability

  2. Conditional Probability Problem-Solving Activity

  3. Solving Conditional Probability Problem Using Venn Diagram

  4. Problem-Solving: Conditional Statements With 4 Examples Solved

  5. Probability simple exercises

  6. conditional probability

COMMENTS

  1. 3.2: Problems on Conditional Probability

    What is the (conditional) probability that at least one turns up six, given that the sum is \(k\), for each \(k\) from two through 12? Answer. a. There are \(6 \times 5\) ways to choose all different. There are \(2 \times 5\) ways that they are different and one turns up two spots. The conditional probability is 2/6.

  2. Conditional Probability

    A lot of difficult probability problems involve conditional probability. These can be tackled using tools like Bayes' Theorem, the principle of inclusion and exclusion, and the notion of independence. Submit your answer A bag contains a number of coins, one of which is a two-headed coin and the rest are fair coins. A coin is selected at random and tossed. If the probability that the toss ...

  3. Conditional Probability Questions With Solutions

    Conditional Probability Questions with Solutions. Let us solve some questions based on conditional probability with detailed solutions. Question 1: Ten numbered cards are there from 1 to 15, and two cards a chosen at random such that the sum of the numbers on both the cards is even. Find the probability that the chosen cards are odd-numbered.

  4. Solved Problems Conditional Probability

    1.4.5 Solved Problems: Conditional Probability. In die and coin problems, unless stated otherwise, it is assumed coins and dice are fair and repeated trials are independent. Problem. You purchase a certain product. The manual states that the lifetime T of the product, defined as the amount of time (in years) the product works properly until it ...

  5. Conditional Probability

    Divide by P (A): P (B|A) = P (A and B) / P (A) And we have another useful formula: "The probability of event B given event A equals. the probability of event A and event B divided by the probability of event A". Example: Ice Cream. 70% of your friends like Chocolate, and 35% like Chocolate AND like Strawberry.

  6. 8.4.1: Conditional Probability (Exercises)

    SECTION 8.4 PROBLEM SET: CONDITIONAL PROBABILITY. Questions 1 - 4: Do these problems using the conditional probability formula: \(P(A | B)=\frac{P(A \cap B)}{P(B)}\). ... At a college, 20% of the students take Finite Math, 30% take History, and 5% take both Finite Math and History. If a student is chosen at random, find the following ...

  7. Conditional Probability

    A conditional probability is a probability that a certain event will occur given some knowledge about the outcome or some other event. The concept of conditional probability is closely tied to the concepts of independent and dependent events. Probability problems that provide knowledge about the outcome can often lead to surprising results. A good example of this is the Monty Hall Problem ...

  8. Conditional probability

    Solution: The probability that the sum of the first two die is equal to the 3rd die is just another way to also equivalent to the probability that the sum of the numbers on the first two die is less than 7, which is . The probability that a two is rolled and that it meets the first condition is . dividing gets us .

  9. 3.6: Conditional Probability

    The probability of event B happening, given that event A already happened, is called the conditional probability. The conditional probability of B, given A is written as P(B|A) P (B | A), and is read as "the probability of B given A happened first.". We can use the General Multiplication Rule when two events are dependent.

  10. Conditional Probability: Definition, Formula & Examples

    In the conditional probability formula, the numerator is a subset of the denominator. Together, the formula gives us the ratio of the chances of both events occurring relative to the likelihood that the given event occurs, which is the conditional probability! Therefore, if the ratio equals one, event A always occurs when event B has occurred.

  11. Khan Academy

    If this problem persists, tell us. Our mission is to provide a free, world-class education to anyone, anywhere. Khan Academy is a 501(c)(3) nonprofit organization. Donate or volunteer today! Site Navigation. About. News; Impact; Our team; Our interns; Our content specialists; Our leadership; Our supporters; Our contributors; Our finances;

  12. 7.9 Conditional Probability and the Multiplication Rule

    The Birthday Problem. One of the most famous problems in probability theory is the Birthday Problem, which has to do with shared birthdays in a large group. To make the analysis easier, we'll ignore leap days, and assume that the probability of being born on any given date is 1 365 1 365. Now, if you have 366 people in a room, we're ...

  13. Conditional Probability Explained (Formulas & Examples)

    There are two types of events that can influence conditional probability: Independent; Dependent; It's important to know the differences in order to successfully solve a problem. In fact, we use conditional probability to distinguish between the events. What Is an Independent Event?

  14. Practice Conditional Probability

    Conditional probability allows us to apply partial knowledge about a situation to better predict the ultimate outcome. However, more misconceptions arise from this mathematics than from almost any other single topic in statistics! Expect to see and learn how to solve questions like this one: Conditional probability can be counter-intuitive, but ...

  15. Conditional Probability Calculator

    In probability theory, conditional probability quantifies the probability (or likelihood) of an event occurring given that another event has already occurred.This requires that probability of the second event occurring is affected by the first event happening. It is computed by multiplying the probability of the first event by the updated probability of the second, or conditional, event.

  16. Conditional Probability

    The probability of A given B is called the conditional probability and it is calculated using the formula P (A | B) = P (A ∩ B) / P (B). The events that are part of conditional probability are dependent events. For example, if we have P (A | B) anywhere in the problem, then it means that A and B are dependent.

  17. Conditional Probability

    Let's look at a famous probability problem, called the two-child problem. Many versions of this problem have been discussed in the literature and we will review a few of them in this chapter. We suggest that you try to guess the answers before solving the problem using probability formulas. Example . Consider a family that has two children.

  18. Conditional Probability

    Definition. The probability of occurrence of any event A when another event B in relation to A has already occurred is known as conditional probability. It is depicted by P (A|B). As depicted by the above diagram, sample space is given by S, and there are two events A and B. In a situation where event B has already occurred, then our sample ...

  19. Monty Hall Problem

    The Monty Hall problem is a famous, seemingly paradoxical problem in conditional probability and reasoning using Bayes' theorem. Information affects your decision that at first glance seems as though it shouldn't. In the problem, you are on a game show, being asked to choose between three doors. Behind each door, there is either a car or a goat. You choose a door. The host, Monty ...

  20. Conditional Probability Practice Questions

    Conditional Probability Practice Questions - Corbettmaths. Welcome. Videos and Worksheets. Primary. 5-a-day.

  21. 4 Examples of Using Conditional Probability in Real Life

    Example 4: Traffic. Traffic engineers use conditional probability to predict the likelihood of traffic jams based on stop light failures. For example, suppose the following two probabilities are known: P (stop light failure) = 0.001. P (traffic jam∩stop light failure) = 0.0004.

  22. Conditional probability

    Example. A board game comes with a special deck of cards, some of which are black, and some of which are gold. If a card is randomly selected, the probability it is gold is 0.20, while the probability it gives a second turn is 0.16. Finally, the probability that it is gold and gives a second turn is 0.08.

  23. Probability

    Probability. Probability is traditionally considered one of the most difficult areas of mathematics, since probabilistic arguments often come up with apparently paradoxical or counterintuitive results. Examples include the Monty Hall paradox and the birthday problem. Probability can be loosely defined as the chance that an event will happen.