Stat 330 Simulation: LLN and CLT Fall 2008 1

advertisement
Stat 330
1
Simulation: LLN and CLT
Fall 2008
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. For each
throw of three dice, we are interested in the maximum number of spots.
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)).
(b) Compare your results of (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 that the maximum of the two dice for each of the
1000 turns.
Does the result surprise you? Explain.
(d) ... and the Central Limit Theorem again ... Now assume, that we are interested to play out a large
battle in the board game: our opponent has 30 dice. How many dice do we need to beat him with a
probability of 0.85? (i.e. how many dice do we need, such that their sum is higher than the sum of 30
dice with a probability of 0.85)
Download