To solve this problem using simulation, we need to be able to assign digits to outcomes. Each box should have a 20% chance of having a prize and an 80% chance of not having a prize. Therefore, a valid assignment would be:
\begin{align*}
0, 1 \amp \rightarrow \text{ prize }\\
2-9 \amp \rightarrow \text{ no prize }
\end{align*}
Of the ten possible digits (0, 1, 2, ..., 8, 9), two of them, i.e. 20% of them, correspond to winning a prize, which exactly matches the odds that a cereal box contains a prize.
In Mika’s simulation, one trial will consist of 6 boxes of cereal, and therefore a trial will require six digits (each digit will correspond to one box of cereal). We will repeat the simulation for 20 trials. Therefore we will need 20 sets of 6 digits. Let’s begin on row 1 of the random digit table, shown in
Table 3.3.1. If a trial consisted of 5 digits, we could use the first 5 digits going across:
43087. Because here a trial consists of 6 digits, it may be easier to read down the table, rather than read across. We will let trial 1 consist of the first 6 digits in column 1 (
461819), trial 2 consist of the first 6 digits in column 2 (
339564), etc. For this simulation, we will end up using the first 6 rows of each of the 20 columns.
In trial 1, there are two 1’s, so we record that as a success; in this trial there were actually two prizes. In trial 2 there were no 0’s or 1’s, therefore we do not record this as a success. In trial 3 there were three prizes, so we record this as a success. The rest of this exercise is left as a Guided Practice problem for you to complete.