Welcome back. Now let's do a problem that involves almost everything we've learned so far about probability, combinations and conditions of probability. So let say I have a bag again and in that bag I have five fair coins and I have ten unfair coins. And the fair coins of course is the 50/50 chance of getting head to tails and the unfair coins, let say that there is a 80% chance of getting a heads for anyone of those coins and that there is a 20% chance of getting tails because going to either be heads or tails.
So my question is as I—what happens is, I put my hand in the bag and then my eyes are closed and I picked out a coin and then I flip it six times and it turns out that I got five out of—let say I got four out of six heads that’s the result I got. What I want to know is, what is the probability that I picked out a fair coin, given that I got four out of six heads?
So before moving on let's do a little bit of review base theorem and I think that will give us a good framework for the rest of this problem. So base theorem, I'm going to be—let me do in this corner up here. Base theorem tells us a probability of both A and B happening that upside down use an intersection and set there but essentially saying, you know, it’s a set of events in which both A and B occur that’s equal to the probability of A occurring given B times the probability of B which is also equal to the probability of B occurring given A times the probability of A.
And I think this should make some intuition for you if it doesn’t, it might be a good idea to watch the conditional probability videos. But what we can do is we rearrange this equation right here to get, if we just divide both sides but the probability of B we get the probability and I'll do this on A.
Vibrant color, the probability of A given B is equal to the probability of B given A times to the probability of A divided probability of B. I use to take this equation by equal sides but the probability of B and I got this. So what is A and B in the problem we’re trying to figure out? We want to try to figure out that probably that I picked out a faired coin given that I got four out of six heads. So in this situation A is that I got a fair coin. A is equal to picked fair coin and the B is equal to four out of six heads.
So in order to figure out the probability that I picked the fair coin given that I got four out of six heads I have to know the probability of getting four out of six heads given a fair that I picked the fair coin times the probability of picking out of fair coin, divided by the probability getting four out of six heads in general. So this is probably the hardest part to figure out and we will—along the way we’ll actually probably figure out that the top two terms.
So what's the probability of B or the probability of getting four out of six heads? Let see what happens. Right when I put my hand into the bag and I pick out of coin, there is five and 15 chance, right there 15 total coins that I pick a fair coin, so five and 15 that’s the same thing of 1/3 that I pick a fair coin. And then there is a 2/3 chance that I picked an unfair coin, all right. Now if I picked a fair coin given that I have a fair coin, what is the probability given the fair coin, what is the probability that I get four out of six heads?
Once again let's take about the previous several videos. What's the probability getting anyone particular combination of four out of six heads? So for example you know, it could be heads, tails, heads, tails, head, heads, it could be I don’t know, it could be the first four heads, heads, head, heads, tails, tails, right in and there’s a bunch of these and once again we’ll use the binomial coefficient or use our knowledge combinations to get how many different combination there are, what’s the probability of each of these combinations?
What’s probability of heads? that’s point five times point five times point five times point five and the probability of tails is, it is also point five times point five times point five, so each of these, there's a ½ chance of getting a head times ½ change of the tails times ½ chance of the head times ½ chance of the tails etcetera, etcetera so each of these are essentially ½ times ½ six times. So the probability of each of the combinations is ½ to the sixth power.
And so how many combinations are there like this where you get out of the six flips you're essentially choosing four heads, you're choosing—you know if I'm once again the god of probability I am picking four—exactly four of the six, four of exactly six of the flips to end up heads, right. I'm choosing which of the flips gets selected so to speak. So its essentially there are going to be out of six flips I am choosing as a god of probability four to be heads. So that’s the number of unique combinations where you have four out of six heads times the probability of each of the combinations which is ½ to the sixth power.
Well what’s six choose four? That’s six factorial over four factorial times six minus four factorials so that’s two factorial and that’s times ½ to the 6th.—I'll switch colors again just to stop the monotony. And that equals to six times five times four times three times two, we don’t have to write the one times one but we’ll do it anyway, over four factorial four time three times two times one, and then two factorial two times one. So that cancels with that, the one we can ignore, two divide both sides by that numerator and that denominator by two and this becomes three.
So this becomes 15 so this equals 15 x ½ to the 6th, so what ½ to the 6th? That’s 1/64, right? So 1/64 so it becomes 15/64. So the probability of getting four out of six heads given a fair coin is 15 out 64. So this is probability of four out of six heads given a fair coin and if you look at it, base on our definition of B and A this is the probability of B given A. B is four out of six heads given a fair coin, fair enough.
So let's figure out the probability of—because there are two ways of getting four out of six heads one that we picked the fair coin and then times 15 out of 64 and then there is a probability that we picked an unfair coin. So what's the probability of the unfair coin, of getting four out of six heads given the unfair coin?
Once again what's the probability of each of the combinations we get four out of six? So in this situation let's do the same one, head, tails, heads, tails, heads, heads. Alright that’s four out of six heads. But in this situation it's not a 50% chance of getting heads, 80%. So it would be 0.8 x 0.2 x 0.8 x 0.2 x 0.8 x 0.8 and essentially we have, you know this multiplication we can rearrange it because it doesn’t matter what order you multiply things in so it’s 0.8 to the fourth power times 0.2². And it doesn’t matter, you know, any of the unique combinations with each of the same probability because we can just rearrange the order them in the order of which we multiply, right. And then how many of these combinations are there if we are once again the god of probability and out of six flips we’re are picking four, but we are choosing four that are going to end up heads?
How many ways can I pick a group of four? Well once again that’s times six choose four and we figured out what that is, six choose four is 15 so this equals 15 times 0.8 to the 4th x 0.2². So the probability and this is the probability of four out of six heads given an unfair coin.
So what's the total probability of getting four out of six heads? Well it’s going to be, the probability of getting the fair coin which is 1/3 times the probability of getting four out of six heads given the fair coin and that’s this 15/64—times 15/64 plus the probability of getting an unfair coin 2/3 times the probability of getting four out of six heads given the unfair coin. And that’s what we figured out here times 15 times 0.8 to the 4th times 0.2². And this is the probability of getting four out of six heads. So let’s figures out what that is. Well this will cancel out with this five out of 64 that’s easy enough, 2/3 times 15, that’s 10, and we just to figure out what that is.
Let see, I'm going to go over to time limit to see if being a YouTube partner allows me to go over the time limits. 0.8 x 0.8 x 0.8 x 0.8 is equal to and then times 0.2².So times 0.2 x 0.2 is equal to 0.16 so that’s that and we say times 10 because 2/3 times 15, so times 10 is equal to 16.384%. So the probability is—so this term right here—and we write that down and we’ll switch colors again. This is 0.16384 and we’re going to add that to five divided by 64. So let see five divided by 64 is equal to 0.07 whatever, whatever plus 0.16384 is equal to 0.241965. So that’s the probability not knowing which coin I picked out, that’s the probability of getting four out of six heads when you combine it. You know it could be 1/3 chance fair, 2/3 unfair so that’s 24.19—I'm keeping the position just because it might come and use later percent change. So that’s the probability of B.
So let see if we can clean this up a little bit just because I don’t think we need all of these writing now. I think we’re ready to substitute into our base formula which we base theorem that we re-derived. Putting a longer videos is dangerous because if I make a mistake that’s more time wasted. Okay, so let see if we can solve the probability that we picked a fair coin given that we got four out six heads so that is going to be equal to my base theorem which should make some sense to you. That is equal to the probability of B given A, so the probability that we get four out of six heads given a fair coin times the probability of a fair coin over a probability of getting four out of six head either way.
So four out of six head given a fair coin we figured that over here, that’s 15/64 so this equals 15/64. What's the probability of that we picked the fair coin? Well there's 15 coins and five of them are fair so it’s five out of 15 so its 1/3. And what's the probability that in general we pick four out of six heads? Well that’s this number 0.241965. So this equals to 5/64 divided by 0.241965 and what is that equal to? That’s five divided by 64 is equal to that. Divided by 0.241965 is equal to 32 point or roughly 3% is equal to 32.3%. So that’s amazing or relatively amazing.
It’s a little bit less than a 1/3 shot that we picked the fair coin given that we got four out of six heads. And what interesting is the four out of six heads it kind of decrease the probability that we got a fair coin because the four having any gate on what happens when we flipped it, we would had a 1/3 probability which is 33.3. But given that we got more heads than tails kind of the universal probability is telling us that—well, if you got more heads than tails that makes it a little bit more likely that you pick the unfair coin which is a little bit more rate to heads. But saying is not that much more likely because this isn’t that unusual over result to get even the fair coin and so that’s why it became a little bit less likely to get a fair coin.
And let me give you a bit of an intuition visually kind of with set theory on why that makes sense. So if we go back to base theorem let just say that this is the universe of all of the events, that’s all of the universe. There's roughly a 1/3 chance that I picked a fair coins so roughly 1/3 of this will be fair, this is fair, this is unfair. And then if I picked a fair coin we figure out that there's a roughly a 15 out of 64 shot that I get four out of six heads so maybe this little section. And then we figure out if we have unfair coin, I forgot what the exact number is but there is some probability that we get four out of six heads. Right, it’s actually a little bit bigger just like that.
So this getting four out of six heads given you got an unfair coin, this is getting four out of six given that you got a fair coin and then this whole area is a probability to get four out of six heads. So all the base theorem told us is look, we got four out of six heads so this where in this universe where we got four out of six heads. And if we got four out of six heads, 1/3 of this universe roughly the 32.3% of this subset of four out of six heads intersects with the fair coin universe. So this 32.3% essentially this fraction of the total probability of getting four out of six heads.
Anyway, hopefully that gave you a little of intuition and I hope that YouTube let’s me publish this video because I'm on my 17th minutes. I'll see you in the next video.
Transcription by:
Scribe4you Transcription Services