I can't count

  • I
  • Thread starter quasar987
  • Start date
  • #1
quasar987
Science Advisor
Homework Helper
Gold Member
4,793
21
TL;DR Summary
compute a probability
I have a deck of 60 cards. I draw 7 cards. Among the 60 cards are 21 cards in category "A", 4 cards in category "B" and 8 cards in category "C". The categories are mutually exclusive. I want to the probability that my 7 cards contain at least 2 from category A, 1 from category B and 1 from category C. I count as follows:
$$
\frac{\binom{21}{2}\binom{4}{1}\binom{8}{1}\binom{56}{3}}{\binom{60}{7}}
$$
This is 0.482328 but computer simulations (as well as a sample of 100 hand drawn manually) show that this is off by a factor of 3. The real answer is close to 16%.

Why is my way of counting no good? Where's that factor of 3 coming from ?
 

Answers and Replies

  • #2
DaveC426913
Gold Member
21,178
4,609
What is the 56 / 3?
 
  • Like
Likes FactChecker and malawi_glenn
  • #3
malawi_glenn
Science Advisor
Homework Helper
Gold Member
5,995
1,419
I want to the probability that my 7 cards contain at least 2 from category A, 1 from category B and 1 from category C.
Then you need to add all those possibilities. You have counted "exactly" 2 from A, exactly 1 from B and exactly 1 from C.

Btw, do you mean also "at least 1 from B" and "at least 1 from C"? It is important to be specific.
I will assume that you actually mean "exactly one from B and exactly one from C"

You need to add 3 from A, 1 from B & 1 from C; 4 from A, 1 from B & 1 from C
and so on

Or, just do the complementary probability.
Then you subtract that from 1.

Also the ## \binom{56}{3}## should be ## \binom{27}{3}## because you have only 27 cards that are neither in cathegory A, B, or C.

For instance, the probability that you have exactly 2 A, exactly 1 B and exactly 1 C and then exactly 3 "nor A, B, C" is calculated as
## \dfrac{\binom{21}{2}\binom{4}{1}\binom{8}{1} \binom{27}{3} }{\binom{60}{7}} ##
 
Last edited:
  • Like
Likes PeroK and FactChecker
  • #4
PeroK
Science Advisor
Homework Helper
Insights Author
Gold Member
2021 Award
23,231
14,739
Btw, do you mean also "at least 1 from B" and "at least 1 from C"? It is important to be specific.
I will assume that you actually mean "exactly one from B and exactly one from C"
That gives a probability of about 10%.

Assuming at least 2 from A, at least 1 from B and at least 1 from C gives a probability of about 16%.

I put all the options on a spreadsheet:

ABCXn_An_Bn_Cn_Xn
2​
1​
1​
3​
210​
4​
8​
2925​
19,656,000​
2​
1​
2​
2​
210​
4​
28​
351​
8,255,520​
2​
1​
3​
1​
210​
4​
56​
27​
1,270,080​
2​
1​
4​
0​
210​
4​
70​
1​
58,800​
2​
2​
1​
2​
210​
6​
8​
351​
3,538,080​
2​
2​
2​
1​
210​
6​
28​
27​
952,560​
2​
2​
3​
0​
210​
6​
56​
1​
70,560​
2​
3​
1​
1​
210​
4​
8​
27​
181,440​
2​
3​
2​
0​
210​
4​
28​
1​
23,520​
2​
4​
1​
0​
210​
1​
8​
1​
1,680​
3​
1​
1​
2​
1330​
4​
8​
351​
14,938,560​
3​
1​
2​
1​
1330​
4​
28​
27​
4,021,920​
3​
1​
3​
0​
1330​
4​
56​
1​
297,920​
3​
2​
1​
1​
1330​
6​
8​
27​
1,723,680​
3​
2​
2​
0​
1330​
6​
28​
1​
223,440​
3​
3​
1​
0​
1330​
4​
8​
1​
42,560​
4​
1​
1​
1​
5985​
4​
8​
27​
5,171,040​
4​
1​
2​
0​
5985​
4​
28​
1​
670,320​
4​
2​
1​
0​
5985​
6​
8​
1​
287,280​
5​
1​
1​
0​
20349​
4​
8​
1​
651,168​
62,036,128​

