# What is the probability that a five card hand contains exactly two aces, given that we know it contains at least one ace?

What is the probability that a five card hand contains exactly two aces, given that we know it contains at least one ace?

$P(A|B) = \frac{P(A \cap B)}{P(B)}$ where $A$ is contains exactly two aces and $B$ is contains at least one ace. The book is telling me that $P(A \cap B) = P(A)$, but why would this be? Wouldn't it make more sense that $B \subseteq A$ because $B$ is considering $1$ OR more aces?

• $A\subseteq B$ means: if a hand contains exactly two aces, then it contains at least one ace. $B\subseteq A$ means: if a hand contains at least one ace, then it contains exactly two aces. Now, which statement makes sense to you? – bof Sep 6 '16 at 2:47
• It's at this point I now realize I need to sleep. I forgot to check the logic of what $A \subset B$ meant concerning sets. Everything in $A$ is in $B$ because $B$ contains all subsets sets with one ace and two aces and ect. That makes sense. – Oliver G Sep 6 '16 at 2:56

Here is a simulation to consider when you wake up. Also, some hints.

A million poker hands are fairly 'dealt' using R statistical software. Simulated numbers of aces in each are counted. Then approximated and exact hypergeometric probabilities of relevant events are found. [Perhaps look at 'hypergeometric distribution' in your text or at the Wikipedia article.]

m = 10^6;  nr.aces=numeric(m)
for (i in 1:m) {
hand = sample(1:52, 5)         # aces = 1,2,3,4
nr.aces[i] = sum(hand <= 4) }  # nr aces in hand
cond = (nr.aces >= 1)
mean(nr.aces[cond] == 2)          # read '[...]' as 'such that ...'
## 0.1175526                      # aprx P(exactly 2 | at least 1)
table(nr.aces)/m  # simulated distribution of nr of aces in poker hand
nr.aces
0        1        2        3        4
0.658740 0.299346 0.040116 0.001774 0.000024
round(dhyper(0:4, 4, 48, 5), 5)  # exact hypergeometric distribution
## 0.65884 0.29947 0.03993 0.00174 0.00002


The histogram below shows the simulated distribution of the number of aces, and the blue dots atop the bars show exact hypergeometric probabilities. Let $X$ be the number of aces in a fairly dealt poker hand. Then you should verify exact values of $P(X = 0),\, P(X \ge 1),\, P(X = 2),$ and $P(X = 2 | X \ge 1)$ for yourself. The first and the third are the only ones that require much arithmetic. Notice that $\{X = 2\} \subseteq \{X \ge 1\}.$

A = 2 aces in hand B = >0 ace in hand

P(A|B) = P(A AND B) / P(B)

P(B) = 1 - P(no ace dealt) $= 1 - (48/52)(47/51)(46/50)(45/49)(44/48) = 1 - (48! / 43!) / (52! / 47!)$

no hands that have 2 aces = (ways to choose 2 of 4 aces) x (ways to choose 3 of 48 non aces) = 103776 hands possible = 2598960

P(A) = P(A and B) = 103776 / 2598960

P(A|B) = P(A AND B) / P(B) = (103776 / 2598960) / (1 - (48! / 43!) / (52! / 47!)) = 0.117