Transcript Slide 1

Chapter 11
Understanding Randomness
Copyright © 2009 Pearson Education, Inc.
Objectives:


Accurately model a situation through simulation.
Discuss the results of a simulation study and
draw conclusions about the questions being
investigated.
Copyright © 2009 Pearson Education, Inc.
Slide 1- 3
Random Procedures


A random procedure is a procedure whose
outcome cannot be known in advance
How can we determine the probability a random
procedure will have a certain outcome?
Copyright © 2009 Pearson Education, Inc.
Approach #1: Relative Frequency
Approximation of Probability

Conduct/observe a procedure n times, and count
the # of times that an outcome of interest occurs.
Based on these results, the probability of the
outcome is estimated as follows:
# of times outcome occurred
P(outcome) 
# of times the procedure was repeated


This approach obtains an approximation
(estimate) instead of an exact value
Law of Large #’s: As the # of trials increases,
the relative frequency probability approaches the
actual probability
Copyright © 2009 Pearson Education, Inc.
Approach #2:
Classical Approach to Probability

Assume that a given procedure has n different
outcomes and that each of these outcomes has
an equal chance of occurring. If an outcome of
interest can occur in s of these n ways, then
P(outcome) 

# of ways outcome can occur
s

# of different possible outcomes n
This approach requires equally likely outcomes
Copyright © 2009 Pearson Education, Inc.
Approach #3:
Subjective Probabilities



P(outcome) is estimated by using personal
judgment about the likelihood of an event
This approach is needed when there is no
repeatable random experiment available
Examples:
 What is the probability it will rain tomorrow?
 What is the probability the stock market will
rise tomorrow?
 What is the probability more than 5 students in
this class will get an “A” on the next exam?
Copyright © 2009 Pearson Education, Inc.
Simulation


There are many situations when we want to
estimate the probability of an outcome of a
random procedure, but:
 The classical approach to probability is not
possible, and/or
 The relative frequency approach is
unwieldy/expensive/infeasible/etc.
In these situations we can simulate the random
procedure in order to estimate the probability of
our outcome of interest
Copyright © 2009 Pearson Education, Inc.
Practical Randomness
Motivating example: A cereal manufacturer puts
pictures of famous athletes on cards in boxes of
cereal in hopes of boosting sales. 20% of the
boxes contain a picture of Tiger Woods, 30% a
picture of David Beckham, and the rest a picture
of Serena Williams. If you want all three pictures,
how many boxes of cereal do you expect to have
to buy?
 We need an imitation of a real process so we can
manipulate and control it.
 In short, we are going to simulate reality.
Copyright © 2009 Pearson Education, Inc.
Slide 1- 9
A Simulation




We want to understand the typical number of
boxes we’ll have to buy and how that number
varies (and the shape of the distribution) so we
have to test this many times.
The sequence of events we want to investigate is
called a trial. (e.g. opening boxes until we get all
three cards)
The basic building block of a simulation is called
a component. (e.g. opening one box)
There are seven steps to a simulation…
Copyright © 2009 Pearson Education, Inc.
Slide 1- 10
Simulation Steps
1.
2.
3.
4.
5.
6.
7.
Identify the component to be repeated.
Explain how you will model the component’s
outcome using random numbers.
State clearly what the response variable is.
Explain how you will combine the components into
a trial to model the response variable.
Run several trials.
Collect and summarize the results of all the trials.
State your conclusion.
Copyright © 2009 Pearson Education, Inc.
Slide 1- 11
Example: Simulation Steps
1.
Identify the component to be repeated.

Opening a box of cereal
Explain how you will model the component’s
outcome using random numbers.
2.

3.
Digits 0-9 are equally likely to occur, use 0,1 to indicate Tiger, 2,3,4 to
indicate Beckham, and 5, 6, 7, 8, 9 to indicate Serena
State clearly what the response variable is.

4.
Number of boxes it took to get all three pictures
Explain how you will combine the components into
a trial to model the response variable.

5.
6.
We open boxes (repeat components) until all three pictures found.
Trials outcome is number of boxes (components)
Run several trials.
Collect and summarize the results of all the trials.

7.
Be sure to report shape, center, and spread
State your conclusion.

