Calculating conditional probability | Probability and Statistics | Khan Academy
- Articles, Blog

Calculating conditional probability | Probability and Statistics | Khan Academy


Voiceover:Rahul’s two favorite foods are bagels and pizza. Let A represent the event that he eats a bagel for breakfast and let B represent the event that he eats pizza for lunch. Fair enough. On a randomly selected
day, the probability that Rahul will eat a bagel for breakfast, probability of A, is .6. Let me write that down. So the probability that he eats a bagel for breakfast is 0.6. The probability that he
will eat a pizza for lunch, probability of event B … So the probability of … Let me do that in that red color. The probability of event B, that he eats a pizza for lunch, is 0.5. And the conditional
probability, that he eats a bagel for breakfast given that he eats a pizza for lunch, so
probability of event A happening, that he eats
a bagel for breakfast, given that he’s had a pizza for lunch is equal to 0.7, which is interesting. So let me write this down. The probability of A given,
given that B is true. Given B, is not 0.6, it’s equal to 0.7. And because these two
things are not the same, because the probability of A by itself is different than the probability of A given that B is true, this tells us that these two events are not independent. That we’re dealing with
dependent probability. This shows us. The fact that B being true has changed the probability of A
being true, this tells us that A and B are dependent. Dependent. And so when we start thinking … Well actually let’s just, before I start going on my little soapbox
about dependent events, let’s just think about what they actually want us to figure out. So the probability, the probability of A given B is equal to 0.7, that’s what we wrote right over here. Based on this information,
what is the probability of B given A? So they want us to figure
out the probability of B given … Probability of B given A. That’s what they want us to figure out. The conditional probability that Rahul eats pizza for lunch, given that he eats a bagel for breakfast, rounded to the nearest hundredth. So how would we think about this? And I encourage you to
pause this video before I work through it. So I’m assuming you’ve given a go at it. So the best way to tackle this is to just think about, well, what’s
the probability that both A and B are going to happen? Well, the probably of
A and B happening … And let me do this in a new color. The probability of A and B happening. A and B. I want to stay true to the colors. Is equal to … There’s a couple of ways
you could write this out. This is equivalent to,
this is equivalent to the probability, probability of A given B. Given B, times the probability of B. And hopefully that makes sense. The probability that B happens and that given that B had happened, the probability that A happens. And that would also be equal to … So obviously this is A and B is happening, or you could do it the other way around. You could view it as
the probability that B, the probability that B given A happens. Given A happens, times
the probability of A. Times the probability of A. This also makes sense. What’s the probability that A happened? And that, given A happened, what’s the probability of B? You multiply those together, you get the probability that both happened. So why is this helpful for us? Well, we know a lot of this information. We know the probability
of A given B is 0.7. So let me write that, I’ll
scroll down a little bit. This is 0.7. We know that the probability of B is 0.5. So this is 0.5. So we know that the probability of A and B is the product of these two things. That’s going to be 0.35. Seven times five is 35
or, I guess you could say, half of .7 is 0.35. .5 of .7. And that is going to be
equal to what we need to figure out. Probability of B given A
times probability of A. But we know probability of A. We know that that is 0.6. We know that this is 0.6. So just like that, we’ve
set up a situation, an equation, where we can
solve for the probability of B given A. The probability of B given A. Notice, let me just
rewrite it right over here. Actually, I’ll write this part first. 0.6, 0.6 times the
probability of B given A. Times that, right over there. And I’ll just copy and paste it so I don’t have to keep changing colors. That, over there, is equal to 0.35. Is equal to 0.35. And so to solve for the probability of B given A, we can just
divide both sides by 0.6. 0.6, 0.6 and we get the probability of B given A is equal to … Let me get our calculator out. So 0.35 divided by, divided by 0.6 and we deserve a little
bit of a drum roll here, is .5833 … It keeps going. They tell us to round to
the nearest hundredth. So it’s 0.58. Is approximately, is approximately 0.58. So notice, this is equal to 0 … or I’ll say approximately equal to 0.58. Once again, verifying
that these are dependent. The probability that B
happens given A is true, is higher than just the probability that B by itself, or without
knowing anything else. Just the probability of B is lower than the probability of
B given that you know, given that you know A has happened, or event A is true. And we’re done.

About James Carlton

Read All Posts By James Carlton

53 thoughts on “Calculating conditional probability | Probability and Statistics | Khan Academy

  1. The probability that a person, selected at random from a given population,
    exhibits classical symptoms of a certain disease =0.2. The probability that a
    person, selected at random etc., has this disease =0.23. The probability that a
    person, selected at random etc., has the symptoms and has the disease =0.18.
    If a person, selected at random from the population, does not have the
    symptoms, what is the probability that he/she has the disease?

  2. Omgness l just about understand this let's see if in two hours time I have managed to retained this information. If l do well l have managed to surprise myself.

  3. next time please give us the formula first then work through the example instead of expecting us to work through it without the formula – thanks

  4. #blessKahn I thought I was gonna fail my stats test , lol I prob will but at least I'll get a higher score than I would've if I didn't study 😂

  5. How can his probability of breakfast be dependant on what he ate for lunch if breakfast comes before lunch so wouldn't be affected by it?

  6. Can someone explain me what does "given" in math mean? A was not able to find out how to translate it to my language.

  7. Mr Khan, can you please not waste so much time on things you don't need to do, like using different colours and 'mistakenly' using the wrong colour so you can waste time by erasing it and using the correct one. i'm writing an exam tomorrow and i don't have much time, all i'm saying is that the video would've been much shorter and your students could use the time to watch more of your videos, giving you more views. With all due respect. Please don't block me.

  8. There are more things but I won't mention them cause I don't want to be 'That guy', I probably already am but…

  9. How can this example make logical sense? One test subject (Rahul) was observed X number of days to give the probability of A and B happening (distinct values given for each event!). Now A and B are observed to happen on the same day. So how can you have a distinct number such as the value for A occurring and then a distinct number of B occurring GIVEN that they are both dependent on each other happening. I would argue that you could not have this example, A (as given to us here) can be dependent on B but B cannot be dependent on A this would create (in my mind ) a circular argument. How could you observe independent values for A and B if they are both occurring in the same system. If I am right then this is example was created by a none scientist. The only way ( that I can see) someone generating this question is if they have never performed an experiment. Otherwise, you would see the flaw in observing 1 test subject and coming up with Values (A or B) which are "constants" yet dependent on each other. This is an excellent example of how you can use math to get a number that means nothing.

  10. I don't understand how come you guys can't just have easier questions or not repeat the same process for each problem
    coin, deck of cards none of these helping me

  11. So…Rahul is a tad LESS likely to eat pizza for lunch given that he's eaten a bagel for breakfast? About 2 percent less likely? If I got that right, then Rahul eating pizza for lunch given that he's eaten a bagel for breakfast seems statistically insignificant. He's eating too much of both each time.

  12. I don't understand the conditional probability P (A | B) when you can't eat breakfast before lunch. Doesn't the dependent variable have to come AFTER the independent variable?

Leave a Reply

Your email address will not be published. Required fields are marked *