Probability & Statistics

A Dice Duel

Roll two dice over and over. A wins on the first sum of 12, B wins on the first back-to-back pair of 7s. Who is more likely to win?

solvedmedium2 min

Two players roll a pair of fair dice repeatedly and record each sum. Player A wins as soon as a sum of 1212 appears. Player B wins as soon as two consecutive sums of 77 appear. They roll until one of them wins. What is the probability that A wins?

Reveal solutionHide solution

#Two live states

Only one thing about the past matters for the next roll, whether the previous sum was a 77. That gives two transient states, S0S_0 fresh (the last sum was not a 77) and S1S_1 primed (the last sum was a 77), plus an absorbing state AA reached by a 1212 and an absorbing state BB reached by a 77 right after a 77. Per roll, P(12)=136\PP(12) = \tfrac{1}{36}, P(7)=636\PP(7) = \tfrac{6}{36}, and P(neither)=2936\PP(\text{neither}) = \tfrac{29}{36}.

freshafter 7A winsB wins
From either live state a 12 wins for A and a non-7 non-12 roll resets to fresh. A first 7 only primes the chain; a second 7 in a row is what wins for B.

#The transition matrix

Ordering the states S0,S1,A,BS_0, S_1, A, B, one roll moves the chain by

P=(293663613602936013663600100001).(1)P = \begin{pmatrix} \tfrac{29}{36} & \tfrac{6}{36} & \tfrac{1}{36} & 0\\[2pt] \tfrac{29}{36} & 0 & \tfrac{1}{36} & \tfrac{6}{36}\\[2pt] 0 & 0 & 1 & 0\\[2pt] 0 & 0 & 0 & 1 \end{pmatrix}. \tag{1}

From S0S_0 a non-77 non-1212 stays fresh, a 77 primes the chain, and a 1212 wins for A. From S1S_1 the same 1212 wins for A, another 77 wins for B, and anything else snaps the streak back to S0S_0.

#Absorption probabilities

Let ai=P(A winsstate i)a_i = \PP(\text{A wins} \mid \text{state } i), with aA=1a_A = 1 and aB=0a_B = 0. Reading the two transient rows,

a0=2936a0+636a1+136,a1=2936a0+136.(2)a_0 = \tfrac{29}{36}a_0 + \tfrac{6}{36}a_1 + \tfrac{1}{36}, \qquad a_1 = \tfrac{29}{36}a_0 + \tfrac{1}{36}. \tag{2}

The first rearranges to 7a0=6a1+17a_0 = 6a_1 + 1. Substituting the second, 36a1=29a0+136 a_1 = 29 a_0 + 1, and clearing denominators gives 78a0=4278 a_0 = 42, so

P(A wins)=a0=7130.538.(3)\PP(\text{A wins}) = a_0 = \frac{7}{13} \approx 0.538. \tag{3}

A 12 is rarer on any single roll than a 7, yet A is the favorite, because B needs two 7s in a row and the 2936\tfrac{29}{36} reset keeps snapping that streak before it completes.