# 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. ## 53 thoughts on “Calculating conditional probability | Probability and Statistics | Khan Academy”

1. noeggarcia19 says:

All Hail Kahn

2. Zoë Schipper says:

This is so damn good!!! Thank very much!

3. Rish Naidu says:

Thanks alot!!! Great vid

4. Bayden Hiscocks says:

Anyone know what it means when A' has that symbol above it?

5. sahana surya says:

very useful

6. Ravi Shankar says:

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?

7. Ricky Wheeler says:

What is the probibility that in an exam the guy in the question will have an Arabic name?

8. moneytrees - says:

thanks, helped a lot

9. Monica Greenaway says:

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.

10. Musikana wacho says:

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

11. Pankaj Singh says:

why u make it so complec. just use Bayes theorem.

12. Juicy_Corgi says:

Thank you very much.

13. Asmaa Alhibshi says:

You sir are awesome 🙏🏻🙏🏻

14. Eric Duquesne says:

thank you, I finally understood !

15. ArielNyalila says:

I khan not think of anyone who would explain this like you

16. Libby Knight says:

This doesn't make sense

17. Deum Sum says:

QUIT REPEATING YOURSELF. WASTES SO MUCH TIME

18. Jackson Joestar says:

Why does the audio of every video but Khan Academy videos play!? KHAAAAAAAAAAAAAAAAAAAN!!!!!

19. Junno m says:

Why does P(A|B)*P(B)? This is not explained.

20. Becca Boo says:

#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 😂

21. kedir hassen says:

Thanks so much I understand it

22. VWLZ says:

Just ate a pizza for lunch! Travelling back in time to eat bagel for breakfast!

23. Dark Savior says:

The probability that Rahul will eat Bagel Bites for every meal is 100%

24. Squander Yonder says:

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?

25. Anannya Saxena says:

Rahul is an indian, he eats parantha for breakfast and chawal for lunch.

26. Student Vlogs - Dylan says:

exam in 2 weeks!

27. Ali Ali says:

yea i dont get it at all

28. helloiamthechosenone says:

half of all lunches that R eats is pizza haha

29. Viraj Singh says:

Actually you've used Bayes theorem indirectly. This could be a good way to prove Bayes theorem.

30. John Nikkie says:

Take a shot everytime he says probability 😉

31. Ibrahim yousif says:

dont say a and b say the example meaning

32. Stephen Price says:

this video confused me even more thanks

33. Rafael de la Vega says:

this is definitely helpful for this midterm i have in one hour

34. One Punch Man Season 2 Epic TV says:

rahul is eating like its his last day on earth lol or he has a probability test tmr

35. catie knight says:

totally understand dependent and independent probability now, thanks so much! i have a unit test tomorrow.

36. Jakub Aipldauer says:

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

37. Felipe Garcia says:

I never comment but I hope this finds you … you are the greatest teacher ever

38. Mabule Modiba says:

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.

39. Mabule Modiba says:

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

40. Clayton Woodcock says:

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.

41. Chris Osborne says:

why does he multiply P(A|B) x P(B) and not add them instead?

42. GunnerCat says:

where the heck did he get 0.35?

43. Sherry Thomas says:

im still confused

44. Rahul Bhatt says:

I m Rahul, and I approve this 💫

45. Steve Friedlander says:

Where does the .05, .06 & .07 come from to begin with?

46. Trev Tv100 says:

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

47. Mehwish Yasmin says:

Just ok🤨

48. XA Gamers says:

0.5 divide by 0.6 x 0.7 lol

49. Miguel Montes says:

Dont get the logic of the formula P(A and B) = P(A|B) * P(B). But this channel is fantastic!

50. Laurel Lion says:

This isn't really relevant, but why would they make Bagel for Breakfast A instead of B?

51. Gregory Sawyer says:

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.

52. Ben Bundy says:

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?

53. corey333p says:

Neat. Cool. Thanks.

54. Sir Eminence says:

Gosh I’m still confused!! I gotta rewatch this at a later time maybe it would make a difference