# Math probability question

**URL:** https://boards.straightdope.com/t/math-probability-question/596626
**Category:** Factual Questions
**Created:** [September 17, 2011, 3:31pm UTC](https://boards.straightdope.com/t/math-probability-question/596626 "2011-09-17T15:31:53Z")
**Posts on this page:** 16
**Page:** 1

<div class="post-metadata">

### Author: ![amarone](https://avatars.discourse-cdn.com/v4/letter/a/e0b2c6/32.png) [@amarone](https://boards.straightdope.com/u/amarone)
#### Post date: [September 17, 2011, 3:31pm UTC](https://boards.straightdope.com/t/math-probability-question/596626/1 "2011-09-17T15:31:53Z")

</div>

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?

This is for calculating odds in a bridge hand.

---

<div class="post-metadata">

### Author: ![yearofglad](https://avatars.discourse-cdn.com/v4/letter/y/b782af/32.png) [@yearofglad](https://boards.straightdope.com/u/yearofglad)
#### Post date: [September 17, 2011, 4:14pm UTC](https://boards.straightdope.com/t/math-probability-question/596626/2 "2011-09-17T16:14:41Z")

</div>

I believe the answer is approximately 60.19%.

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).

---

<div class="post-metadata">

### Author: ![amarone](https://avatars.discourse-cdn.com/v4/letter/a/e0b2c6/32.png) [@amarone](https://boards.straightdope.com/u/amarone)
#### Post date: [September 17, 2011, 4:17pm UTC](https://boards.straightdope.com/t/math-probability-question/596626/3 "2011-09-17T16:17:15Z")

</div>

> [@yearofglad](#):
>
> I believe the answer is approximately 60.19%.
> 
> 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).

Are all those "C"s really “to the power of”?

---

<div class="post-metadata">

### Author: ![yearofglad](https://avatars.discourse-cdn.com/v4/letter/y/b782af/32.png) [@yearofglad](https://boards.straightdope.com/u/yearofglad)
#### Post date: [September 17, 2011, 4:20pm UTC](https://boards.straightdope.com/t/math-probability-question/596626/4 "2011-09-17T16:20:56Z")