The simulation suggests that…
Copyright © 2009 Pearson Education, Inc.
Slide 1- 12
Example: Simulation Steps
Use 0,1 to indicate Tiger, 2,3,4 to indicate Beckham, and 5, 6, 7, 8, 9 to
indicate Serena
1.
Run several trials using the following random
digits:221772630438741009253708627058199
76227258497959070328250011089633217535
82264380029225464494376064238904376655
72
2. Fill out a table: Trial number, component
outcomes, Trial outcomes: y = number of
boxes)
3.
Collect and summarize the results of all the trials.

4.
Be sure to report shape, center, and spread
State your conclusion.
Copyright © 2009 Pearson Education, Inc.
Slide 1- 13
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.
 Are all outcomes equally likely?
Run enough trials.
 Simulation is cheap and fairly easy to do.
Copyright © 2009 Pearson Education, Inc.
Slide 1- 14
Where do we get random numbers?


Random number tables from random sources in
nature
 Your textbook has a random number table in
Appendix D
Computers and your calculator can generate
pseudorandom numbers
 Use MATH -> PRB -> randInt(low, high,
numtrials) to generate a set of random integers

E.g. randInt(0,1,5) will generate a set of 5 random
digits of 0 or 1.
Copyright © 2009 Pearson Education, Inc.
Slide 1- 15
examples

You decide to play the lottery. You have to pick 5
numbers between 1 and 60 and want to use
random numbers to pick your lucky numbers.
Which numbers would you play based on these
random digits:
 43680 98750 13092 76561 58712
 Is this a particularly good or bad strategy?

Text #11, 13, 15
Copyright © 2009 Pearson Education, Inc.
Slide 1- 16


Bad simulations: Explain why these fail to model the
real situation properly
 Use a random number from 0 through 9 to represent
the number of heads that appear when 9 coins are
tossed
 A basketball player takes a foul shot. Look at a
random digit, using an odd digit to represent a good
shot and an even digit to represent a miss.
 Use five random digits from 1 through 13 to
represent the denominations of the cards in a poker
hand.
Wrong conclusion:
 A Statistics student properly simulated the length of
a checkout lines in a grocery store and then
reported, “The average length of the line will be 3.2
people.” What is wrong with this conclusion?
Copyright © 2009 Pearson Education, Inc.
Slide 1- 17
More Practice

You are pretty sure that your candidate for class
president has about 55% of the votes in the entire
school. But you’re worried that only 100 students
will show up to vote. How often will the underdog
(the one with 45% support) win?
 Describe how you will simulate a component
and its outcomes
 Describe how you will simulate a trial
 Describe the response variable
Copyright © 2009 Pearson Education, Inc.
Slide 1- 18
Example – Actually conduct this
simulation using all 7 steps

Many couples want to have both a boy and girl. If
they decide to continue to have children until they
have one child of each sex, what would the
average family size be?
 Assume that boys are girls are equally likely.
Copyright © 2009 Pearson Education, Inc.
Slide 1- 19
Example – Actually conduct this
simulation using all 7 steps
(#31 in your textbook)
Many couples want to have both a boy and girl. If
they decide to continue to have children until they
have one child of each sex, what would the
average family size be?
 Assume that boys are girls are equally likely.

Copyright © 2009 Pearson Education, Inc.
Slide 1- 20
Example – Actually conduct this
simulation using all 7 steps
(#33 in your textbook)
You are playing a children’s game in which the
number of spaces you will get to move is
determined by the rolling of a die. You must land
exactly on the final space in order to win. If you
are 10 spaces away, how many turns might it
take you to win?

Copyright © 2009 Pearson Education, Inc.
Slide 1- 21
Hand-in homework




You are taking a multiple choice quiz which consists of 6
questions. Each question has five possible answers to
choose from of which only one is correct. Answer the
following questions.
1. (0.25 points) What is your chance of choosing the
correct answer for any particular problem? (express as a
decimal rounded to two decimal places.)
2. (0.25 points) Given the set of random numbers
0,1,2,...9, explain how you would do a simulation for the
above quiz for question #1.
3. (1 points) Actually do a simulation on the TI for all 6
questions. Show the result and interpret the result in the
context of the problem. ie which did you get right and
which did you get wrong.
Copyright © 2009 Pearson Education, Inc.
Slide 1- 22