# I can't count

• I
Homework Helper
Gold Member
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 ?

Gold Member
What is the 56 / 3?

FactChecker and malawi_glenn
Homework Helper
Gold Member
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:
PeroK and FactChecker
Homework Helper
Gold Member
2021 Award
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:

 A B C X n_A n_B n_C n_X n 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##.

malawi_glenn
Homework Helper
Gold Member
2021 Award
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.

Homework Helper
Gold Member
@PeroK
Yeah I did not have the time to calculate what OP actually meant.

Homework Helper
Gold Member
2021 Award
@PeroK
Yeah I did not have the time to calculate what OP actually meant.
Something to do over breakfast!

malawi_glenn
Homework Helper
Gold Member
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.

Homework Helper
Gold Member
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}} ##

Homework Helper
Gold Member
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.

malawi_glenn