# On Quaker's Dozen

The Baron's latest wager set Sir R----- the task of rolling a higher score with two dice than the Baron should with one twelve sided die, giving him a prize of the difference between them should he have done so. Sir R-----'s first roll of the dice would cost him two coins and twelve cents and he could elect to roll them again as many times as he desired for a further cost of one coin and twelve cents each time, after which the Baron would roll his.
The simplest way to reckon the fairness of this wager is to re-frame its terms; to wit, that Sir R----- should pay the Baron one coin to play and thereafter one coin and twelve cents for each roll of his dice, including the first. The consequence of this is that before each roll of the dice Sir R----- could have expected to receive the same bounty, provided that he wrote off any losses that he had made beforehand.

Put in these terms it is self evident that Sir R----- should set himself a constant goal at which to stick, for if it were to maximise his expected prize after the first roll, then it should also do so after every subsequent roll. I explained as much to the Baron, but I suspect that I did not have his undivided attention at the time.

Now, if we label Sir R-----'s roll with $$x_r$$ and the Baron's with $$x_b$$ then we can therefore formulate his expected winnings as
\begin{align*} w_k &= \Pr(x_r \geqslant k) \times \mathrm{E}\left[\max(x_r-x_b, 0) | x_r \geqslant k\right] + \Pr(x_r < k) \times w_k -1 \tfrac{12}{100}\\ w_k \times \left(1 - \Pr(x_r < k)\right)&= \Pr(x_r \geqslant k) \times \mathrm{E}\left[\max(x_r-x_b, 0) | x_r \geqslant k\right] - \tfrac{112}{100}\\ w_k \times \Pr(x_r \geqslant k) &= \Pr(x_r \geqslant k) \times \mathrm{E}\left[\max(x_r-x_b, 0) | x_r \geqslant k\right] - \tfrac{28}{25}\\ w_k &= \mathrm{E}\left[\max(x_r-x_b, 0) | x_r \geqslant k\right] -\frac{28}{25 \times \Pr(x_r \geqslant k)} \end{align*}
where $$\mathrm{E}[X|C]$$ is the expected value of $$X$$ given that the condition $$C$$ holds true.