And dividing that total of 62,036,128 by ##\binom {60}{7}## gives a probability of approx ##0.16##.
 
  • Love
Likes malawi_glenn
  • #5
PeroK
Science Advisor
Homework Helper
Insights Author
Gold Member
2021 Award
23,231
14,739
Why is my way of counting no good? Where's that factor of 3 coming from ?
You're not off by exactly a factor of 3. You had several mistakes (as explained above) that gave an answer of approximately three times the correct answer.
 
  • #6
malawi_glenn
Science Advisor
Homework Helper
Gold Member
5,995
1,419
@PeroK
Yeah I did not have the time to calculate what OP actually meant.
 
  • #7
PeroK
Science Advisor
Homework Helper
Insights Author
Gold Member
2021 Award
23,231
14,739
@PeroK
Yeah I did not have the time to calculate what OP actually meant.
Something to do over breakfast!
 
  • Like
Likes malawi_glenn
  • #8
quasar987
Science Advisor
Homework Helper
Gold Member
4,793
21
Then you need to add all those possibilities. You have counted "exactly" 2 from A, exactly 1 from B and exactly 1 from C.

Btw, do you mean also "at least 1 from B" and "at least 1 from C"? It is important to be specific.
I will assume that you actually mean "exactly one from B and exactly one from C"

You need to add 3 from A, 1 from B & 1 from C; 4 from A, 1 from B & 1 from C
and so on

Or, just do the complementary probability.
Then you subtract that from 1.

Also the ## \binom{56}{3}## should be ## \binom{27}{3}## because you have only 27 cards that are neither in cathegory A, B, or C.

For instance, the probability that you have exactly 2 A, exactly 1 B and exactly 1 C and then exactly 3 "nor A, B, C" is calculated as
## \dfrac{\binom{21}{2}\binom{4}{1}\binom{8}{1} \binom{27}{3} }{\binom{60}{7}} ##
Indeed, I meant "at least 2 from A, at least 1 from B and at least 1 from C", which is why I use the term ## \binom{56}{3}## instead of ## \binom{27}{3}## and don't add all the possibilities. I figured my way of counting bypasses that; the numerator reads: "number of ways of choosing 2 from 21, 1 from 4, 1 form 8 and the last 3 cards can be chosen from any of the 56 cards left in the deck", which includes the case where the last 3 cards are in category A, B or C. But apparently not?? Why? This is what I'm trying to understand.
 
  • #9
malawi_glenn
Science Advisor
Homework Helper
Gold Member
5,995
1,419
Why? This is what I'm trying to understand.
Let's do a simpler example
Let's assume that we have a jar with 4 white marbles and 6 black marbles.
You take 3 marbles, without putting them back.
What is the probability that you get at least one white?

It is not ## \dfrac{\binom{4}{1}\binom{9}{2}}{\binom{10}{3}} ## it is ## \dfrac{\binom{4}{1}\binom{6}{2} +\binom{4}{2}\binom{6}{1} + \binom{4}{3}\binom{6}{0}}{\binom{10}{3}} ##
 
  • #10
quasar987
Science Advisor
Homework Helper
Gold Member
4,793
21
But I realize now that I'm counting the same hands multiple times over. For instance my way of couting considers the hands

A1, A2, B1, C1, A3, Y, Z

and

A1, A3, B1, C1, A2, Y, Z

as different. But they're not.

Every couple of years I find myself trying to count something similar and end up falling into the same trap. :headbang:
 
  • Like
Likes malawi_glenn

Suggested for: I can't count

Replies
8
Views
743
  • Last Post
Replies
1
Views
808
  • Last Post
Replies
5
Views
664
Replies
3
Views
2K
Replies
18
Views
3K
Replies
11
Views
966
  • Last Post
4
Replies
126
Views
4K
Replies
7
Views
470
Replies
10
Views
561
Top