If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

# Example: Combinatorics and probability

## Video transcript

a card game using 36 unique cards for suits diamonds hearts clubs and spades with cards numbered from 1 to 9 in each suit so there's 4 suits each of them have 9 cards so that gives us 36 unique cards a hand is a collection of 9 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 ones so they want to know the probability the probability of all of getting all four of the one so all four ones in my hand of nine now this is kind of daunting at first like gee you know I have nine cards and I'm kicking them out of 36 I have to figure out how do I get all of the ones but if we think about it just very very in very simple terms all all probability is saying is the number of events or I guess you could say the the number of ways in which this 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 can happen and when we talk about the event we're talking about having all four ones 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 nine picking from 36 that I can get at that I can get the four ones in it so is the number of ways in which my event can happen and we want to divide that we want to divide that into all of the possibilities all of the or maybe I should write it this way the total number of hands that I can get the total number of hands so the numerator in blue is the number of hands where I have or the number of different hands where I have at where I have the four ones and we're dividing it to divide the total number of hands so let's figure out the total number of hands first because some level this might be more intuitive and we you've done this before now the total number 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 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 one of 36 cards then the next one's going to be one of thirty-five then the next one's going to be one of 34 33 32 31 we're going to do this 9 times 1 2 3 4 5 6 7 8 & 9 so that would 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 we all we care about the actual cards that are in there so we're over counting here we're over counting for all of the different rearrangements that these cards would have it shouldn't it doesn't matter whether whether the 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 since so order doesn't matter so what we have to do is we have to divide this we have to divide this by the wood 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 and the third so forth and so on it's essentially becomes nine factorial times two times one and we've seen this multiple times this is essentially 36 choose nine this expression right here is the same thing just so you can relate it to the the I guess 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 which we can get have all four ones so let's figure that out so number of ways or maybe we should say this number of hands with with four ones with four ones and just as a little bit of thought experiment imagine if we were only picking four cards if I hand only had four cards in it well if a card only had four hands if a hand only had four cards in it then the only the number of ways to get a hand with for once there's only be there only be one way one combination you just have four ones that's the only combination with four ones if we were only picking four cards but here we're not only picking four cards there's one four of the cards are going to be are going to be ones so four of the cards are going to be ones let me 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 for the other five cards if you imagine this slot considering that of the thirty six we've already we would have we would have to pick four of them already in order for us to be have four ones so there's another if there'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 thirty one in that position of the hand and then there'd be 30 because every time we're picking a card we're using it up and now we only have thirty to pick from then we only have twenty twenty-nine to pick from and then we have twenty eight to pick from and just like we did before we don't care about order we don't care if we find that if we pick the five of clubs first or whether we pick the five 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 we have to divide this by the different ways that five cards can be arranged so the first card or the first position could be any one of five cards then four cards then three cards then two cards than one cards so the number of hands with four ones is actually is actually just this number you're actually looking at all of the different ways you can fill up the remaining cards these four ones are just going to be four ones there's only one way to get that it's the remaining cards that's going to give all of the different combinations of having four ones so this will be a count of all of the different combinations because all of the extra stuff that you have will be all of the different hands now we know the total number of hands with four ones 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 me take that let me copy it and let me paste it let's take that and let's divide it by 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 let me have to whoops let me put that there let me get the Select tool and then let 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 will suit our purposes this will 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 we have a well actually I forgot to do this is this should be nine factorial this should be 9 times 8 times 7 times 6 times 5 times 4 times 3 times 2 times 1 so let me put that in both places actually let me just let me let me clear that both places clear don't 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 over and this will just be a exercise in simplifying this expression 36 times 35 times 34 times 33 and let's see if we divide the numerator denominator by 9 that becomes a 1 this becomes a 4 you can divide the numerator denominator by 4 this becomes a 2 this becomes a 1 you divide numerator and the 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 ones 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 any 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 and a thousand chance or one in a 500 roughly speaking this is the exact odds you have roughly 1 in 500 chance of getting all four of the ones in your hand of nine when you're selecting from 36 unique cards