</div>

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](http://wolframalpha.com) can calculate combinations for you.

Sorry for not being clearer.

---

<div class="post-metadata">

### Author: ![Nancarrow](https://avatars.discourse-cdn.com/v4/letter/n/c37758/32.png) [@Nancarrow](https://boards.straightdope.com/u/Nancarrow)
#### Post date: [September 17, 2011, 4:21pm UTC](https://boards.straightdope.com/t/math-probability-question/596626/5 "2011-09-17T16:21:52Z")

</div>

> [@amarone](#):
>
> Are all those "C"s really “to the power of”?

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. 😛

---

<div class="post-metadata">

### Author: ![yearofglad](https://avatars.discourse-cdn.com/v4/letter/y/b782af/32.png) [@yearofglad](https://boards.straightdope.com/u/yearofglad)
#### Post date: [September 17, 2011, 4:23pm UTC](https://boards.straightdope.com/t/math-probability-question/596626/6 "2011-09-17T16:23:41Z")

</div>

Also, of course, you can compute something like nCr by hand. It’s equal to:

n!/(r! \* (n - r)!)

Where n! is the product of all positive integers less than or equal to n. For example, 6! = 6 x 5 x 4 x 3 x 2 x 1.

So, 23C6 = 23!/(6! \* 17!).

There’s a fair amount of canceling that can be done if your calculator can’t handle large quantities like 23!.

---

<div class="post-metadata">

### Author: ![amarone](https://avatars.discourse-cdn.com/v4/letter/a/e0b2c6/32.png) [@amarone](https://boards.straightdope.com/u/amarone)
#### Post date: [September 17, 2011, 4:25pm UTC](https://boards.straightdope.com/t/math-probability-question/596626/7 "2011-09-17T16:25:46Z")

</div>

Heh - The most advanced function on my calculator is “divide”!

I will see if I can do something in Excel - I notice it has COMBIN and FACT functions, which look as if they will do the trick.

Thanks for your help.

---

<div class="post-metadata">

### Author: ![Nancarrow](https://avatars.discourse-cdn.com/v4/letter/n/c37758/32.png) [@Nancarrow](https://boards.straightdope.com/u/Nancarrow)
#### Post date: [September 17, 2011, 4:26pm UTC](https://boards.straightdope.com/t/math-probability-question/596626/8 "2011-09-17T16:26:47Z")

</div>

Ha! Your turn being ninja’d!

(I meant **yearofglad** )

---

<div class="post-metadata">

### Author: ![yearofglad](https://avatars.discourse-cdn.com/v4/letter/y/b782af/32.png) [@yearofglad](https://boards.straightdope.com/u/yearofglad)
#### Post date: [September 17, 2011, 4:29pm UTC](https://boards.straightdope.com/t/math-probability-question/596626/9 "2011-09-17T16:29:05Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Nancarrow](https://avatars.discourse-cdn.com/v4/letter/n/c37758/32.png) [@Nancarrow](https://boards.straightdope.com/u/Nancarrow)
#### Post date: [September 17, 2011, 4:36pm UTC](https://boards.straightdope.com/t/math-probability-question/596626/10 "2011-09-17T16:36:35Z")

</div>

Further observations…

[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)

---

<div class="post-metadata">

### Author: ![ultrafilter](https://avatars.discourse-cdn.com/v4/letter/u/3d9bf3/32.png) [@ultrafilter](https://boards.straightdope.com/u/ultrafilter)
#### Post date: [September 17, 2011, 4:42pm UTC](https://boards.straightdope.com/t/math-probability-question/596626/11 "2011-09-17T16:42:16Z")

</div>

The number of hearts in the pile of nine cards follows a [hypergeometric distribution](https://secure.wikimedia.org/wikipedia/en/wiki/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.

---

<div class="post-metadata">

### Author: ![yearofglad](https://avatars.discourse-cdn.com/v4/letter/y/b782af/32.png) [@yearofglad](https://boards.straightdope.com/u/yearofglad)
#### Post date: [September 17, 2011, 4:45pm UTC](https://boards.straightdope.com/t/math-probability-question/596626/12 "2011-09-17T16:45:00Z")

</div>

> [@ultrafilter](#):
>
> The number of hearts in the pile of nine cards follows a [hypergeometric distribution](https://secure.wikimedia.org/wikipedia/en/wiki/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.

Which is exactly what was already determined; the OP wanted to know the probability of getting NO MORE THAN two hearts in the pile.

---

<div class="post-metadata">

### Author: ![ultrafilter](https://avatars.discourse-cdn.com/v4/letter/u/3d9bf3/32.png) [@ultrafilter](https://boards.straightdope.com/u/ultrafilter)
#### Post date: [September 17, 2011, 4:48pm UTC](https://boards.straightdope.com/t/math-probability-question/596626/13 "2011-09-17T16:48:11Z")

</div>

Easy enough. It’s 60.19%, as was already determined.

---

<div class="post-metadata">

### Author: ![Wendell\_Wagner](https://avatars.discourse-cdn.com/v4/letter/w/8491ac/32.png) [@Wendell\_Wagner](https://boards.straightdope.com/u/Wendell_Wagner)
#### Post date: [September 17, 2011, 5:00pm UTC](https://boards.straightdope.com/t/math-probability-question/596626/14 "2011-09-17T17:00:20Z")

</div>

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:

> **[Combination](https://en.wikipedia.org/wiki/Combination)**
>
> In mathematics, a combination is a selection of items from a set that has distinct members, such that the order of selection does not matter (unlike permutations). For example, given three fruits, say an apple, an orange and a pear, there are three combinations of two that can be drawn from this set: an apple and a pear; an apple and an orange; or a pear and an orange. More formally, a k-combination of a set S is a subset of k distinct elements of S. So, two combinations are identical if and on...

That’s not a very good explanation for a beginner though. Perhaps this is a better explanation of permutations and combinations:

[http://mathforum.org/dr.math/faq/faq.comb.perm.html](http://mathforum.org/dr.math/faq/faq.comb.perm.html)

---

<div class="post-metadata">

### Author: ![amarone](https://avatars.discourse-cdn.com/v4/letter/a/e0b2c6/32.png) [@amarone](https://boards.straightdope.com/u/amarone)
#### Post date: [September 17, 2011, 11:35pm UTC](https://boards.straightdope.com/t/math-probability-question/596626/15 "2011-09-17T23:35:56Z")

</div>

> [@Nancarrow](#):
>
> (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)

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.

---

<div class="post-metadata">

### Author: ![BigT](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/bigt/32/12044_2.png) [@BigT](https://boards.straightdope.com/u/BigT)
#### Post date: [September 18, 2011, 10:58am UTC](https://boards.straightdope.com/t/math-probability-question/596626/16 "2011-09-18T10:58:31Z")

</div>

> [@Wendell\_Wagner](#):
>
> 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:
> 
> [Combination - Wikipedia](http://en.wikipedia.org/wiki/Combination)
> 
> That’s not a very good explanation for a beginner though. Perhaps this is a better explanation of permutations and combinations:
> 
> [http://mathforum.org/dr.math/faq/faq.comb.perm.html](http://mathforum.org/dr.math/faq/faq.comb.perm.html)

I personally like [this one](http://www.mathsisfun.com/combinatorics/combinations-permutations.html). It’s the first time I’ve understood how to derive combinations with repetition.
