Combinatorics and probability
Current time:0:00Total duration:10:51
Example: Combinatorics and probability
A card game using 36 unique cards, four suits, diamonds, hearts, clubs, and spades, with cards numbered from 1 to 9 in each suit. So there's four suits. Each of them have nine cards, so that gives us 36 unique cards. A hand is a collection of nine cards, which can be sorted however the player chooses. So they're essentially telling us that order does not matter. What is the probability of getting all four of the 1's? So they want to know the probability of getting all four of the 1's. So all four 1's in my hand of 9. Now this is kind of daunting at first. You're like, gee you know, I've got nine cards and I'm taking them out of 36 and I have to figure out how do I get all of the 1's. But if we think about it just very, very, in very simple terms, all a probability is saying is, the number of events-- or I guess you could say-- the number of ways in which this action or this event happens. So this is what the definition of the probability is. It's going to be the number of ways in which event can happen and when we talk about the event, we're talking about having all four 1's in my hand. That's the event. And all of these different ways, that's sometimes called the event space. But we actually want to count how many ways that, if I get a hand of 9 picking from 36, that I can get the four 1's in it. So it is the number of ways in which my event can happen and we want to divide that into all of the possibilities-- or maybe I should write it this way-- the total number of hands that I can get. So the numerator in blue is the number of different hands where I have the four 1's and we're dividing the total number of hands. Now let's figure out the total number of hands first, because on some level this might be more intuitive and we've actually done this before. Now, the total number of hands, we're picking nine cards. And we're picking them from a set of 36 unique cards. And we've done this many, many times. Let me write this, total number of hands, or total number of possible hands. That's equal to-- you can imagine, you have nine cards to pick from. The first card you pick, it's going to be 1 of 36 cards. Then the next one is going to be 1 of 35. Then the next one is going to be 1 of 34, 33, 32, 31. We're going to do this nine times, one, two, three, four, five, six, seven, eight, and nine. So that would be the total number of hands if order mattered. But we know-- and we've gone over this before-- that we don't care about the order. All we care about are the actual cars that are in there. So we're overcounting here. We're overcounting for all of the different rearrangements that these cards could have. It doesn't matter whether the Ace of diamonds is the first card I pick or the last card I pick. The way I've counted them right now, we are counting those as two separate hands. But they aren't two separate hands, so order doesn't matter. So we have to do is, we have to divide this by the number of ways you can arrange nine things. So you could put nine of the things in the first position, then eight in the second, seven in the third, so forth and so on. It essentially becomes 9 factorial times 2 times 1. And we've seen this multiple times. This is essentially 36 choose 9. This expression right here is the same thing-- just you can relate it to the combinatorics formulas that you might be familiar with-- this is the same thing as 36 factorial over 36 minus 9 factorial-- that's what this orange part is over here-- divided by 9 factorial or over 9 factorial. What's green is what's green and what is orange is what's orange there. So that's the total number of hands. Now a little bit more of a nuanced thought process is, how do we figure out the number of ways in which the event can happen, in which we can have all four 1's. So let's figure that out. So number of ways-- or maybe we should say this-- number of hands with four 1's. And just as a little bit of a thought experiment, imagine if we were only taking four cards, if a hand only had four cards in it. Well if a hand only had four cards in it, then the number of ways to get a hand with four 1's, there'd only be one way, one combination. You'd just have four 1's. That's the only combination with four 1's, if we were only picking four cards. But here, we're not only picking four cards. Four of the cards are going to be 1's. One, two, three, four. But the other five cards are going to be different. So one, two, three, four, five. So for the other five cards-- if you imagine this slot-- considering that of the 36 we would have to pick four of them already in order for us to have four 1's. Well, we've used up four of them, so there's 32 possible cards over in that position of the hand. And then there'd be 31 in that position of the hand. And then there'd be 30 because every time we're picking a card, were using it up. And now we only have 30 to pick from. Then we only have 29 to pick from. And then we have 28 to pick from. And just like we did before, we don't care about order. We don't care if we pick the 5 of clubs first or whether we pick the 5 of clubs last. So we shouldn't double count it. So we have to divide by the different number of ways that five cards can be arranged. So we have to divide this by the different ways that five cards can be arranged. The first card or the first position can be any one of five cards, then four cards, then three cards, then two cards, then one cards. So the number of hands with four 1's is actually just this number. You're actually looking at all of the different ways you can fill up the remaining cards. These four 1's are just going to be four 1's. There's only one way to get that if the remaining cards that's going to give all of the different combinations of having four 1's. So this will be a count of all of the different combinations because all of the different extra stuff that you have will be all of the different hands. Now we know the total number of hands with four 1's is this number. And now we can divide it by the total number of possible hands. And I didn't multiply them out on purpose so that we can cancel things out. So let's do that. Let's take this and divide by that. So let me just copy and paste it. Let's take that and let's divide it by that. But dividing by a fraction is the same thing as multiplying by the reciprocal. So let's just multiply by the reciprocal. So let's multiply-- so this is the denominator. Let's make this the numerator. So let me copy it and then let me paste it. So that's the numerator and then that's the denominator up there. Because we're dividing by that expression. So let me-- whoops. Let me put that there. Let me get the select tool and then let me make sure I'm selecting all of the numbers. Let me copy it and then let me paste that. It's a little messy with those lines there, but I think this'll suit our purposes. This'll suit our purposes just fine. So when we're multiplying by this, we're essentially dividing by this expression up here. Now this we can simplify pretty easily. We have a-- well actually I forgot to do-- this should be 9 factorial. This should be 9 times 8 times 7 times 6 times 5 times 4 times 3 times 2 times 1. Let me put that in both places. Actually let me just-- let me clear that both places. Clear. Don't want to confuse people. Clear. I'm sorry if that confused you when I wrote it earlier. This would be 9 factorial. 9 times 8 times 7 times 6 times 5 times 4 times 3 times 2 times 1. Let me copy and paste that now. Copy and then you paste. It That's that, right there. And then we have this in the numerator. We have 5 times 4 times 3 times 1 in the denominator. So this will cancel out with that part right over there. And then we have 32 times 31 times 30 times 29 times 28. That is going to cancel with that. That and that cancels out. So what we're left with is just this part over here. Let me rewrite it. So we're left with 9 times 8 times 7 times 6 over-- and this will just be an exercise in simplifying this expression-- 36 times 35 times 34 times 33. And let's see, if we divide the numerator and denominator by 9, that becomes a 1, this becomes a 4. You can divide the numerator and denominator by 4, this becomes a 2. This becomes a 1. You divide numerator and denominator by 7, this becomes a 1, this becomes a 5. You can divide both by 2 again and then this becomes a 1. This becomes a 17. And you could divide this and this by 3. This becomes a 2 and then this becomes an 11. So we're left with, the probability of having all four 1's in my hand of 9 that I'm selecting from 36 unique cards is equal to-- in the numerator, I'm just left with this 2 times 1 times 1 times 1-- so it's equal to 2 over 5 times 17 times 11. And that is-- so drum roll, this was kind of an involved problem-- 5 times 17 times 11 is equal to 935. So it's equal to 2 over 935. So about roughly 2 in a thousand chance or 1 in a 500-- roughly speaking, this isn't exact odds-- you have a roughly 1 in 500 chance of getting all four of the 1's in your hand of 9 when you're selecting from 36 unique cards.