**Appendix 2 Converting** *π* **to a source of random dice rolls**

The decimal number sequence of *π* provides a ready source of random numbers and has passed numerous statistical checks [8–12] to this effect. routines. Johnson and Leeming [11] found that *π* achieved higher randomness ratings than 100,000-digit runs from random number generators. *π* is readily available in a suitable form for use [14]. One can sample the string by selecting consecutive 5 numbers and using 00000 ≤ **1** ≤ 16666, 16667 ≤ **2** ≤ 33333, 33334≤ **3** ≤ 50000, 50001 ≤ **4** ≤ 66667, 66668 ≤ **5** ≤ 83333, and 83334 ≤ **6** ≤ 99999, where the number in black represents the cast from 1-6. For example, 141592653589793 are the first 15 numbers after 3. in *π*, giving 14159 (**1**), 26535 (**2**), 89793 (**6**), and a 3D6 cast of 9. The results of this method are random, although the sequence is deterministic. After sampling 100,000 digits of *π* after 3. and breaking them into 5 number strings, converting these to dice rolls as above 20,000 individual 1D6 casts were calculated, and then summed into 6,679 consecutive 3D6 casts (**Figure 8**) [29]. The probability distribution can be calculated for these casts and compared to the underlying distribution from 3D6 outlines in **Table 1**.

The sequence can be intercepted at any point to generate a random sequence of dice rolls for use within the game using the string of digits after an arbitrary set position. As observed by G Marsaglia, the originator of the 'Diehard' tests [30] for randomness, '*The digits in the expansion of irrationals such as π, seem to behave as though they were the output of a sequence of independent identically distributed (iid) random variables'* [31].

## **Appendix 3 Probability for average scores in 'Chance all' for a given Bt**

The analysis begins by selecting a Bt, such that 3 ≤*Bt* ≤18*:* If the first cast is s, then if s≥Bt, you will score the single roll total:

#### **Figure 8.**

*Probability for 3D6 casts calculated from π made from the first 100,000 digits, converted to 20,000 dice casts and 6679 3D6 casts. These are compared to the underlying counted distribution for the 216 combinations of 3D6 given in Tables 1 and 2. This passes the Chi squared test [30].*

#### *Game Theory - From Idea to Practice*


#### **Table 5.**

*Calculated scores for 3* ≤*Bt* ≤18 *using Eq. (7), compared to the results from 2160 simulations to 2dp.*

where 10.5 is the average score for 3D6.

If you score less than Bt, then you roll again. If you score less than or equal to s, you score nothing. If you exceed that amount, you score:

$$Double = \sum\_{s=3}^{Bt-1} \sum\_{t>s}^{18} p(s)p(t)(s+t) \tag{6}$$

Hence the total average roll is:

$$Score = 10.5 - \sum\_{s=3}^{Bt-1} sp(s) + \sum\_{s=3}^{Bt-1} \sum\_{t>s}^{18} p(s)p(t)(s+t) \tag{7}$$

For example, Suppose we choose Bt=4, then:

$$Score = 10.5 - 3p(\mathfrak{J}) + p(\mathfrak{J}) \sum\_{t>\mathfrak{J}}^{18} p(t)(\mathfrak{J} + t) \tag{8}$$

This is:

$$\text{Score} = 10.5 - 3p(3) + p(3)[7p(4) + 8p(5) + 9p(6) + \dots \text{21p}(18)] \tag{9}$$

So using the probabilities identified in **Table 1** for each cast the average score per round is:

*'Chance all' – A Simple 3D6 Dice Stopping Game to Explore Probability and Risk vs Reward DOI: http://dx.doi.org/10.5772/intechopen.105703*

#### **Figure 9.**

*Calculated average score (red) together with the mean from the simulated average scores for 3* ≤*Bt*≤18 *from 2160 simulations linked by the dotted line and confidence interval markers at* � *95% levels. Data taken from Table 5.*

$$\begin{aligned} Score &= 10.5 - \frac{3 \ast 1}{216} + \frac{1}{216^2} [7 \ast 3 + 8 \ast 6 + 9 \ast 10 + 10 \ast 15 + 11 \ast 21 + 12 \ast 25 \\ &+ 13 \ast 27 + 14 \ast 27 + 15 \ast 25 + 16 \ast 21 + 17 \ast 15 + 18 \ast 10 + 19 \ast 6 + 20 \ast 3 \\ &+ 21 \ast 1 \end{aligned} \tag{10}$$

*Score* ¼ 10*:*55 for Bt = 4 to 2 dp's.

Following the same process, **Table 5** shows the calculation of the average score per round for 3 ≤*Bt* ≤18, together with the result of 2160 simulations performed by Google Sheets using the same rng as Roll Dice [6]. This uses the conversion from a random number to dice roll as discussed in Appendix 2. The data are plotted in **Figure 9** together with the confidence intervals calculated from Eq. (4).

The standard deviation increases as Bt increases due to the presence of more zero scores. Clearly an optimal average score per round exists at Bt = 11, and **Figure 9** shows this. Note that the calculated average score lies within the confidence intervals, indicating that the analysis is sound.

#### **Author details**

Mark Flanagan<sup>1</sup> , Trevor C. Lipscombe<sup>2</sup> , Adrian Northey<sup>3</sup> and Ian M. Robinson<sup>3</sup> \*

1 NHS Business Service Authority, Newcastle upon Tyne, UK

2 Catholic University of America, Washington, D.C., USA

3 Hearts of Oak, North Yorks, UK

\*Address all correspondence to: a.anser4u@gmail.com

© 2022 The Author(s). Licensee IntechOpen. This chapter is distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/by/3.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.
