The Ballot Duplication Trick: Expected Number of Matches
A deck of 52 cards is shuffled and laid face-up in a row. A second, independently shuffled deck is laid face-up beneath the first — one card below each card of the first deck.
What is the expected number of positions where the two cards match (same rank and suit)?
Now here is the twist: suppose instead of 52 cards, you use a deck of cards. Does the expected number of matches depend on ?
Answer: Expected Number of Matches
Key Idea / Intuition
The trick is linearity of expectation — you don't need to worry about dependencies between positions at all. Each of the positions contributes independently to the expected count. For position , the probability that the card from deck 1 matches the card from deck 2 is exactly , since the second deck is a uniformly random permutation. Summing over all positions gives an expected number of matches equal to exactly 1, regardless of .
Formal Proof / Solution
Setup. Let be the indicator random variable for the event that the card at position in the first deck matches the card at position in the second deck, for .
The total number of matches is
Key computation. By linearity of expectation,
Now fix position . The card at position in deck 1 is some fixed card (say, the 7 of hearts). The card at position in deck 2 is a uniformly random card from a fresh random permutation of cards — so it equals any particular card with probability .
Therefore,
Result. Summing:
The surprise: The expected number of matches is always 1, regardless of . Whether you use a 2-card deck or a 52-card deck or a 1000-card deck, you expect exactly one match on average.
Comparison with the derangement problem. This is the same structure as the hat-check problem (derangements), but now we ask for the expected number of fixed points of a random permutation. The answer is 1 by the same argument — and this holds for any . The variance also simplifies beautifully: for all (also by indicator calculations), so the distribution of converges to Poisson(1) as .
Source: Fifty Challenging Problems in Probability with Solutions, Frederick Mosteller, Problem 45