# Expected cards drawn before first ace and king

This is kind of an extension question to this: Expected value of sums. Suppose we draw cards out of a deck without replacement. How many cards do we expect to draw out before we get the first ace and the first king (including the ace/king depending on which comes out first)?

My solution:

1. Let the first ace be $$A$$ and the first king be $$K$$. By symmetry, half the time we would expect $$A$$ to come before $$K$$.
2. Now we have a situation like this $$----A----K----$$ i.e. $$3$$ spaces. Let's call them $$X_1, X_2,$$ and $$X_3$$ going from left to right.
3. Now all non aces and non kings can go in $$X_1, X_2 and X_3$$ with equal probability. There are $$52 - 8 = 44$$ such cards so at the moment, we have $$E(X_1) = \frac{44}{3}, E(X_2) = \frac{44}{3}, E(X_3) = \frac{44}{3}$$
4. For A to be the first ace, the other 3 aces can only go in spaces $$X_2 or X_3$$ and each of these aces goes in with probability $$\frac{1}{2}$$ giving $$3 * \frac{1}{2} = \frac{3}{2}$$.
5. For the remaining 3 kings, they must all go in $$X_3$$ with probability 1.
6. So $$E(X_1) = \frac{44}{3}, E(X_2) = \frac{44}{3} + \frac{3}{2} = \frac{97}{6} and E(X_3) = \frac{44}{3} + \frac{3}{2} + 3 = \frac{115}{6}$$
7. Going back to this $$----A----K----$$, the expected number of cards drawn before we get an ace and a king is $$E(X_1) + 1 + E(X_2) + 1 = \frac{197}{6}$$

Is this correct? I don't have the answer because I made it up myself.

• The lengths of $X_2$ and $X_3$ seem to be dependent on how many aces and kings they contain, in a non-trivial way. I've given a solution that has clean separation between the aces-kings group and the types other types cards. Commented Aug 1 at 15:20
• Thanks for your reply. Why would inlcuding the aces and kings in $X_2$ and $X_3$ be a problem? Commented Aug 1 at 16:49

Each sequence of cards contains a subsequence of $$8$$ elements made entirely out of aces and kings. They split the remaining $$44$$ cards into $$9$$ intervals. The average expected length of such an interval is $$44/9$$, which becomes the expected average "distance" in the deck between $$2$$ consecutive cards in the $$8$$ card subsequence. So, the average expected position of the $$n$$'th element of the $$8$$ element subdeck along the whole deck becomes $$(44/9 +1) * n$$

Now we need to figure out how long along the isolated $$8$$ card subdeck we must go before having both an ace and a king. By symmetry, we can assume the first element is an ace (it's either ace or king). In the remaining $$7$$ cards, the $$4$$ kings split the $$3$$ aces with an average distance between kings of $$3/(4+1)$$ aces . So (assuming we drew ace first) the first king occurs at average position $$3/5 + 1$$ in the remainder $$7$$ card deck, so $$3/5 + 2$$ at the $$8$$ deck. At this position, we will have both an ace and a king. Plugging in $$n = 3/5 + 2$$ in the previous formula, we get $$(44/9 +1) * (3/5 + 2) = \frac{689}{45}$$

• I get the first paragraph of your answer. For the second paragraph, what do you mean by: 'the $4$ kings split the $3$ aces with an average distance between kings of $3/(4+1)$ aces'. Commented Aug 1 at 17:09
• There are $8$ cards: $4$ aces and $4$ kings. The first card is an ace, so we focus on the remaining $7$ cards: $3$ aces and $4$ kings. In those $7$ cards, we're interested in how many aces occur before the first king occurs. Just as our original $8$ cards split the remaining $52- 8 = 44$ into $8+1 = 9$ intervals, so do the $4$ kings split the $7-4 = 3$ cards (which are only aces) into $4+1 = 5$ intervals. So an average of $3/5$ aces occur (within those $7$ cards) before the first king occurs. Commented Aug 1 at 17:26
• Got it now thanks! How did you come up with this solution so quickly? What gave you this intuition? Also do you know where I am going wrong with my solution? Thanks Commented Aug 1 at 21:16
• In your solution, you treat the probability of an $A$ not appearing in $X_2$ to be equal to the probability of it appearing. Ie. you take the aces "out of the deck", then put them back in. That is not correct, as the probability-number actually depends on how many combinations there are of $X_3$, which grows when $X_3$ contains more aces. Commented Aug 2 at 9:31
• Take a simpler problem for intuition on where the approach is wrong: Consider a deck made of $4$ Kings and $3$ aces. We're interested only in how many aces appear on average before the first $K$. A naive approach would take the aces away from the deck, then consider the problem $___ K ___$ , where $X_1$ (first interval) is empty, $X_2$ is just $3$ kings. So $E(X_1) = 0$ and $E(X_2) = 3$ . Then we add back the $3$ aces, obtaining (incorrectly) that E(aces before first K) = $3/2$. Commented Aug 2 at 9:36

In general if a deck contains $$n$$ cards among which are $$k\leq n$$ specific ones then by symmetry it can be proved that the expectation of the number of draws (without replacement) needed to arrive at the first specific card equals:$$\frac{n-k}{k+1}+1=\frac{n+1}{k+1}\tag1$$

If $$X$$ denotes the number of draws needed to arrive at the first card that can be qualified as ace or king then on base of $$(1)$$ we find: $$\mathbb EX=\frac{52+1}{8+1}=\frac{53}9$$

WLOG we assume that this drawn card happened to be an ace.

After this drawing we go on by drawing from a deck that contains $$52-X$$ cards among which there are $$4$$ kings.

Now if $$K$$ denotes the number of extra draws needed for arriving at a first king then again using $$(1)$$ we find the following expression:$$\mathbb E(K|X)=\frac{(52-X)+1}{4+1}=\frac{53-X}5$$

Then we find:$$\mathbb EK=\mathbb E[\mathbb E[K|X]]=\mathbb E\left[\frac{53-X}5\right]=\frac{53-\mathbb EX}{5}=\frac{53-\frac{53}9}5=\frac{424}{45}$$

As final answer for the expectation of number of draws needed for arriving at a first ace and a first king we find:$$\mathbb E(X+K)=\mathbb EX+\mathbb EK=\frac{53}9+\frac{424}{45}=\frac{689}{45}$$

• Thanks for this answer. I got it now. However, I don't understand what I was doing wrong in my method? Commented Aug 2 at 8:16
• If $A$ and $K$ denote the first ace and the first king in point 2 then space $X_3$ contains on average more non- aces and non-kings than the other $2$ spaces. Commented Aug 2 at 9:15
• Could you please post a reference, possibly online, for the derivation of (1)? Commented Aug 2 at 9:23
• @gboffi Add a special card so that now there are $n+1$ cards among which $k+1$ are special. Randomly place the cards in a circle. Evidently the $k+1$ 'strings' of non-special cards that arise have equal average length. So this average length must be $\frac{n-k}{k+1}$. This does not change if we turn the circle into a row by removing one of the special cards. Commented Aug 2 at 10:02