Problem 11.6 Easy Free 1 variation

Runs of Consecutive Successes

You draw cards one at a time from a standard 52-card deck, replacing and reshuffling after each draw. Find the expected number of draws needed to see four jacks drawn consecutively.

Work it out, then compare with the answer.

SolutionShow the worked solution

Each draw is a jack with probability p=113p=\frac{1}{13}, independently of the others, because the deck is replaced and reshuffled. Write k=4k=4 and let EE be the expected number of draws.

Key idea. Condition on when the current streak of jacks first breaks.

Look at the first kk draws. Two things can happen.

  • The first non-jack is draw jj, for some 1≤j≤k1\le j\le k. This has probability pj−1(1−p)p^{j-1}(1-p). We have used jj draws and must start again from scratch.
  • All kk draws are jacks. This has probability pkp^k, and we stop after kk draws.

Hence

E=∑j=1kpj−1(1−p) (j+E)+pkk.E=\sum_{j=1}^{k} p^{j-1}(1-p)\,(j+E)+p^k k .

Collect the EE terms. Their total coefficient on the right is ∑j=1kpj−1(1−p)=1−pk\sum_{j=1}^k p^{j-1}(1-p) = 1-p^k, so

pkE=∑j=1kj pj−1(1−p)+kpk.p^k E=\sum_{j=1}^{k} j\,p^{j-1}(1-p)+k p^k .

The right-hand side is E[min⁡(G,k)]\mathbb{E}[\min(G,k)], where G∼Geom(1−p)G\sim\mathrm{Geom}(1-p) is the position of the first non-jack. Since P(G>i)=pi\mathbb{P}(G>i)=p^i,

E[min⁡(G,k)]=∑i=0k−1P(G>i)=∑i=0k−1pi.\mathbb{E}[\min(G,k)]=\sum_{i=0}^{k-1}\mathbb{P}(G>i)=\sum_{i=0}^{k-1}p^i .

Therefore

E=1+p+⋯+pk−1pk=∑j=1kp−j.E=\frac{1+p+\dots+p^{k-1}}{p^k}=\sum_{j=1}^{k}p^{-j}.

With p=113p=\frac1{13} and k=4k=4:

E=13+132+133+134=13+169+2197+28561=30940.E = 13+13^2+13^3+13^4 = 13+169+2197+28561=30940.
30940\boxed{30940}

Generalisation. The expected wait for kk consecutive successes with success probability pp is

∑j=1kp−j=p−k−11−p.\sum_{j=1}^k p^{-j}=\frac{p^{-k}-1}{1-p}.

Variations

The same idea with a twist. Each solution gives only the changed step.

Variation 11.6a

Alice and Bob repeatedly toss a fair coin. Alice wins as soon as three heads appear in a row; Bob wins as soon as three tails appear in a row. Find the expected number of tosses until one of them wins.

Work it out, then compare with the answer.

Solution

Call a toss after the first a match if it equals the previous toss. Each such toss is a match with probability 12\frac12, independently of all earlier tosses.

The game ends exactly when two consecutive matches occur, since that means three equal tosses in a row. By the main result with p=12p=\frac12 and k=2k=2, the expected number of tosses after the first is

2+22=6.2+2^2=6.

Adding the first toss gives

7\boxed{7}