Rolling a Die
A die is rolled until a 6 appears. Using simulation, find the average number of rolls needed to obtain a 6. Try the experiment 20 times.
Step 1 List all possible outcomes. They are 1, 2, 3, 4, 5, 6.
Step 2 Determine the probabilities. Each outcome has a probability of \frac{1}{6}.
Step 3 Set up a correspondence between the random numbers and the outcome. Use random numbers 1 through 6 . Omit the numbers 7,8,9, and 0 .
\begin{array}{|c|l|r|} \hline \text { Trial } & \text { Random number } & \text { Number of rolls } \\ \hline 1 & 857236 & 4 \\ 2 & 210480151101536 & 11 \\ 3 & 2336 & 4 \\ 4 & 241304836 & 7 \\ 5 & 4216 & 4 \\ 6 & 37520398758183716 & 9 \\ 7 & 7792106 & 3 \\ 8 & 9956 & 2 \\ 9 & 96 & 1 \\ 10 & 89579143426 & 7 \\ 11 & 8547536 & 5 \\ 12 & 289186 & 3 \\ 13 & 6 & 1 \\ 14 & 094299396 & 4 \\ 15 & 1036 & 3 \\ 16 & 0711997336 & 5 \\ 17 & 510851276 & 6 \\ 18 & 0236 & 3 \\ 19 & 01011540923336 & 10 \\ 20 & 5216 & 4 \\ & & \text { Total } \overline{96} \\ \hline \end{array}
Step 4 Select a block of random numbers, and count each digit 1 through 6 until the first 6 is obtained. For example, the block 857236 means that it takes 4 rolls to get a 6 .
\begin{array}{lllll}8&5 & 7 & 2 & 3 & 6 \\ &\uparrow & & \uparrow & \uparrow & \uparrow \\ &5 & & 2 & 3 & 6\end{array}
Step 5 Compute the results and draw a conclusion. In this case, you must find the average.
\bar{X}=\frac{\Sigma X}{n}=\frac{96}{20}=4.8
Hence, the average is about 5 rolls.
Note: The theoretical average obtained from the expected value formula is 6 . If this experiment is done many times, say 1000 times, the results should be closer to the theoretical results.