Odds of drawing any 3 identical cards from 27-card deck (9 unique x 3 copies each) in 9 draws

card-gamesprobability

I have a 27-card deck with 3 copies of each of 9 distinct cards. If I'm drawing 9 cards, what are the odds that I draw all 3 copies of any one of the 9 possible options? [Also known as "What are the odds of drawing all three of the same city in the Pandemic Legacy season 2 prologue game?"]

My initial approach was to count the number of possible matching hands versus the ${27 \choose 9}$ total possible number of hands.

I figured that there are ${24 \choose 6}$ possible ways to pick the rest of the 9-card draw after assuming one full set of 3 cards, so that makes $9 * {24\choose6}$ starting hands.

However, this double-counts hands that have two or more sets of 3 cards so I need to subtract those. Calculating that follows a similar approach, so we have to subtract $8 * {21 \choose 3}$ cards. Of course that latter bit double-counts the hands where our six cards are two sets of three. So we have to subtract the 7 such hands from that.

So my final formulation was:
$\frac{9 * {24\choose6} – (8 * {21\choose3} – 7)}{27\choose9}$ ~= 25.6%

Does that seem right? If not, what am I doing wrong?

Best Answer

Sure, inclusion-exclusion (as you've done) is one way to do it. It's nice to check by doing it another way when you can. In this case, consider the ways to choose $9$ cards without choosing all three of any one "rank". You must either have $9$ singletons, or $7$ singletons and a pair, or $5$ singletons and two pairs, or $3$ singletons and $3$ pairs, or one singleton and $4$ pairs. Each singleton or pair can be chosen in three ways from its "rank". So this amounts to $$ 3^9+\frac{9!}{7!}\cdot3^8+\frac{9!}{5!2!2!}\cdot3^7+\frac{9!}{3!3!3!}\cdot3^6+\frac{9!}{4!4!}\cdot3^5=3523257 $$ ways to not get three of any one "rank". Dividing this by the ${{27}\choose{9}}=4686825$ draws gives a $$ \frac{3523257}{4686825}\approx 75.174\% $$ chance of not getting three of a kind, which doesn't quite agree with your stated chance of getting one. You've done two small things wrong. First, when subtracting the double-counted cases (where you've drawn two sets of three and three leftovers), there are ${{9}\choose{2}}=36$ (not just $8$) ways to choose the two ranks. Second, when adding back in the double-counted cases from that set (where you've drawn three sets of three), there are ${{9}\choose{3}}=84$ possibilities (not just $7$). So you should get $$ \frac{9\cdot{{24}\choose{6}} - 36\cdot {{21}\choose{3}} + 84}{{27}\choose{9}}=\frac{1163568}{4686825}\approx 24.826\% ... $$ this is now in exact agreement with the other approach.