Probability Fundamentals
Transcript
good afternoon cs109 we are live and back in class I hope you had a fantastic weekend and I hope you're ready for a little bit more popularity education ah yeah feeling the probability of us okay we are going to be learning some very cool things today before we jump into any of that though a couple quick announcements as you probably know problem set one is out it will be due this Friday though there is a little bit of a grace period in case you missed the deadline uh section assignments if you don't get them today that means something went wrong and somehow we didn't get your assignment uh they will be going out today uh if you can't make your time or you need a swap see the post there is more details about this um talk about this PSAT party in a second and as always or you know I've gotten this habit oh this should be fall 22. I've gotten this habit of putting up examples for today's for the lecture on the problem set app you can go to uh the link directly or you can go find cs109
go find today's lecture to do not the fastest internet in the world and once the website loads after a little suspense you can go to lecture lecture four and if you hit the little rocket ship you can go enter today's code and follow along wow man internet you're really stepping on my point here anyways the code for today is silly owl uh there you go not that important but you now know okay
this problem set party hey there's some really cool people here at Stanford I want to tell you about two of them uh uh our PhD students and they're interested in the future of online education uh and for massive online classes one of the things they're interested in how they can get peers working with peers and they've built a lot of really cool technology and they want to try it out in cs109 so you might have noticed in the PSAT app there's this new button and it has this number that's how many people are online has anybody tried clicking this button couple folks if you click this button it's like would you like to learn with somebody else and you're like okay and if you hit okay then it kind of waits till somebody else in class hits the same button and it'll pop up a little video for you guys uh obviously you know nothing about this is for grade it's just for fun uh but you're kind of contributing to this experiment in for massive online courses it could be a
cool feature that could change the game in cs109 there's so many as we we can interact it'll probably be just a small little demo but if you come to the pset app at 9 00 PM if you hit that button it would be great if we could try and overload our server and if anything goes wrong just let us know it's just for fun it's not that important but you know it is important the stuff that we talked about last week so just to recall last week's Focus was really uncounting and we counted lots of different things we counted orderings of objects we counted combinations of objects and we put objects in buckets uh and you know one of the big meta takeaways Beyond those three skills sometimes you get very large numbers like in the end of last class we talked about how many ways can you order 52 unique cards well that's just 52 factorial we learned this last week but you know one of the ideas is combinations and permutations can really lead to large numbers like this is what
52 factorial looks like if you wrote it out and on the end of last class if you check the slides there's an explanation for why that leads to a claim that if you have a particular ordering of cards with high probability you can say no one has ever seen that exact ordering anyways we talked about combinations of permutation and then we got into the world of probability probabilities were numbers between zero and one we started out with the three Axiom terms of probability um the first two we talked about semantically the third one that I promised we would talk about a little bit more later now is that time the third Axiom probability talks about events and it talks about the probability of either one of the two events happening so either e or F or call this a set notation for or and if you say what's the probability of either of these two events happening the third Axiom probably says it's the sum of the two probabilities if an important if it turns out these
two events are mutually exclusive we mentioned this really quickly last time but I thought it'd be worth just taking a moment to go a little bit deeper into what this assumption is saying so all events are really sets of outcomes and if this event is this particular set of outcomes welcome to my little tile space and I would call this set of outcomes event e and I'm going to call this set of outcomes event F they're mutually exclusive if no event is in both or no outcome is in both events
and the claim of this third Axiom is hey in this case calculating the probability of either e or F is pretty simple we're just going to calculate the sum of the probability masses now if you imagine like the outcome space of your world is any one of these tiles and if you imagine they're equally likely then we can say that the probability of e is seven outcomes over 50 and probably F would be four outcomes over 50 and so the third Axiom probably says the probability of e or F would be just adding those two things together so 7 over 50 plus 4 this is supposed to say over 50 equals 11 over 50. there you go and that's one of the things that we assume it works for more than two events if you have a whole bunch of events uh if they're all mutually exclusive so there's no event that's in there's no outcome that's in two events you can just add probabilities we'll hit this a lot but I just wanted to say it in a little bit more detail than we said it on Friday wahoo
okay and we'll get into this more when we practice it but for now you should start to feel that if events are have this special property of no outcomes in both events probability of or is going to be easy on Friday though I said there's this other really intuitive law of probability which we could prove and this is intuitive law that we're going to use today it says the probability of something not happening is one minus the probability of it happening okay that kind of makes sense but I just
want to show you what a proven probability would look like we can prove this just using those three axioms in fact we can start with the third Axiom of probability e or not e so either event e happens or event e doesn't happen this is a little bit of a mind game to see if you understand Mutual exclusivity but it turns out e n not e must be mutually exclusive because is there an outcome where e happens and not e also happens no one of those two has to happen so
they must be mutually exclusive there's no outcome that can be in both e and not e therefore by the 30 Axiom this probability statement is just going to be the sum of the probabilities on their own okay you guys following along either e or not e not happening has to cover the whole sample space right because everything in the universe is either e or not e so that is the entire universe of outcomes and this probability the sample space one of the axioms of probability Axiom 2 says that this probability of something happening is one and at the point where here we can see hey if we're trying to derive that we're really close we just need to move probably e not happening to be on its own side in which case you get probably of e not happening equals one minus the probability of e happening you know this is what a proof and probability looks like it probably isn't that surprising to you and we can use these derivations we've got so far to
prove further things okay let's take a moment and take questions if there's anything confusing about this let me know okay fantastic then I'm going to finish our warm-up with a question I'm going to give you guys some time to think about because I think it's really fun one of my favorite things in life is Serendipity when things happen which you didn't really expect to happen and they they seem to evoke the fruit of the random tree uh and they bring some good vibes to you okay so here's the problem that I pose to you Stanford has 17 000 people I don't know how many people you're
friends with I'd say I'm friends with about a hundred maybe that's an overestimate but you know if you walk into a room and there's 268 random people that's how many people were enrolled in the class at the beginning of the quarter but now we're up to something like 315. what's the probability that someone is one of your friends that one of the 268 people perhaps in this class uh is one of your friends we have to make assumption we're going to assume that every person in this class is equally likely to be any of the 1700 people at Stanford if we make that assumption we can calculate the probability that if you chose a subset of 268 that at least one person would be a friend so that's your challenge and I'm going to give you this Pro tip you know how the probability of E not e not happening is equal to 1 minus probability of e happening that allows you to go from the probability of e not happening to the probability of e happening sometimes it's way easier to calculate
the probability that an event doesn't happen this is one of those cases so think about my question as being the probability of e naught happening I'm asking what's the chance that out of this 268 people you don't see someone you know last Friday's class we talked about outcome spaces where every outcome was equally likely if you can utilize that we can solve this problem it's a pretty hefty warm-up problem but if you can solve this as kind of like you know upper Watermark of the sort of equally likelihood outcome space probability questions I'd asked you do you guys want to get started this talk about it with the person next you see if you can summarize what you're trying to do and see if you can solve that problem okay get to know a friend okay okay
I love this it's such a hefty problem um so let's think about this together I want to figure out what are what's the probability of not seeing anybody that you know so uh out of 17 000 people we walk into a room with 268 people what's probably I know none of them and I want to set this up as a probability with equally likelihood outcome spaces if you want to do that you have to figure out the size of the sample space and the size of the event space and you want to make sure that every outcome in
the sample space was equally likely so did anyone first come up with a sample space that they were happy with and that's like every outcome like what what's an outcome of this experiment too while we're thinking about it yes well I mean your sample space would have to be 17 000 choose 268. so that's the size of the sample space is 17 000 choose 268. but what's one element in that sample space yeah the person next to you um if you like a random selection of two human specific people yeah so every
outcome in the sample space IS 268 people chosen how many outcomes are there well there's all the ways you could choose 268 people from the 17 000. that's a lot and a subset of those will be such that you don't know anybody in the class did anyone have a way of counting how many subsets of this set have no friends in the class yeah an idea over there uh you just subtract 17 000 maybe a number of friends from seventeen thousand and choose 268 again so the way you could you don't know still
see people but instead of pulling from seventeen thousand we're going to pull from all the people who you don't know how many people do you not know is 17 000 minus your number of friends and I said I know a hundred people so it'd be sixteen thousand nine hundred choose 268. what are those odds so I know 100 people I walk into a room of 268 what are the odds that I don't see a single person that I know so let's do we got math.com seventeen thousand minus a hundred
choose two hundred and sixty eight okay and I'm just going to call that my numerator oh that's a big number my denominator though is going to be math dot combination Seventeen hundred thousand choose 268. so the same number except in the this part we're pulling from everyone in Stanford not just the people I don't know and if you do numerator divided by denominator what's this point two zero mean it's a number between zero and one yeah it's a probability it's a problem I don't know anyone
if there's a 20 probably I don't know anyone what's the chance I do know somebody is that wild if you only know 100 people on campus and you walk into a room with 268 you are very likely to know at least one person wow isn't counting cool what a time to be alive uh certainly there is this major key here and the major key here is oh my God would this problem have been much much harder if I just tried to count all the ways that I could know at least one person because I need to know
all the ways that there's one person I know two people I know three people I know four people I know five oh that's so much this is counting zero people and then the chance I know one or more is going to be one minus the chance that I know zero people sometimes life is so much easier when you calculate the probability of an event not happening stretching your question looked like a good stretch I can go from stretch too okay more stretching I like this okay my daughter figured out what yoga was over the weekend and she's like the most aggressive yoga but she's like yoga every morning I don't know if she gets the vibe but she gets the stretching part
to set up this problem what would it be like one leg set for the bathroom yeah I always start with thinking about the all the outcomes of the experiment so like what are all the outcomes of experiment and that was thinking of getting rooms of 268 people and I tried to figure out how could I count all the ways you could get a room of 268 people and then once I counted those and the way I count these both gave me the feeling that everything was equally likely like no room of 268 people is going to be more likely than another and once I'm there I'm in a good spot then the chance is just I need to count the smaller number of people that satisfy the event I care about The Meta step which we kind of glossed over because I told you let's just do this from the beginning is whenever I approach a probability problem I think is it easier to calculate the probability directly or the probability complement of the event complement in this case we just started by going with
the event complement good question and end of review we've got a growing tool set and today we're going to add some awesome tools to the tool set we're going to add chain rule definition conditional probability you're a lot learn the law of total probability which is as impressive as it sounds and the law that is so much more impressive than it sounds based theorem we're going to hit some of the classics in probability Theory we're going to add them all to your probability tool set starts with one Concept in fact if there was a central idea to get today is this idea of conditional probability conditional probabilities really where probability starts to get exciting it's how you can update beliefs so if You observe some information how do probabilities change do you guys remember we talked about Dice and when we were talking about equally likely outcome spaces we introduced the world of dice we said let's say you have two dice and you want
to know the probability that some of your dice is seven well we set up here's all the outcomes of rolling two dice and there's a subset of outcomes here that lead to the sum being seven and we said that because these are equally likelihood events we could say the probability of the sum being seven was just one two three four five six divided by 36 total outcomes equally likely outcome spaces gave us this way to calculate the probability but now let's change our problem a little bit I'm going to say not that the sum comes to 7 but that the sum comes to four and my question for you just to get us started is what's the best outcome for the first days so um so the two dice we're going to call the first ice dice one we call count the second dice dice two we care about them something before what do I want dice one to be well I say it's just as good if dice one and three or dice one is either one or three well I say it's equally good if dice one is one two or three
do you think two one dice one is the best or do you think either none more than one of these answers is right think about it for a moment don't talk to the person next to you just appreciate foreign to think about this a little bit deeper let's talk about all the outcomes where two dice end up equaling four so if you take our 36 different outcomes of rolling two dice here are the three outcomes where your dice and up being sum to four it if we think about the probability of the event where the two dice equals four our sample space is 36 elements in it there's these three events that lead to the sum being four and then just using the math we learned on Friday the
probability of the event is just going to be the size of this event space divided by the size of the sample space so 1 over 12. but I said the idea of today we really want you to understand is this idea of conditional probability and the conditional probability starts to introduce terms like this what's the probability of some event given you've already observed some other information and to practice I want us to enter this world of conditional probability with the simple example of what if the first dice was two what's the probability that my two dice sum to four given that dice 1 is equal to 2. there's no uncertainty as to whether not dice one equals two I'm telling you Dice 1 was 2. and if I tell you what that dice one was two I've asked you to calculate probability in the world where we have information and you can imagine when computers and probabilities got them together there's lots of situations where we have some
information if I tell you that F has already happened that dice one is already two what happens to our world of probability the first thing that happens is there's no longer 36 possible outcomes to my experiment it's not possible that dice one is one it's not possible that dice one is six the only outcomes that are coherent with my claim that dice one was two are these six outcomes does that make sense so once I told you Dice one was two the world of possible outcomes shrunk quite a lot
now out of all of these possible outcomes which ones of them lead to the two dice adding up to be four there's just this one if you think about if I tell you the first dice is two the only way you're going to end up with a four is if that second dice is two mathematically we'll end up with a probability of your event going up from 1 12 to 1 6. so you're probably an event happening increased When You observe that F had occurred that your first X was two the outcome space shrunk to every
outcome that was consistent with what you observed the events base shrunk to every outcome that was consistent with what you observed and your probability increased because even though there's fewer things in E and there's fewer things in F all these events e there are larger ratio of things than S does that make sense though I told you what's the chance of getting a four it's kind of low but now I told you the first dice was a two and it's a little bit higher if I told you your first ice was a six what's your probability of getting a four yeah and so if I tell you your first ice is a two you're like still in the game so anyways back to my question if the first dice wasn't two but rather it was three what's your probability of the two summing up to four 1 6 because if the first ISO is a three again we'll have six things in the outcome space and again only one of those will lead to an outcome where the two dice add up to four there's only one
dice on the second Throw That Could lead to a four it'll still be one over six what if that first dice was a one it's still one over six because if I observe that the first ice is one the sample space has got to be all the things consistent with the first bit I should be one so get one one two one three one four one five one six and the invent space will just be one three because there's only one outcome that leads to a four does it matter if the first text is a one two or a three they will all lead to a 1 6 probability of your sum being a four and this is our gentle introduction to the world of conditional probability if we observe some information our probabilities will change and that changing probability is what we mean when we talk about conditional probabilities it has its own notation when we talk about e condition on F we'll write it with this big vertical bar and if you read that in English it would still read
as the probability of some event e given that a different event has already occurred it's known as conditioning on F and it's when probability starts to get way more exciting because you can calculate interesting derivative probabilities two things happen when you observe an event your sample space shrinks to be every outcome that's consistent with the observation your event space shrinks to be everything that's consistent with the observation and your probability can change let's go back to our world of outcome spaces in my tiles and think about what this means here's event e it's in red here is event F it's in blue ooh are these two events mutually exclusive no because there's these three events there's these three outcomes where both events happen when I talk about event conditioning on F we're going to enter the world where F has happened so
if we want to calculate the probability of e given f we're going to take all of our outcomes and the sample space is going to be all the outcomes are consistent with f happening and this numerator is going to be all the outcomes of our event that are consistent with f happening it's like we shrink into the world of the green outcome spaces so if You observe F it's like f has happened only these things are possible outcomes anymore because I've told you f has happened so our outcome space will just become f and the event space will be all these things where are in both E and F that's a little bit mathematical what if we learned about this using a bit of Netflix which we'll do in just a second I want to point out a little bit you know there's this notation you'll sometimes see two sets without a symbol between them that's an implicit and and we'll talk a little about notation at the end of class I want to make sure nobody gets confused
when you condition on F happening you enter the world where F has occurred your sample space will become F and your event space will become all the events that are consistent with your event space and F okay definition of conditional probability it has this definition mathematically the probability of e happening given that F happens is equal to the probability of E and F happening so all the events that are consistent with f happening divide by the probability of f happening there you go
there is another way you could write this exact same equation you could take this probably of F and since it's a non-zero or you know since the number between zero and one so it's not negative well actually that's fine you can just multiply on both sides because that's math you can rearrange this equation and get probably E and F happening equals probability of f times probably e given F we'll call this a chain rule some people ask what happens if the probability of f is zero mathematically won't this blow up and let's always refer back during this lecture to what conditioning probability means it means we've observed some events is happening this is probably e given that we've observed F has already taken place what would it mean to say I've observed F has taken place but the probability of f is zero
it's like it's probably f is zero it's impossible for f to happen right How Can You observe it if the probability of it happening is zero you've observed the impossible so if your conditioning on F that means you're told me f has happened it can't be the case that probably if f is zero the probability of e times f is this yeah fantastic so this is what's the chance that e happens given that F has already happened and this is what's the probability of both of them happening and it's so
subtle it's so subtle so if you say e given F you've told me f is happening I've entered that world and if you say enf I don't know if f is going to happen and I have to think about F happening and E happening simultaneously super subtle but with something we're going to hit a whole bunch today because that's exactly one of the most important questions to ask now I've decided that this is very mathematical and a little bit hard to understand just from definition so let's do something a little bit more intuitive we're going to do some Netflix and learn and we're going to think about how conditional probabilities change and we'll get some nice intuition around it one of my favorite movies in the world is this movie Life is Beautiful this is not your favorite movie we can talk about that and I will convince you that's one of the greatest films ever made okay um just just to be cheeky we're going to talk about the probably that a user watches a
movie in the context of this streaming uh platform called Netflix now what's the sample space of somebody watching or not watching Life is Beautiful well there's two outcomes somebody can either watch it or not watch it and the event that I care about is that they watch it is the probability of event one half no we could only do the size of the event space divided by sample space if each of these outcomes was equally likely so it's not one half so how do you think we could get the probability of somebody watching it assume we're Netflix how do you think Netflix does this they very much care about the probability that somebody watches a movie [Music]
they can they could infer it it turns out Netflix is so big they can calculate it directly they can just know the problem that you like watch a movie that was a good idea yeah they take a look what other movies we've watched yeah that's very even simpler thing that they do that's a very good idea but there's an even simpler thing that they can do yeah and if they put on the French page what they can do is they how many people actually watch it uh and so here's one of the things I do it's even simpler than what you guys are thinking about they go back to that core definition of what a probability is and they just count if they want to know the probably somebody watches a movie they say well we have like a billion people on Netflix I can see I can think of each of those as an experiment and I can see what fraction of those lead to a watch and
that will estimate the probability that a user watches the movie and it's like they're going back to that core definition of probability and the core definition probably is like if I ran infinite experiments what subset would lead to my event so Netflix you know 50 million point nine 50.9 million people are on Netflix of which 10.3 million watch this movie you would say that probably somebody watches this movie is 0.20 does that make sense even simpler than a lot of people a lot of people have these very good ideas if we could look at what they watch for other movies that would not give you the probability of the event on the on its own but it would give you something more interesting you guys are going down a more interesting path which is where we're all going today for lots of movies you could look at the probability that somebody watches the movie and it's just going to be counting what fraction of users watch that movie
but these numbers are not that interesting the interesting thing is how do these probabilities change when you observe interesting stuff like they watched another movie and this is what everyone was getting to when we were thinking about the answer to that question because maybe we all care about this problem that's where we intuitively go to First the more interesting problem Oh I have a typo here the more interesting problem is what is the probability that somebody watches this movie condition that I've seen they've watched another movie so I'm going to introduce another movie that I like called Coda which I think is fantastic has anyone's seen this there's a two versions of code yeah isn't it so good it's freaking amazing okay anyways so now I want to change our probabilities not just what fraction of users watch this movie but if I tell you that a user has watched coda how does that change my belief that they'll watch life is
beautiful and welcome to the world of conditional probabilities and these are the more interesting probabilities because you're more uh tuned to the person that you're Computing a probability for if you want to know the conditional probability you know here's the definition it's the probability that somebody watches life is beautiful and they watch coda divided by the probability that they like they watch Coda this is just our definition of conditional probability both of these could be estimated using the fact that Netflix is very large you can say this is the number of people who watch both divide by the number of people on Netflix is a good approximation of the probability that somebody watches both the number of people who watch and this should say Coda divided by a number of people of Netflix is a good approximation of the probability that somebody watches coda and if you cancel out the number of people on Netflix and you update this I
used to like Emily it's still a good movie but then I saw Coda and I'm like I have to update I have to update my example for my like new second favorite movie is just so touching okay if you calculate this probability you get a different number by the way when you cancel that number of people who like Netflix you're you're left with a number of people who've watched both so you know number of outcomes are kind of consistent with E and F divided by a number of outcomes uh in F of people who watched coda and these two tell two different stories these two numbers we calculated tell two different stories and it's gonna be really hard for you to distinguish them at first but cs109 you're gonna be such a pro at this when you walk out the first number was what's the probability that somebody watches this movie given no other information and this number is what's the probability that somebody watches this movie given the information that I know they've watched this other movie
and these changing probabilities are a big deal okay we can do this for every single movie you know we took life as beautiful and we figure out the probability of that given F and we can do that for every single probability that we calculated before they'll mostly change not all of them but most of them will change some will go down if I tell you that somebody's watched Coda it's possible for it to be less likely for them to watch a movie that you care about or as possible for the probability to go up quite a lot the probabilities can change a whole bunch when you get some information and that's the big idea of conditional probabilities I want to stop there I want you to talk to the person next you see if you have a cool question you can ask me try and summarize what we've talked about and see if you can come up with something that could be clarifying okay go talk talk
okay I want a cool question anyone find some of this confusing it'll be confusing the first time you see it but it becomes it's important so I want to take clarification questions great time and lecture questions is this concrete example making a little bit more apparent than maybe the dice one since nodding any questions that came up so any movie can be conditioned
so for example they might not Star Wars and Coda could be pretty unrelated but you can still ask the question what's the chance that somebody watches Star Wars given that they watch Coda even if they're totally unrelated movies with no with no common themes but if I'm telling you the the this piece of observation that the person watched this movie and it can change my belief of the probability that they watch Star Wars this probability went down it kind of tells you that those movies are unrelated and if they're unrelated if somebody tells you you've watched Coda maybe it gives you information that they know they like that kind of movie and if they like that kind of movie maybe it tells you they don't like this kind of movie so then maybe that's why the probability is going down we can talk about lots of causal mechanisms why these probabilities go down up or down but you can still ask the question and when you ask the question you know
we can get a numerical answer we'll get deeper into the whys as we get deeper into conditional probability does that help yeah I guess yeah you know yeah some people are interested in all movies some people have genre preferences there's this like deep psychological human causality that's going on and despite all that causality you can still ask conditional of any two events that you care about and we should talk about that deep causality and I'd love to get into that after class yes yeah yeah what's the relationship between like conditional probability and like it's a compliment of an event like is it meaning what's the probability of e given that not e oh that's the problem
ready I tell you that I mean it's a really good question because it talks about the semantics we enter the world where e has not e is true and if you enter this world we're not es2 there's no chance that e happens so in conditional probability you enter a new universe where everything on the right of this line has occurred and then you ask the question on the left of the line yeah that you've just rolled a six
yeah because if you're saying what's it probably a dice one is one given that dice one was a six zero it's a six but if there's two dice you can say what's probably dice one equals one given dice two equals six that's totally legitimate and if you think about multiple roles of the same dice I would distinguish those in some way I'd be like the first rule is one given the second rule is a six or something like that very very good question yes if something so you're talking about PF having a probability of zero right yeah the probability of zero does that necessarily mean it can't happen yeah because what's the probability that you pick a certain number on a scale from zero to one interesting you know I would talk about it as being like a limit probability we can get into that but like if you tell me something that's probably easier and if you're right if you could be wrong you might say it's probably zero but you're wrong like the probably the sun
doesn't rise you could say it's probably zero and then you're wrong and one day it doesn't rise and you observed The Impossible um but if you're right and it's truly probably zero can't happen yeah yes okay uh this is also just a gentle introduction to why probability is so exciting why we decide to offer this course of cs109 because as a computer scientist you're going to be interacting with data a lot and you're going to use computers to understand that data and language is really the or sorry probability is really the language where these two things come together um you might sometimes see people referring to that simple example we did before as machine learning machine learning is just a nice euphemism for people who know probability and can do some data with computer science at the same time okay I want to take a moment though and distinguish three concepts we've talked about unfortunately people across the world of probability use lots of different notations for them but we've
got the probability of and of events the probability of the ore of events and the conditional probability of one event given another events are things that can happen the probably event what's the chance that they both happen different from this what's the probably one happens given I tell you the other one has happened subtly different but very importantly different and the probability of or saying that either e or F will happen three different concepts and I just put up those notations that so you can check later and make sure you don't get confused somebody writes this they mean and they write this they mean and if they write and thank you for saying what you mean uh same they write this they mean or or if they write or they mean or and those are two concepts are very different from the conditional probably Constable which might be new for you okay uh I was thinking about baby poop when I was writing this lecture and so now we have a baby poop example
I have a baby in the morning when she wakes up there's a 50 chance that she's pooped in the night or not uh and it's not always the case that she cries when she wakes up and it's not always the case that she cries if she has poop but if she has a poop there's a 50 chance that she cries so I want us to think what's the probability that the baby has pooped and cried and we're going to use this as a chance to try and separate our difference between uh probability of and and the probability of or and here I included the definition conditional probably and the probability of and and I want to point out that this question has the word and in it so what's the probability that the baby has pooped and cries think about it for a second and then I wanted to take a moment and Define some events uh I'm going to do e for excrement I can't use P why don't I use p yeah super confusing when there's all these Capital P's around so this is going to be the event of pooped
and we need a vent for cries why shouldn't I use k a c for cry compliment oh my gosh okay so what are we gonna use for cry we'll use like tea for Tears cries this question is asking what's the probability of E and T it's also given us some information we said the probability of e is 50 and then there's this line the chance that the baby cries given that she has pooped is 50 what is that telling us so the probability that the baby has pooped or sorry the baby cries tea
given that the baby has pooped is 50 percent so this is hopefully just straightforward once you recognize everything that's written as a straight example of something called The Chain rule so it says there's a 50 chance that the baby poops and if the baby poops there's a 50 chance that the baby cries what's the probability that the baby poops and cries I hear it somebody tell me loud and proud 25 25 you can just multiply these you know the relationship between probability of and and conditional probability is given by these two formulas which are uh isomorphic versions of themselves so this one is saying the probability of two things happening the and of them is the probability of one thing probably times probably the other thing given that first thing so she poops and then she cries given that she poops if you
multiply these two numbers together you get the and so they're different and in condition are two different things and there's a mathematical relationship that governs their how similar they are so the probability of this is going to be equal to the chain rule which will be those two things multiply together you're exactly right it's one over four fantastic uh and you know the point here is that people will find and and conditioning complicated maybe you should pause here for anyone who is thinking probably the end and probably a condition where the same thing we could pause here and see if there's a good question life of a parent man lots and lots of poop yes is the reason why

Ask anything
We've read this whole study set, so questions about it get the best answers.