Simulation Classroom Exercises
Objectives: To be able to:
- Use the Rand and Trunc functions to perform simulations in a
spreadsheet,
- Use the If, And, Or and Frequency functions to process the
results of the simulations, and
- Retain these skills so that completing the computer exercises
in later units in the course will not take too long.
Example 1:
Simulate 100 rolls of an icosahedral (i.e., 20-sided) die.
How many of the rolls were within one average deviation
of the median?
Example 2:
Simulate playing "Rock, Paper, Scissors" 30 times and 300
times. How many non-ties are there in each case?
Each exercise is meant to be done on a separate spreadsheet. Since
we are not allowed to save files on the hard drive on these computers,
do not "Close" a spreadsheet as you finish it; rather, just "Open" a
"New" spreadsheet for each exercise.
Exercise A:
- Create 20 randomly generated whole numbers between 1 and 10
(inclusive) so that each digit is equally likely to appear, whether
or not it appears elsewhere.
- Find the average and standard deviation of the numbers.
- Using the Frequency function, find out how many are within one SD
of the average.
- Check your results by counting by hand.
- Create a new list of 1000 such numbers and find out how many are
within one SD of the average.
- Does this match what we expect for a normal distribution?
Exercise B:
Simulate two people picking numbers 1, 2 or 3. If they match,
person A wins: if they do not match, person B wins. Determine how
many of 100 games person A wins.
Exercise C:
- Simulate 50 coins being tossed, and count the number of times
a head comes up.
- Set up 30 of these simulations in a single spreadsheet.
- Use the Frequency command to determine how many of these 30
simulations have
- 2 or fewer heads
- 7 or more heads
- more than half heads