Probability & Statistics

Pebble in Four Boxes

A pebble starts in Box 1 and a fair coin shuffles it among four boxes, ending only when it reaches Box 4. How many tosses should you expect to wait?

solvedmedium1 min

A pebble starts in Box 1 of four boxes. A fair coin moves it. From Box 1, heads sends it to Box 2 and tails sends it to Box 3. On the next toss, heads sends it back to Box 1 and tails advances it to Box 4. Reaching Box 4 ends the game; landing back in Box 1 means you toss again under the same rules. What is the expected number of tosses to reach Box 4?

Reveal solutionHide solution

#States and transitions

Treat the boxes as states with Box 4 absorbing. From Box 1 a toss lands on Box 2 or Box 3, each with probability 12\tfrac12. From either Box 2 or Box 3 a toss returns to Box 1 or reaches Box 4, again each 12\tfrac12.

HTTTHH1234
Every arrow is a fair toss. From Box 1 the pebble splits to Box 2 or Box 3, and each of those either bounces back to Box 1 on heads or reaches the absorbing Box 4 on tails. Each round of two tosses ends the game with probability one half.

#The transition matrix

Ordering the states Box 1, 2, 3, 4,

P=(0121201200121200120001).(1)P = \begin{pmatrix} 0 & \tfrac12 & \tfrac12 & 0\\[2pt] \tfrac12 & 0 & 0 & \tfrac12\\[2pt] \tfrac12 & 0 & 0 & \tfrac12\\[2pt] 0 & 0 & 0 & 1 \end{pmatrix}. \tag{1}

The last row is absorbing, the lone 11 marking Box 4.

#Expected tosses

Let eie_i be the expected tosses to reach Box 4 from Box ii. Boxes 2 and 3 behave identically, so e2=e3e_2 = e_3 with

e2=1+12e1,e1=1+12e2+12e3=1+e2.(2)e_2 = 1 + \tfrac12 e_1, \qquad e_1 = 1 + \tfrac12 e_2 + \tfrac12 e_3 = 1 + e_2. \tag{2}

Substituting the first into the second, e1=2+12e1e_1 = 2 + \tfrac12 e_1, so e1=4e_1 = 4.

#Result

The expected number of tosses is 44. Each pair of tosses reaches Box 4 with probability 12\tfrac12, so the count of pairs is geometric with mean 22, and two tosses per pair gives 44.