Exercise 3.3 - More Repeated Rolls of Dice

Imagine you roll a pair of dice 36 times, and get a seven 6 times; the fraction of sevens is 6/36. You roll the dice 36 more times and this time get 4 sevens, for a fraction of 4/36. In this exercise you will simulate repeating this process 1000 times and display the fraction of sevens that came up for each repetition. The minimum, unlikely, fraction is 0/36 and the maximum is an unlikely 36/36. You will also see that other number of rolls for different numbers of repetitions of the sets of rolls are available.

Choose the number of rolls and the number of times to repeat them:






You should try all of the above possibilities enough times to get a feeling for how they come out.

For other than exactly 36 repeated rolls, a few words about how the fractions are computed may be helpful. Say you choose to simulate rolling the dice 360 times and in one trial a seven comes up 60 times; this gives a fraction of 6/36. If a seven comes up 50 times, the fraction if 5/36. If a seven comes up 46, 47, 48, 49, 50, 51, 52, 53 or 54 times this is closest to a fraction of 5/36. The program also rounds a result of 55 sevens to a fraction of 5/36. Similarly if a seven comes up any of 56, 57, 58, 59, 60, 61, 62, 63, 64 or 65 times that is closest to a fraction of 6/36.

At the end of this exercise, you should answer the following questions:

  1. Particularly for a smaller number of rolls repeated a larger number of times, the shape of the distribution may look familiar. Where have you seen this sort of shape before?
  2. What is a reasonable numerical measure of the width of the distribution?
  3. Comparing the first two possibilities should show that the width of the distribution does not depend on the number of times the sets of rolls is repeated. Comparing all the possibilities but the first shows that it does depend on the number of rolls n. How does the width of the distribution correlate with the number of rolls? Be both qualitative and at least semi-quantitative: if n is the number of rolls does the width vary as n, 1/n, the square root of n, one over the square root of n, …

This document and the Perl code to generate the simulation were written by David M. Harrison, January 2001.
This is $Revision: 1.5 $, $Date: 2001/09/28 13:05:09 $ (year/month/day) UTC.