I have two piles of playing cards. One contains 23 cards, the other 9. There are a total of eight hearts between the two piles. Assuming a random distribution, how do I calculate the odds of the pile of 9 containing no more than two hearts? And more generally, any specific number of hearts?
I calculated the number of ways that the smaller pile could contain exactly two hearts by doing 9C2 * 23C6. (Essentially, choosing which 2 of the 9 cards would be hearts, and then which 6 of the other 23 cards would be hearts).
Then, for the number of ways that the smaller pile could contain exactly one heart: 9C1 * 23C7.
And no hearts: 9C0 * 23C8. (9C0 = 1, but included for clarity.)
Them, I added those together. That’s the total # of ways the smaller pile could contain no more than 2 hearts.
To find the probability, I divided it by 32C8 (the total number of ways the 8 hearts could be chosen from the 32 total cards).
No, the Cs represent “combinations,” i.e., 23C6 is the number of combinations of 6 objects that can be selected from a group of 23 objects.
Most scientific (not necessarily graphing) calculators can do it. It’s sometimes found in a probability menu, or using a probability button on the calculator to access it.
Also, sites like Wolfram Alpha can calculate combinations for you.
No, they stand for ‘combination’. An expression like 9C4 means the number of ways that four objects can be selected from a group of nine (and we don’t distinguish the order they’re in). That would be equal to 9!/(5! x 4!) where ‘!’ is ‘factorial’ (8! = 8 x 7 x 6 x 5 x 4 x 3 x 2 x 1). In general nCr, the number of ways of selecting r objects out of n, counting all different orderings of the same r objects only once, is n!/(r! x (n-r)!)
… oh, whatever.
Yes, in Excel, to do, for example, 23C6, type COMBIN(23,6). You shouldn’t need to use the factorial function at all - it’s all “built into” the COMBIN function.
[del]Excel indeed has those functions which do what you want, of course if you have COMBIN you don’t need FACT.[/del]
Generalising the problem…
You have N objects (in this case, cards) divided into two groups of size n1 and n2, where n1+n2=N (here 23+9=32) (incidentally why are none of these numbers 13? You’re not right in the middle of a bridge hand are you? Hope you have patient opponents)
Out of these N objects, X are blarts. What is the probability that they are distributed x1-in-the-n1-pile and x2-in-the-n2-pile, where obviously X=x1+x2 (here 8=0+8 or 1+7 or 2+6) and also x1<=n1, x2<=n2? I guess it is [(n1 C x1) x (n2 C x2)]/(N C X)
The number of hearts in the pile of nine cards follows a hypergeometric distribution with N = 32, n = 9 and m = 8. The probability of getting exactly two hearts in this pile is about 34.6%, or very slightly more than one third.
Incidentally, nCr is usually read as “n choose r”, which is appropriate since it the number of ways of choosing r items from a set of n items. Here’s the Wikipedia article on combinations:
That’s not a very good explanation for a beginner though. Perhaps this is a better explanation of permutations and combinations:
I think that would certainly have warranted a “need answer fast” addition to my OP subject.
This is an analysis after the fact. The reason that none of the numbers are 13 is that this is an analysis of options during the bidding and I already know a certain amount about partner’s hand - he has at least 4 spades, and probably exactly 4. Hence I am looking at the probability of his remaining 9 cards containing no more than 2 hearts. The opponents have 3 spades, so their “pile of (unknown) cards” = 23.
However, as I write this I realize that I know more about the hand and can reduce the options further. My hand was (in order spades, hearts, diamonds, clubs):
K Q 10 x x x
K x x x x
K x
I opened one spade and partner bid 2NT showing 4+ spades and a hand good enough that we should make at least 10 tricks with spades as trumps. I was then able to establish that partner had AS, AH and AD (for the bridge aficionados out there, using Exclusion Blackwood). I am trying to establish if we can make a grand slam (all 13 tricks) with spades as trumps. It all comes down to the heart suit. We have a very high likelihood if partner has just one heart (which we know to be the ace) or two hearts. We will also make if partner has A Q x (x) of hearts (but I cannot find out about the queen in the bidding). We have a very good chance is partner is A J x (x) (better if A J 10) or A x x x.
I think I have got enough information from the answers to work this out. We are actually only working with 7 unknown cards in partners hand, because we know about 4 spades (including the ace) plus the aces of hearts and diamonds. We also know that he has at least one of the hearts (the ace). Hence the problem is now two piles of cards, one of 7 and one of 23, with 7 missing hearts. What are the odds of:
[ul]
[li]just one of the hearts being in the pile of 7[/li][li]queen and any other number of hearts being in the 7[/li][li]jack and any other number hearts being in the seven[/li][li]three or more other hearts (without the jack or queen) being in the seven.[/li][/ul]
I think I can work that out. I will report back if I fail.