Probability - Aces in hand

4.7k Views Asked by At

i received this question in a Hackerrank test (I will not reveal the company name and the test is already expired). The question is: You are dealt 5 cards at random from a deck of poker cards, and are told that at least 3 of them are aces. What is the probability that you have all 4 aces in the dealt cards?

My approach is that excluding the 3 aces, we are essentially picking 2 cards from 52 - 3 = 49 cards, and we are finding how many ways of picking these 2 cards can we have 1 of them being the last ace. Thus, the probability should be 48 ways of picking the ace and a random card / $49 \choose 2$ = $\frac{2}{49}$. However, the only options I was given are: 1/12, 1/13, 1/95, and 1/48. I am wondering if this question is wrong or did I make a mistake somewhere?

Thanks a lot!

2

There are 2 best solutions below

4
On BEST ANSWER

There are 48 hands with $4$ Aces, and there are $4\cdot{48\choose2}=2\cdot48\cdot47$ hands with exactly $3$ Aces, so all together there are $$48+2\cdot48\cdot47=48\cdot95$$ hands with three or more Aces. So, the probability that the hand has $4$ Aces, given that it has at least $3$ Aces is $${48\over48\cdot95}={1\over95}$$

When you say there are $49$ other cards to choose from, you are supposing that you know which three specific Aces you hold, say Clubs, Hearts, and Spades, but this is not so. It may be hard to see how you could know that you hold three Aces, but not know their suits, but imagine that someone else looks at your hand for you, and tells you.

1
On

$P(aces \ge 3)$ = "4 sets of 3 aces" times "2 cards from other 48" + $P(aces == 4)$

from conditional probability definition en.wikipedia.org/wiki/Conditional_probability

$P(aces == 4 | aces \ge 3) = \frac{P(aces == 4 \land aces \ge 3)}{P(aces \ge 3)} = \frac{P(aces == 4)}{P(aces \ge 3)}=\frac{48/ 4C52}{(4 * \binom{48}{2} + 48)/4C52} = \frac{1}{95} $