Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
Drexel University or The Math Forum.
|
|
|
|
Re: coin toss
Posted:
Sep 7, 2005 11:58 PM
|
|
Fakename wrote: : If you toss 100 coins, what's the probability of getting 5, : either heads or tails, in a row? 6 in a row? : How do you figure it out?
You can make a simulation.
Create a list of 100 tosses:
[1 1 0 0 1 0 0 1 0 1 1 1 1 0 1 1 0 0 0 1 1 1 1 1 1 1 0 1 1 1 0 1 0 1 1 0 0 1 0 1 0 1 1 1 0 0 0 0 0 1 1 1 0 0 0 0 0 1 1 0 0 0 1 1 0 1 0 1 0 0 1 1 1 0 0 1 1 0 0 1 1 0 0 1 0 1 0 1 1 0 0 1 1 1 1 1 0 1 1 1]
group them:
[[1 1] [0 0] [1] [0 0] [1] [0] [1 1 1 1] [0] [1 1] [0 0 0] [1 1 1 1 1 1 1] [0] [1 1 1] [0] [1] [0] [1 1] [0 0] [1] [0] [1] [0] [1 1 1] [0 0 0 0 0] [1 1 1] [0 0 0 0 0] [1 1] [0 0 0] [1 1] [0] [1] [0] [1] [0 0] [1 1 1] [0 0] [1 1] [0 0] [1 1] [0 0] [1] [0] [1] [0] [1 1] [0 0] [1 1 1 1 1] [0] [1 1 1]]
count the members of each group:
[2 2 1 2 1 1 4 1 2 3 7 1 3 1 1 1 2 2 1 1 1 1 3 5 3 5 2 3 2 1 1 1 1 2 3 2 2 2 2 2 1 1 1 1 2 2 5 1 3]
find the maximum of those:
7
is that number greater than or equal to 5 (if 5 is what you want)
1
(1 means true, 0 means false)
Create a list of many such experiments (here I show 100 if them):
[1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1]
find the average
0.99
If you try with 1000 experiments instead of just a 100 you'll get values like:
show simul 5 0.975
show simul 6 0.84
show simul 7 0.548
show simul 8 0.3
show simul 9 0.15
show simul 10 0.081
Daniel
-- submissions: post to k12.ed.math or e-mail to k12math@k12groups.org private e-mail to the k12.ed.math moderator: kem-moderator@k12groups.org newsgroup website: http://www.thinkspot.net/k12math/ newsgroup charter: http://www.thinkspot.net/k12math/charter.html
|
|
|
|