CHAPTER 11: Understanding Randomness We all know what it

advertisement
CHAPTER 11:
Understanding Randomness
We all know what it means for something to be random. Or do we?????
Many children’s games rely on chance outcomes. Rolling dice, spinning
spinners, and shuffling cards all select at random. Adult games also use
randomness, from card games to lotteries to Bingo.
What’s the most important aspect of randomness? It must be FAIR.
What makes it fair?
1. Nobody can guess the outcome before it happens and
2. Some underlying set of outcomes must be equally likely
Example: Is this event “random”?
 Pick “heads” or “tails.”
 Now flip a fair coin. Does the outcome match your choice? Did you
know before flipping the coin whether or not it would match?
Randomness is not always what we might think of as “random.” Random
outcomes have a lot of structure, especially when viewed in the long run.
Statisticians don’t think of randomness as the annoying tendency of things
to be unpredictable or haphazard. Statisticians use randomness as a tool.
But, truly random values are surprisingly hard to get…
I am about to show you a picture on the board of numbers, I want you to pick
a number at random. Just look at the numbers quickly, don’t second guess,
and just pick one randomly.
Ready?.....
(image on board) 
Did you pick 3? If so, you’ve got company. About 75% of all people pick the
number 3. About 20% choose 2 or 4. If you picked 1, well, consider yourself
a little different. Only about 5% choose 1.
Exercises
1. Is a coin flip random? Why or why not?
2. A casino claims that its electronic “video roulette” machine is truly
random. What should that claim mean?
3. Many states run lotteries, giving away millions of dollars if you match
a certain set of winning numbers. How are those numbers
determined? Do you think this method guarantees randomness?
Explain.
It’s surprisingly difficult to generate random values even when they’re
equally likely. Computers have become a popular way to generate random
numbers. Even though they often do much better than humans, computers
can’t generate truly random numbers either. Since computers follow
programs, the “random” numbers we get from computers are really
pseudorandom.
Fortunately, pseudorandom values are good enough for most purposes.
Pseudorandom values are generated in a fixed sequence – fortunately
pseudorandom values are good enough for most purposes because they are
virtually indistinguishable from truly random numbers
There are ways to generate random numbers so that they are both equally
likely and truly random. The best ways we know to generate data that give a
fair and accurate picture of the world rely on randomness, and the ways in
which we draw conclusions from those data depend on the randomness, too.
***There is a table of random digits in the back of the book – Appendix G
Cereal boxes simulation – suppose a cereal manufacturer puts pictures of
famous athletes on cards in boxes of cereal in the hope of boosting sales.
20% of the boxes have Tiger Woods, 30% David Beckham, and 50% Serena
Williams. You want all three pictures. How many boxes of cereal do you
expect to have to buy in order to get the complete set??
We can’t afford to buy a lot of boxes so we need an imitation of the real
process that we can manipulate and control. In short, we’re going to
simulate reality.
We can’t answer our question by completing a card collection just once. We
want to understand the typical number of boxes to open, how that number
varies, and, often, the shape of the distribution. We call each time we
obtain a simulated answer to our question a TRIAL.
For the sports cards, a trial’s outcome is the number of boxes needed to
complete the set.
BUILDING A SIMULATION
Steps for making a simulation:
1. Identify the component to be repeated.
2. Explain how you will model the component’s outcome
Specify how to simulate trials
3. Explain how you will combine the components to model a trial.
4. State clearly what the response variable is.
Put it all together to run the simulation
5. Run several trials
Analyze the response variable
6. Collect and summarize the results of all the trials.
7. State your conclusion (as always, in context of the question you
wanted to answer)
Example
We know the relative frequencies of the cards: 20% Tiger, 30% Beckham,
and 50% Williams. So we can interpret the numbers 0 and 1 as finding Tiger.
2, 3, and 4 as finding Beckham and 5, 6, 7, 8, 9 as finding Serena to simulate
opening one box. ***It is important for a simulation to have the same
number of digits for each outcome (in other words, if we used 10, we would
want to use 00, 01, 02, etc. for each of the other outcomes)
Opening one box is the basic building block, called a component of our
simulation.
The trial’s outcome is called the response variable: for this simulation that’s
the number of components (boxes) in the sequence.
It’s best to make a chart to keep track of what happens:
Trial Number
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
Component Outcomes
Trial Outcomes: y = # of boxes
Example
The game of 21 can be played with an ordinary 6-sided die. Competitors
each roll the die repeatedly, trying to get the highest total less than or
equal to 21. If your total exceeds 21, you lose. Suppose your opponent has
rolled an 18. Your task is to try to beat him by getting more than 18 points
without going over 21. How many rolls do you expect to make, and what are
your chances of winning?
Question: What is the component? How will you simulate the components?
Question: How will you combine components to model a trial? What’s the
response variable?
Question: How would you use these random digits to run trials? Show your
method clearly for two trials.
91129 58757 69274 92380 82464 33089
Question: Suppose you run 30 trials. What is your conclusion?
Example
The baseball World Series consists of up to seven games. The first team to
win four games wins the series. The first two are played at one team’s home
ballpark, the next three at the other team’s park, and the final two (if
needed) are played back at the first park. Records over the past century
show that there is a home field advantage; the home team has about a 55%
chance of winning. Does the current system of alternating ballparks even
out the home field advantage? How often will the team that begins at home
win the series? Let’s set up the simulation.
1. What is the component to be repeated?
2. How will you model each component from equally likely random digits?
3. How will you model a trial by combining components?
4. What is the response variable?
5. How will you analyze the response variable?
Step-by-Step Example
Fifty-seven students participated in a lottery for a particularly desirable
dorm room-- a triple with a fireplace and private bath in the tower. Twenty
of the participants were members of the same varsity team. When all three
winners were members of the team, the other students cried foul.
Question: Could an all-team outcome reasonably be expected to happen if
everyone had a fair shot at the room?
THE MORE TRIALS THE BETTER. (20 trials are probably a reasonable
MINIMUM if you are doing this by hand – better yet, use a calculator or
computer and run a few hundred trials!!!)
Generating random numbers using TI (page 262)
Math – PRB – randInt (#, #, #)
The first digit is the starting number, the second digit is the highest
possible number, and the third number is how many numbers you want to
generate)
What Can Go Wrong?
 Don’t overstate your case.
 Beware of confusing what really happens with what a simulation
suggests might happen.
 Model outcome chances accurately.
 A common mistake in constructing a simulation is to adopt a
strategy that may appear to produce the right kind of results.
 Run enough trials.
 Simulation is cheap and fairly easy to do.
What have we learned?
 How to harness the power of randomness.
 A simulation model can help us investigate a question when we can’t (or
don’t want to) collect data, and a mathematical answer is hard to
calculate.
 How to base our simulation on random values generated by a computer,
generated by a randomizing device, or found on the Internet.
 Simulations can provide us with useful insights about the real world.
Homework (Night 1): Page 265 #6, 8, 9, 15, 16, 17
Homework (Night 2): Page 265 # 19, 25, 28, 31, 36, 39
Download