Simulation: Law of Large Numbers 1 Board Game - Simulation

advertisement
Simulation: Law of Large Numbers
1
Board Game - Simulation
Assume your favorite board game lets you roll a number of dice and look for the highest die. Computing
the probability that the highest die out of three is 6 is fairly easy, as well as computing the probability that
the maximum is 1. All other values are fairly tricky to get at, doing a simulation will be a lot easier.
(a) Use a random number generator to simulate the situation: at www.random.org you can find a way to
get files of integer random numbers. Use those to simulate rolling three dice 1000 times. If you prefer,
you may use a pseudo-random uniform number generator in R or the programming language of your
choice instead of the random numbers from www.random.org. For each throw of three dice, we are
interested in the maximum number of spots. For example, if you throw three dice, and your outcome
is die 1 = 2, die 2 = 1, die 3 = 2, then the maximum of the three dice is 2.
Compute the (empirical) probability mass function for the maximum number of spots in each turn
(i.e. compute the (empirical) probability, that the maximum of the three dice is 1,2,3,4,5 or 6 (six
probabilities)). For example, the empirical probability of a 2 is the fraction of the 1000 trials in which
the maximum of the three simulated dice is a 2.
(b) Compute the exact probability that the maximum is a 6 and the exact probability that the maximum is
a 1 using what you know about discrete random variables. (Please see the hint on the course webpage
if this is unclear to you). Compare your empirical probabilities from (a) for a maximum of 6 or 1 with
the exact probabilities.
(c) Simulate 1000 throws of another two dice. Compute the probability that the maximum of three dice is
higher than the maximum of two dice, i.e. compute how often the above maximum is higher than the
maximum of the two dice for each of the 1000 turns. To compute the probability that the maximum
of three dice is higher than the maximum of two dice, you calculate the fraction of the 1000 turns in
which the maximum you found in part (a) for three dice is larger than the maximum you found in part
(c) for two dice. Does the result surprise you? Explain.
1
Download