6.1 Simulations
Download
Report
Transcript 6.1 Simulations
Daniel S. Yates
The Practice of Statistics
Third Edition
Chapter 6:
Probability and Simulation:
The Study of Randomness
6.1 Simulation
Copyright © 2008 by W. H. Freeman & Company
Essential Question
• What is a simulation?
• What are the five steps involved in a
simulation?
• What are independent trials?
• Given a probability problem, how do you
use simulation to get the estimated
probability?
What is Probability?
• Probability is the branch of mathematics
that describes the pattern of chance
outcomes.
• Based on The Big Idea: “Chance behavior
is unpredictable in the short run but has a
regular and predictable pattern in the long
run.”
• Attempts to answer: “What would happen
if we did this many times?”
Definition of Random
• We call a phenomenon random if
individual outcomes are uncertain but
there is nonetheless a regular distribution
of outcomes in a large number of
repetitions.
Definition of Probability
• The probability of any outcome of a
random phenomenon is the proportion of
times the outcome would occur in a very
long series of repetitions. That is,
probability is long-term frequency.
Three Methods for Estimating the
Chances (Probability) of an Event
Occurring
• Observe the random phenomenon many
times and calculate the relative frequency
of the results.
• Develop a probability model and calculate
the theoretical answer.
• Develop a simulation (model with a plan
for imitating the a number of repetitions of
the random phenomenon).
Simulation Steps
• Step 1: State the Problem or describe the
random event.
• Step 2: State the assumptions.
• Step 3: Assign digits to represent
outcomes.
• Step 4: Simulate man y repetitions.
• Step 5: State your conclusions.
Independent Event
• The outcome of one trial (event) does not
influence or change the outcome of
another trial.
Example
• Look at example 6.3 on page 394
Example 2
• Cory rolls a die 30 times.
• How often does a number of 2 or less
appear?
Example 2 Continued
• Step 1: State the problem. Roll a die for 30
times. What is the probability of rolling a 2 or
less?
• Step 2: Assumptions. The outcomes are
independent. The probability of rolling a number
is equally likely for any of the six number on the
die.
• Step 3: Assign digits to represent outcome.
– Use 1 through 6 to represent each number on the die.
• Step 4: Simulate 30 repetitions.
Example 2 Step 4 Repetitions
Math---PRB---randInt(1,6,30)--Sto—
L1--Enter
Step 4 Repetitions
Categorize the results.
L1– 2nd Test--≤--2 –Sto--L2--Enter
Step 4 Repetition
2nd List—MATH—Sum(L2)—Enter.
Step 5 Conclusion
• The estimated probability for rolling a 2 or
less in thirty rolls = 11/30 = 0.367.
Is this what you expected?
• Why wasn’t it exactly 10.
• What would happen if Cory “rolled” 300 times?
•
Law of Large Numbers
• The long-run relative frequency of
repeated independent events settles down
to the true probability as the number of
trials increases.
Applet – coin toss
Example 3
• Fifty-seven students participated in a lottery for a
particularly desirable dorm room, a triple with a
private bath. 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. Use a simulation to
determine whether an all-team outcome could
reasonably be expected to happen if everyone
had a fair shot at the room.(Stats Modeling the
World, page 262)
Example 3 Continued
• Step 1 : State the problem. What is the
probability of having an all-team outcome?
• Step 2: Assumptions.
– Each individual outcome is independent.
– Each of the 57 participants have an equal chance of
being selected.
• Step 3: Assign digits to each outcome. Use a
calculator to do the simulation.
– 0 – 19 represent the 20 varsity team members.
– 20 – 56 represent the other students.
Example 3 Step 4 Simulate 10
Repetitions
Trial
Outcome All Varsity
4, 56, 18
V, N, V
No
29, 23, 13 N, N, V
No
6, 55, 12
V, N, V
No
9, 54, 22
V, N, N
No
22, 36, 13 N, N, V
No
32, 15, 42 N, V, N
No
20, 42, 23 N, N, N
No
31, 8, 8
N, V, V
No
46, 24, 34 N, N, N
No
23, 8, 22
No
N, V, N
Example 3 Step 5 Conclusion
• The estimated probability of having an all
team outcome equals 0/10 = 0.0.
• It appears that the claim of foul may be
true because the probability of an all team
outcome is very small.