# Simulations

Document Sample

```					Simulations

AP Statistics Presentation 3.10
Family Planning
• A new couple decides that they would like
to have 3 children?
• The father would really like to have a
daughter.
• What is the probability that the couple will
have at least one daughter among three
children?
Family Planning
• What is the probability that the couple will have at least
one daughter among three children?
• To answer this question, one might…
– Conduct an observational study and start randomly selecting
families with three children. They would then find the proportion
of them that have at least one girl. That would cost some time
and a lot of money (for the surveys, phone calls, etc.).
– Design and run an experiment. Gather willing couples. Instruct
them to have exactly three children, then measure the results to
find the proportion. This might be unethical and take a lot of time.
– Design and conduct a simulation. This takes very little time and
money and can answer the question.
Family Planning
• What is the probability that the couple will have at least one
daughter among three children?
• The probability of having a girl is essentially 50% or 0.5.
• We could then simply use a coin to simulate having three children
letting a head represent a girl and a tail represent a boy.
– This would go much faster than the experiment.
• So, we toss three coins at a time to simulate one family. This is
one repetition.
• Like sample size, we want lots of repetitions, so we might flip the
coins a couple of hundred times to determine the probability of
having at least one daughter.
Steps to a simulation
#1 State the problem or question
#2 State the assumptions
#3 Assign digits to represent outcomes
#4 Simulate many repetitions
#5 State conclusions

• The difference in these steps is that we will use
random digits instead of coin flips.
Steps to a simulation
• How the steps look in practice (with the
family planning example).
Steps to a Simulation
#1 State the problem or   • What is the probability
question                  of a couple having at
#2 State the                least one daughter
assumptions               given that they have
#3 Assign digits to         three children?
represent outcomes
#4 Simulate many
repetitions
#5 State conclusions
Steps to a Simulation
#1 State the problem or         • The probability of having
question                        a girl is 0.5 or 50%.
#2 State the assumptions        • The gender of children is
#3 Assign digits to represent     independent (the notion
outcomes                        that is the 1st child is a
#4 Simulate many                  boy the chance of the 2nd
repetitions                     being a boy is still 50%.
#5 State conclusions
Steps to a Simulation
#1 State the problem or         • We’ll use random digits
question                        for this one.
#2 State the assumptions        • A table of random digits
#3 Assign digits to represent     consists of a long, long
outcomes                        list of digits from 0 to 9.
#4 Simulate many                • Since the probability is
repetitions                     50%, assign half the
#5 State conclusions              digits to represent a girl
and the other half to
represent a boy.
• The digit assignment is:
• 0-4 = Girl
• 5-9 = Boy
Steps to a Simulation
#1 State the problem or   • First, define what one
question                  repetition is.
#2 State the              • One repetition is
assumptions               having three children.
#3 Assign digits to       • One repetition then
represent outcomes        consists of 3 random
#4 Simulate many            digits.
repetitions
#5 State conclusions
Steps to a Simulation
#1 State the problem or question   • Consider the random digits:
#2 State the assumptions             827314072780607824031730
#3 Assign digits to represent        0157649684178912
outcomes                        • The first 3 digits are 827, so
#4 Simulate many repetitions         the first family had a boy, girl,
#5 State conclusions                 boy.
• The second family had 314 or
girl, girl, girl.
• The 3rd family had 072 or girl,
boy, girl.
• Conduct this about 50 times
and you’ve got a good
estimate of the true chance.
Steps to a Simulation
#1 State the problem or   • Using your many
question                  repetitions, you have
#2 State the                a good estimate of
assumptions               the true chance of
#3 Assign digits to         having at least one
represent outcomes        girl in a family of 3
children.
#4 Simulate many
repetitions
#5 State conclusions
More Simulations
• Let’s try steps #3 and #4 again, this time
using the calculator.
Steps to a Simulation
#1 State the problem or question                                • We’ll use a calculator this time.
#2 State the assumptions                                        • The calculator has a random
#3 Assign digits to represent                                     number generator built in.
outcomes                                                     • Since the probability is 50%,
#4 Simulate many repetitions                                      we just need the calculator to
#5 State conclusions                                              give us a random number of 1
or 2.
• The digit assignment is:
• 1 = Girl
• 2 = Boy
• The calculator can give us a 1
or 2 randomly by going to the
(probability), then rand (ti89) or
randint (ti83/84).
• See the screenshots ti89 on
the left, ti83/84 on the right.
On the 83/84s, you enter randint (low number, hi
number, number of numbers). We want a number
from 1 to 2 and we want 3 of them.
Steps to a Simulation
#1 State the problem or   • Again, define what
question                  one repetition is.
#2 State the              • One repetition is
assumptions               having three children.
#3 Assign digits to       • One repetition then
represent outcomes        consists of 3 random
#4 Simulate many            digits.
repetitions
#5 State conclusions
Steps to a Simulation
#1 State the problem or   • The ti89 needs to do
question                  one child at a time.
#2 State the              • The ti83/84 can
assumptions               generate as many at
#3 Assign digits to         once as you like
represent outcomes        (three in our case to
#4 Simulate many            simulate three
repetitions               children)
#5 State conclusions
A Sample Problem to Try
average of .350 in his
rookie season. That is
(not getting technical), he
got a hit 35% of the time.
• If he typically has 4 at
bats (or chances to hit)
each game, how often
would you expect him to
have a multi-hit game (2
or more hits in a game)?
Steps to a Simulation
#1 State the problem or   • If Ichiro (who gets a
question                  hit 35% of the time)
#2 State the                typically has 4 at bats
assumptions               (or chances to hit)
#3 Assign digits to         each game, how often
represent outcomes        would you expect him
to have a multi-hit
#4 Simulate many            game (2 or more hits
repetitions               in a game)?
#5 State conclusions
Steps to a Simulation
#1 State the problem or   • The probability of
question                  getting a hit is 0.35 or
#2 State the                35%.
assumptions             • Getting a hit is
#3 Assign digits to         independent (the
represent outcomes        notion that you can
#4 Simulate many            get hot (streak) or
repetitions               cold (slump) is not
considered.
#5 State conclusions
Steps to a Simulation
#1 State the problem or                     • Since the probability is
question                                    35%, assign 35 out of
#2 State the assumptions                      100 possible numbers to
#3 Assign digits to represent                 a hit.
outcomes                                  • Possible digit
#4 Simulate many                              assignments:
– Random Digit Table
repetitions
• 01-35 = Hit
#5 State conclusions                              • 36-00 = No Hit
You could also reduce (like             – Calculator
fractions) to assign digits if you
like. Since 35/100=7/20 you
• 1-35 = Hit
could use:                                 • 36-100 = No Hit
1-7 = Hit
8-20 = No Hit
Steps to a Simulation
#1 State the problem or   • First, define what one
question                  repetition is.
#2 State the              • One repetition is four
assumptions               at-bats (or tries),
#3 Assign digits to         which is one game.
represent outcomes      • Let’s simulate 20
#4 Simulate many            games.
repetitions
#5 State conclusions
Steps to a Simulation
#1 State the problem or question   • Use RandInt(1,100,4) – see
#2 State the assumptions             top screenshot
#3 Assign digits to represent      • In this 1st game, Ichiro got a hit
outcomes                          in his 1st and 3rd tries (a multi-
#4 Simulate many repetitions         hit game).
#5 State conclusions               • In his 2nd game, Ichiro only got
1 hit (in his 2nd try), no multi-hit
game.
• Keep a tally as you repeat this
(by just continually pressing
enter).
Multi-Hit Game:            IIIIIIIII
No Multi-Hit Game:         IIIIIIIIIII
Steps to a Simulation
#1 State the problem or   • Using our 20
question                  repetitions, you have
#2 State the                an estimate of the
assumptions               true chance of Ichiro
#3 Assign digits to         having a multi-hit
represent outcomes        game.
#4 Simulate many          • In my simulation, his
repetitions               chance was 9/20 or
45%.
#5 State conclusions
Simulations
• This concludes this presentation.

```
DOCUMENT INFO
Shared By:
Categories:
Stats:
 views: 12 posted: 12/27/2010 language: English pages: 24
How are you planning on using Docstoc?