Title: Simulating Experiments
1Simulating Experiments
2- A couple plans to have children
- until they have a girl or until
they - have 4 children.
- What are the chances they will
- have a girl?
3How can we answer that question?
- Actually have a lot couples carry out the
experiment and calculate the relative frequency
of having a girl.
4- 2. Develop a probability model and use it to
calculate a theoretical answer. - (COMING ATTRACTION)
5- 3. Start with a model that in some way reflects
the experiment and then simulate it a number of
times
6Simulation Steps
- State the problem or describe the experiment.
- What are the chances that a certain major league
baseball player will have a streak of 4 hits in
his next 20 at-bats?
7- State the assumptions
- At bats are independent of each other
- The player will continue to get a hit 1/3 of the
time he is at bat
8- Assign digits to represent outcomes
- Random number table digits 0-32 represent a
hit 33-99 represent no hit -
9- Simulate many repetitions
- Looking at 20 consecutive two-digit entries in
the table represents one simulation. - Keep track of whether there was a 4-hit streak
in each simulation.
10- State your conclusions
- Estimate the probability by using a proportion
- Number of trials with desired outcome
- Total number of trials
11CAUTIONS
- 25 Repetitions is not enough to be confident in
our conclusion. - Computers can do thousands of simulations quickly
and cheaply and give us more reliable results.
12Question
- How would you use the following aids to establish
correspondence in a simulation that involves a
75 chance?
13A coin
Toss the coin twice. HH, HT, TH, TT
14A Six-sided Die
1, 2, 3, 4. Discard 5, 6
15A Random Digit Table
Two digits 00 74 75 99
16A Standard Deck of Playing Cards
Club, Spade, Heart / Diamond
17Randomizing with a Calculator
- MATH
- PRB
- 5randInt( ENTER
- randInt(lowest, highest, of repetitions)
- TI-89 CATALOG F3 (Flash Apps)
18Nuclear Safety
- A nuclear reactor is equipped with two
independent automatic shutdown systems to shut
down the reactor when the core temperature
reaches the danger level.
19- Neither system is perfect. System A shuts down
the reactor 90 of the time when the danger level
is reached. - System B does so 80 of the time.
- The reactor is shut down if either system works.
20- How would you simulate the response of System A
to a dangerous temperature level?
21- How would you simulate the response of System B
to a dangerous temperature level?
22- Both systems are in operation simultaneously.
Combine your previous answers to simulate the
response of both systems to a dangerous
temperature level.
23Demand for Cheesecake
- The owner of a bakery knows that the daily demand
for a highly perishable cheesecake is as follows
24- /Day Relative Frequency
- 1 0.05
- 2 0.15
- 3 0.25
- 4 0.20
- 5 0.10
In other words, 1 cheesecake is sold 5 of the
time, 2 cheesecakes are sold 15 of the time, 3
cheesecakes are sold 25 of the time, 4
cheesecakes are sold 20 of the time, 5
cheesecakes are sold 10 of the time. Zero
cheesecakes are sold what percentage of the time?
25- Use simulation to find the demand for the
cheesecake on 30 consecutive business days.
26- Suppose that it cost the baker 5 to produce a
cheesecake, and that the unused cheesecakes must
be discarded at the end of the business day.
27- Suppose also that the selling price of a
cheesecake is 13. - Use simulation to estimate the number of
cheesecakes that he should produce each day in
order to maximize profit.
28- /Day Relative Frequency
- 0 0.25
- 1 0.05
- 2 0.15
- 3 0.25
- 4 0.20
- 5 0.10
29Correspondence
- 0 24 0 cakes demanded
- 25 29 1 cake demanded
- 30 44 2 cakes demanded
- 45 - 69 3 cakes demanded
- 70 - 89 4 cakes demanded
- 90 99 5 cakes demanded
30Random Generator
- 10 53 75 10 92 56 42 38
- 3 0 3 4 0 5 3 2 2
- 98 16 61 82 40 57 32 57
- 3 5 0 3 4 2 3 2 3
- 77 64 62 4 12 29 34 33
- 0 4 3 3 0 0 1 2 2
- 4 26
- 4 0 1
31- How many cheesecakes would you make every day?