Quant Memo
Foundational

Expected Cards Until the First Ace

A classic interview puzzle solved with the symmetry trick: by treating the four aces and 48 non-aces as randomly ordered, the answer falls out without any messy summation.

Problem. You deal cards one at a time from a well-shuffled 52-card deck. How many cards do you expect to deal before you see the first ace?

The instinct is to set up a sum: the probability the first ace appears on card kk, times kk, summed over k=1k=1 to 4949. That works but it's slow and error-prone under interview pressure. There's a much faster route that uses symmetry instead of summation, and recognizing it is the actual point of the question.

The symmetry trick

Think of the deck not as "48 non-aces, then figure out where 4 aces land," but as 52 positions in a random order, with the 4 aces occupying 4 of those positions completely at random. The 48 non-ace cards split the deck into 5 gaps: before the first ace, between the 1st and 2nd ace, between the 2nd and 3rd, between the 3rd and 4th, and after the 4th ace. By symmetry — every non-ace card is equally likely to fall in any of these 5 gaps, since nothing distinguishes the gaps from the non-ace cards' point of view — the 48 non-aces split themselves evenly across the 5 gaps in expectation:

E[non-aces before first ace]=485=9.6.E[\text{non-aces before first ace}] = \frac{48}{5} = 9.6 .

The number of cards dealt up to and including the first ace is one more than the number of non-aces that came before it, so

E[cards until first ace]=485+1=10.6.E[\text{cards until first ace}] = \frac{48}{5} + 1 = 10.6 .

Why the symmetry argument is valid

The key fact making this legal: with a uniformly random shuffle, the relative order of the 48 non-ace cards among themselves, and their positions relative to the 4 aces, is exchangeable — no gap is structurally favored over another. This is the same reasoning as asking "if you randomly place 4 dividers among 48 balls in a row, how many balls fall, on average, in each of the 5 resulting groups" — obviously 48/548/5 by symmetry, no calculation needed. The card problem is exactly that setup in disguise.

Worked example: checking it against direct summation

As a sanity check, the direct approach says P(first ace on card k)=48!/(48(k1))!×4P(\text{first ace on card } k) = \frac{48!/(48-(k-1))! \times 4}{\ldots}, which is messy — but a simpler equivalent formulation gives P(first ace is card k)=(51k3)(514)P(\text{first ace is card } k) = \frac{\binom{51-k}{3}}{\binom{51}{4}} for k=1,,48k=1,\dots,48 (choosing where the other 3 aces fall among the remaining cards). Rather than expand that sum by hand, trust the symmetry answer of 10.610.6 and use it as the benchmark: if a summation-based approach in an interview doesn't converge toward 10.610.6, that's the signal to recheck the setup rather than to trust the arithmetic.

Path explorer
13055time →
end (bold path) 100.38spread of ends 58.966 independent paths, same settings

The explorer above isn't the exact mechanism here, but it's useful for building intuition about any "expected time until an event under randomness" question — watch how the running count of an event settles toward a stable average the longer you let the random process run, which is the same idea behind trusting 48/548/5 as a long-run average across many reshuffles.

Splitting a shuffled deck into gaps around the "special" cards and applying symmetry avoids summation entirely: with KK special cards and NKN-K other cards, the other cards split evenly across the K+1K+1 gaps in expectation, giving E[position of first special card]=NKK+1+1E[\text{position of first special card}] = \frac{N-K}{K+1} + 1. For aces, that's 485+1=10.6\frac{48}{5} + 1 = 10.6.

This gap-symmetry trick generalizes immediately: "expected position of the second ace," "expected number of cards between the 2nd and 3rd ace," and "expected position of the last ace" are all answerable the same way — by counting how many gaps exist and dividing the non-special cards evenly among them — without ever writing a summation.

Related concepts

Practice in interviews

Further reading

  • Ross, A First Course in Probability, ch. 7
ShareTwitterLinkedIn