Conditional Probability With Tables | Chance of an Orange M&M???

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
you the other day I went to the store and I bought a package of M&Ms now I love M&Ms but I in particular love the orange ones I don't know why I just prefer that particular color now I started to think what is the probability that if I went into this package of M&Ms and I withdrew one that it would be an orange M&M now the problem is that I don't know what the distribution of colors in my package of M&Ms are so I went on the internet and google it now it turns out that there are two different factories where the standard M&Ms are made in the United States there's one in Cleveland and there's one in Hackett spell and the distribution of colors that are produced at these two different plants is different now if I get a package how do you know which of these two plants they are and therefore which distribution of colors it turns out they tell you if you go and flip it over and look on the back then right up here there's a code and if that code has hkp in it then you're gonna say that it is indeed from the Hackett's bill plant and it has a different code if it's from the cleveland pet so it's that hkp that tells me that this particular bag of M&Ms that i bought at the store came from that particular plant and then i know the distribution at least google is gonna tell me what it is so this creates the perfect conditional probability example I can ask all sorts of questions like what's the probability of an orange M&M given that it comes from the hackus vil plant and so on so let's go take a look at the math involved so I wait and put the data that I found online into a table that I have one row for the Cleveland pine and one row for the Hackettstown plot and the point of this table is that one cell of the table is a conditional probability so for example let me look at this Hackettstown orange plant one this is the probability that I get an orange M&M given the vertical line here means given given that I know it's from the Hackettstown plant and that's what all the different probabilities in this table they reference different conditional probabilities probability that's a blue and because it comes from the Cleveland plant and so on so that's what the 0.2 five means but what about if I do it the other way around what if I asked for example what is the probability that you get a M&M that came from the Hackettstown plant if you know that it's orange now there isn't actually enough data on this table or it appears anywhere on the internet to be able to answer this question exactly the issue is that well they told us the probability of the M&Ms coming from these two different plants we don't know what the probability of coming from each of the plants are just one cell ten times as many as the other I don't know and it's not publicly available so if you know that you've got an orange M&M but you haven't look at the package there's no good way of doing the other conditional probability the probability that it's coming from a particular plant given that you've got an orange M&M so because I want to carry on with this video and do a little bit more probability but I don't have the numbers I'm just gonna I don't make them up imagine that I'd go off I buy a bunch of M&Ms from the one plant and a bunch of M&Ms from the other plan and I create the following table in this table the cells don't represent conditional probabilities they are the number of M&Ms that I have mixed together in some Bowl and what you can see is that along the Cleveland plant grow that there's a hundred M&Ms that came from there and there's a hundred that came from that Hackettstown one I've also added to my table one column that gives you the total number of M&Ms and any given row and one row which gives you the total number of M&Ms in any given column so nonetheless I have these 200 M&Ms with this different distribution of the colors in the plants so let me ask the same question I asked before what's the probability of it being orange given that it comes from the Hackettstown plant now note that now I am using this data in my made-up table not the total availability for all M&Ms so I actually am going to use my conditional probability formula and the way the conditional probability formula works if you look at the probability of the intersection the probability that it's both orange and from the Hackettstown plant and then you divide out by the probability that came from the Hackettstown pack that's my conditional probability formula so in this case the probability that it's orange and that it's hkp from the Pakistan plan is well there's 25 it's this cell right up here there's 25 of those M&Ms out of 200 and total and then for the probability that it comes from the Hackettstown plant the P of H K P well there's 100 M&Ms from that plant out of 200 total so again what we're going to get here is 25 over 200 on the top the 25 ones that are orange and from the Hackettstown plant divided out by the 100/200 the 100 M&Ms divided by 200 total when you're doing this the dividing by the total number the 200 appears in the numerator and the denominator we can cancel that and so what are we left with 25 over 100 just 0.25 now one way to think about this is that what did i tell you when i give you that it's coming from the Hackettstown planet that that allows us to focus just on that particular row the Hackettstown row and sort of ignore all the other information in which case you can get to the answer a little bit faster than going through the full formula you could say well look there's 25 orange out of 100 total in this row 25 divided by 100 that's it as in when you have a table the conditional probability is kind of like the same which row or which column are you talking about let's see well in the joonas columns let's go the other way around the one we couldn't previously do that is I want to now investigate the probability that comes from the Hackettstown plant given that it's orange so imagine I'm taking my two hundred M&Ms I'm mixing them all up together I don't know what it is I pull out one at random and I tell you that the one you pull up is orange well what's the public it comes from one plant versus the other in this case would be the same thing our conditional probability formula tells us the probability of the intersection that comes from Pakistan plant and that it's orange and then you divide out by the PO but it's orange well the numerator is as it was before there's 25 in that category that's both out of 200 and then if I look at the column for orange well there's a grand total of 45 out of the 200 that happened to be orange so what do we have here 25 divided by 200 on the top and 45 divided by 2 100 on the bottom that 200 again they just sort of cancel we can get rid of them it's 25 over 45 and that gives me a decimal 0.56 approximately and then when I think about it this direction it's a little bit like just choosing a specific column if I just focus in on that orange column but then I can just say it's 25 divided by 45 25 that come from the HTTP and our orange divided by the 45 orange in total so when you do conditional probability from a table it's just choose a particular row or choose a particular column and then you could do a normal probability within that row or within that column let's just do one more example one more little bit of trick let's do the probability that it comes from the Hackettstown plant but that it is not orange nope when I do it that way when I say that it is not Orange this is like we just sort of throwing out that one particular column of the table just saying this is not a possibility now my two hundred M&Ms I subtract off 45 I only have one hundred and fifty five remaining M&Ms and if I want to think about what's the probability here well it's the same old conditional probability probability from that Hackettstown plant and the probability of not being orange divided out by the probability of not being orange but now I have to add up a whole bunch of things in the numerator in the denominator because the way to not be orange is to be red or yellow or green or blue or brown all of those different possibilities so let's figure out how many there's going to be well in the numerator I add up all of the ones that are not Orange and come from the Pakistan plant so there was 12 that were red and then there were 13 that were yellow and so on and then in the denominator I'm going to put in just what's the total numbers of ones that are not orange while there's 25 total Reds and there's 27 total yellows and so on if I want to I could divide the top and the bottom by the 155 the number of total M&Ms but it's gonna cancel anyway so I didn't write it down nonetheless you add these numbers up and you get approximately 0.5 - okay now let's left us to eat some mmm so uh let's see what we have here oh my goodness they're going everywhere all right so it looks like I have four orange ones over here those are the good ones and then I've got four eight twelve fourteen and some scrambled up ones I guess it was in the bottom of my backpack now this bag is not at all necessarily representative of all bags but for this bag there was a four fourteenth chance of getting an orange one all right I hope you enjoyed that video give it a thumbs up if you did if you have a question about the video leave it down in the comments and I will see you for some more math in the next video
Info
Channel: Dr. Trefor Bazett
Views: 62,968
Rating: undefined out of 5
Keywords: Math, Solution, College, Example, Probability, Conditional Probability, Chance, Bayes, Theorem, Formula, Compute, Table, row, column, odds, M&M, Intersection, equation, discrete, Hackettstown, Cleveland, Factory
Id: nz-ADHZrYxk
Channel Id: undefined
Length: 9min 36sec (576 seconds)
Published: Mon Apr 08 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.