Problem 11.20 Easy Free 1 variation

Running Sum Hits a Multiple of Six

A fair six-sided die is rolled repeatedly, and the results are summed as the rolls accumulate. Find the expected number of rolls needed until this running total is first a multiple of six.

Work it out, then compare with the answer.

SolutionShow the worked solution

Key idea. Whatever the running total is, exactly one face makes the new total a multiple of six.

Let Sk=X1+⋯+XkS_k=X_1+\dots+X_k and N=min⁡{k≥1:6∣Sk}N=\min\{k\ge 1: 6\mid S_k\}. Fix k≥1k\ge1 and condition on X1,…,Xk−1X_1,\dots,X_{k-1}. Then Sk−1≡r(mod6)S_{k-1}\equiv r \pmod 6 for some known r∈{0,…,5}r\in\{0,\dots,5\}. The new total Sk=Sk−1+XkS_k=S_{k-1}+X_k is divisible by 66 exactly when Xk≡−r(mod6)X_k\equiv -r\pmod 6.

The faces 1,…,61,\dots,6 cover every residue mod 66 exactly once, so exactly one face does this. Since XkX_k is independent of the earlier rolls,

P(6∣Sk ∣ X1,…,Xk−1)=16.\mathbb{P}\bigl(6\mid S_k \,\big|\, X_1,\dots,X_{k-1}\bigr)=\tfrac16 .

This holds whatever the history. In particular it holds on the event {N>k−1}\{N>k-1\}, which is determined by X1,…,Xk−1X_1,\dots,X_{k-1}. Hence P(N>k∣N>k−1)=56\mathbb{P}(N>k\mid N>k-1)=\tfrac56, and by induction P(N>k)=(5/6)k\mathbb{P}(N>k)=(5/6)^k.

So N∼Geom(1/6)N\sim\mathrm{Geom}(1/6), and

E[N]=∑k≥0P(N>k)=∑k≥0(56)k=6.\mathbb{E}[N]=\sum_{k\ge0}\mathbb{P}(N>k)=\sum_{k\ge0}\left(\tfrac56\right)^k=6 .
E[N]=6\boxed{\mathbb{E}[N]=6}

Variations

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

Variation 11.20a

A fair six-sided die is rolled repeatedly, and the results are summed as the rolls accumulate. Find the expected number of rolls needed until this running total is first even.

Work it out, then compare with the answer.

Solution

The same argument applies with parity in place of residues mod 66. Whatever the parity of Sk−1S_{k-1}, exactly three of the six faces make SkS_k even: even faces if Sk−1S_{k-1} is even, odd faces if it is odd. Each roll therefore succeeds with conditional probability 12\tfrac12 regardless of the past.

Hence N∼Geom(1/2)N\sim\mathrm{Geom}(1/2) and E[N]=2\mathbb{E}[N]=2. Conditioning on the first roll gives the same result: 12⋅1+12(1+2)=2\tfrac12\cdot1+\tfrac12(1+2)=2.

E[N]=2\boxed{\mathbb{E}[N]=2}