The probabilities that Sir R-----'s score were equal to any particular value of $$k$$ are easily figured to be
$\begin{matrix} k & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 & 12\\ \Pr(x_r = k) & \tfrac{1}{36} & \tfrac{2}{36} & \tfrac{3}{36} & \tfrac{4}{36} & \tfrac{5}{36} & \tfrac{6}{36} & \tfrac{5}{36} & \tfrac{4}{36} & \tfrac{3}{36} & \tfrac{2}{36} & \tfrac{1}{36} \end{matrix}$
from which we can trivially deduce that the probabilities that it were greater than or equal to any given value of $$k$$ are
$\begin{matrix} k & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 & 12\\ \Pr(x_r \geqslant k) & 1 & \tfrac{35}{36} & \tfrac{33}{36} & \tfrac{30}{36} & \tfrac{26}{36} & \tfrac{21}{36} & \tfrac{15}{36} & \tfrac{10}{36} & \tfrac{6}{36} & \tfrac{3}{36} & \tfrac{1}{36} \end{matrix}$
Once Sir R----- had chosen to stick with a roll of $$x_r$$, he should have expected a prize of
$\mathrm{E}\left[\max(x_r-x_b, 0)\right] = \sum_{x=1}^{x_r-1} \tfrac{1}{12} \left(x_r - x\right)$
where $$\sum$$ is the summation sign, which we can reorganise into
$\mathrm{E}\left[\max(x_r-x_b, 0)\right] = \tfrac{1}{12} \sum_{x=1}^{x_r-1} x_r - \tfrac{1}{12} \sum_{x=1}^{x_r-1} x = \tfrac{1}{12} \times x_r\left(x_r-1\right) - \tfrac{1}{12} \times \tfrac12 x_r\left(x_r-1\right) = \tfrac{1}{24} x_r\left(x_r-1\right)$
and so, by the very definition of conditional expectations, we have
\begin{align*} \mathrm{E}\left[\max(x_r-x_b, 0) | x_r \geqslant k\right] &= \frac{\sum_{x=k}^{12} \mathrm{E}\left[\max(x-x_b, 0)\right] \times \Pr\left(x_r = x\right)}{\sum_{x=k}^{12} \Pr\left(x_r = x\right)}\\ &= \frac{\sum_{x=k}^{12} x \times (x-1) \times \Pr\left(x_r = x\right)}{24 \times \Pr\left(x_r \geqslant k\right)} \end{align*}
We can make light work of figuring these expectations by noting that
$\sum_{x=k}^{12} x \times (x-1) \times \Pr\left(x_r = x\right) = k \times (k-1) \times \Pr\left(x_r = k\right) + \sum_{x=k+1}^{12} x \times (x-1) \times \Pr\left(x_r = x\right)$
and proceeding backwards from twelve to two
$\begin{matrix} k & \quad & \sum_{x=k}^{12} x \times (x-1) \times \Pr\left(x_r = x\right) & \quad & \mathrm{E}\left[\max(x_r-x_b, 0) | x_r \geqslant k\right]\\ 12 && 12 \times 11 \times \tfrac1{36} = \frac{132}{36} && \dfrac{\frac{132}{36}}{24 \times \frac{1}{36}} = \frac{132}{24}\\ 11 && 11 \times 10 \times \frac2{36} + \frac{132}{36} = \frac{352}{36} && \dfrac{\frac{352}{36}}{24 \times \frac{3}{36}} = \frac{352}{72}\\ 10 && 10 \times 9 \times \frac3{36} + \frac{352}{36} = \frac{622}{36} && \dfrac{\frac{622}{36}}{24 \times \frac{6}{36}} = \frac{622}{144}\\ 9 && 9 \times 8 \times \frac4{36} + \frac{622}{36} = \frac{910}{36} && \dfrac{\frac{910}{36}}{24 \times \frac{10}{36}} = \frac{910}{240}\\ 8 && 8 \times 7 \times \frac5{36} + \frac{910}{36} = \frac{1,190}{36} && \dfrac{\frac{1,190}{36}}{24 \times \frac{15}{36}} = \frac{1,190}{360}\\ 7 && 7 \times 6 \times \frac6{36} + \frac{1,190}{36} = \frac{1,442}{36} && \dfrac{\frac{1,442}{36}}{24 \times \frac{21}{36}} = \frac{1,442}{504}\\ 6 && 6 \times 5 \times \frac5{36} + \frac{1,442}{36} = \frac{1,592}{36} && \dfrac{\frac{1,592}{36}}{24 \times \frac{26}{36}} = \frac{1,592}{624}\\ 5 && 5 \times 4 \times \frac4{36} + \frac{1,592}{36} = \frac{1,672}{36} && \dfrac{\frac{1,672}{36}}{24 \times \frac{30}{36}} = \frac{1,672}{720}\\ 4 && 4 \times 3 \times \frac3{36} + \frac{1,672}{36} = \frac{1,708}{36} && \dfrac{\frac{1,708}{36}}{24 \times \frac{33}{36}} = \frac{1,708}{792}\\ 3 && 3 \times 2 \times \frac2{36} + \frac{1,708}{36} = \frac{1,720}{36} && \dfrac{\frac{1,720}{36}}{24 \times \frac{35}{36}} = \frac{1,720}{840}\\ 2 && 2 \times 1 \times \frac1{36} + \frac{1,720}{36} = \frac{1,722}{36} && \dfrac{\frac{1,722}{36}}{24 \times \frac{36}{36}} = \frac{1,722}{864} \end{matrix}$
Sir R-----'s expected winnings were therefore
$\begin{matrix} w_{12} &=& \frac{132}{24} - \dfrac{28}{25 \times \frac1{36}} &=& \frac{132 \times 25 - 28 \times 24 \times 36}{24 \times 25} &=& \frac{3,300-24,192}{600} &=& -\frac{20,892}{600} &=& -34\frac{492}{600}\\ w_{11} &=& \frac{352}{72} - \dfrac{28}{25 \times \frac3{36}} &=& \frac{352 \times 25 \times 3 - 28 \times 72 \times 36}{72 \times 25 \times 3} &=& \frac{26,400-72,576}{5,400} &=& -\frac{46,176}{5,400} &=& -8 \frac{2,976}{5,400}\\ w_{10} &=& \frac{622}{144} - \dfrac{28}{25 \times \frac6{36}} &=& \frac{622 \times 25 \times 6 - 28 \times 144 \times 36}{144 \times 25 \times 6} &=& \frac{93,300 - 145,152}{21,600} &=& -\frac{51,852}{21,600} &=& -2 \frac{8,652}{21,600}\\ w_9 &=& \frac{910}{240} - \dfrac{28}{25 \times \frac{10}{36}} &=& \frac{910 \times 25 \times 10 - 28 \times 240 \times 36}{240 \times 25 \times 10} &=& \frac{227,500-241,920}{60,000} &=& -\frac{14,420}{60,000}\\ w_8 &=& \frac{1,190}{360} - \dfrac{28}{25 \times \frac{15}{36}} &=& \frac{1,190 \times 25 \times 15 - 28 \times 360 \times 36}{360 \times 25 \times 15} &=& \frac{446,250-362,880}{135,000} &=& \frac{83,370}{135,000}\\ w_7 &=& \frac{1,442}{504} - \dfrac{28}{25 \times \frac{21}{36}} &=& \frac{1,442 \times 25 \times 21 - 28 \times 504 \times 36}{504 \times 25 \times 21} &=& \frac{757,050-508,052}{264,200} &=& \frac{249,018}{264,200}\\ w_6 &=& \frac{1,592}{624} - \dfrac{28}{25 \times \frac{26}{36}} &=& \frac{1,592 \times 25 \times 26 - 28 \times 624 \times 36}{624 \times 25 \times 26} &=& \frac{1,034,800-628,992}{405,600} &=& \frac{405,808}{405,600} &=& 1\frac{208}{405,600}\\ w_5 &=& \frac{1,672}{720} - \dfrac{28}{25 \times \frac{30}{36}} &=& \frac{1,672 \times 25 \times 30 - 28 \times 720 \times 36}{720 \times 25 \times 30} &=& \frac{1,254,000-725,760}{540,000} &=& \frac{528,240}{540,000}\\ w_4 &=& \frac{1,708}{792} - \dfrac{28}{25 \times \frac{33}{36}} &=& \frac{1,708 \times 25 \times 33 - 28 \times 792 \times 36}{792 \times 25 \times 33} &=& \frac{1,409,100-798,336}{653,400} &=& \frac{610,764}{653,400}\\ w_3 &=& \frac{1,720}{840} - \dfrac{28}{25 \times \frac{35}{36}} &=& \frac{1,720 \times 25 \times 35 - 28 \times 840 \times 36}{840 \times 25 \times 35} &=& \frac{1,505,000-846,720}{735,000} &=& \frac{658,280}{735,000}\\ w_2 &=& \frac{1,722}{864} - \dfrac{28}{25 \times \frac{36}{36}} &=& \frac{1,722 \times 25 \times 36 - 28 \times 864 \times 36}{864 \times 25 \times 36} &=& \frac{1,594,800-870,912}{777,600} &=& \frac{678,888}{777,600} \end{matrix}$
and I should have consequently advised him to accept the Baron's wager, provided that he stuck with a score of six or greater upon each roll!
$$\Box$$