aez-notes
The First Ace
Shuffle an ordinary deck of 52 playing cards containing four aces. Then turn up cards from the top of until the first ace appears. On the average, how many cards are required to produce the first ace?
- The probability of drawing it on the first go is \(4/52\)
- The probability of drawing it on the second go is \((48/52)(4/51\)
- The probability of drawing it on the third go is \((48/52)(47/51)(4/50\)
- The probability of drawing it on the \(n\)-th go is
\[ 4 \frac{ \prod_{i=0}^{n-2} (48-i) }{ \prod_{i=0}^{n-1} (52-i) } \]
p(n) := if is(equal(n, 1)) then 4/52 else 4 * product(48 - i, i, 0, n - 2) / product(52 - i, i, 0, n - 1); print(float(sum(p(i) * i, i, 1, 50))); /* 10.6 */
Alternatively, note that the four aces will split the deck into five segments (if you loop them around), and that these must all have the same expected length which leads to \(48 / 5 + 1\) which is equal to \(10.6\).