Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Parenting > K12 Ed Math > Re: coin toss
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 15 of 20 Topic 1177 of 1195
Post > Topic >>

Re: coin toss

by "BlankMondragon" <blankmondragon@[EMAIL PROTECTED] > Sep 9, 2005 at 05:38 AM

On 8 Sep 2005 at 6:36, Robert Morewood wrote:

> BlankMondragon (blankmondragon@[EMAIL PROTECTED]
) wrote about FakeName's query:
> : : 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.
> :
> < intermediate results snipped >
> :
> : show simul 5
> : 0.975
> :
> : show simul 6
> : 0.84
>
> Would you care to share some of your code?  Did you do that in LISP?

It's Logo. MSWLogo with LogoFE (Logo Functional Extensions).
LogoFE is in Spanish.

make "many.throws impon "random clona: 100 2

show :many.throws
[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]

show disgrega duplica :many.throws
[[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]]

show impon "count disgrega duplica :many.throws
[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]

show max impon "count disgrega duplica :many.throws
7

show esmenor: 4 max impon "count disgrega duplica :many.throws
1

make "many.experiments impon [esmenor: 4 max impon "count disgrega
duplica impon "random] clona: 100 clona: 100 2

show :many.experiments
[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]

show media :many.experiments
0.99

funciona "simul [concreta [media impon [esmenor: dec $X max impon
"count disgrega duplica impon "random] clona: 1000 clona: 100 2]]

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
http://mondragon.angeltowns.net/logofe/

PS. This page is about a simulation of the Birthday paradox:
http://mondragon.angeltowns.net/paradiso/Problema***pleanos.html

-- 
submissions: post to k12.ed.math or e-mail to k12math@[EMAIL PROTECTED]
 e-mail to the k12.ed.math moderator: kem-moderator@[EMAIL PROTECTED]
 website: http://www.thinkspot.net/k12math/
newsgroup charter: http://www.thinkspot.net/k12math/charter.html
 




 20 Posts in Topic:
coin toss
"Fakename" <  2005-09-04 19:27:41 
Re: coin toss
"Fakename" <  2005-09-04 19:52:56 
Re: coin toss
Dave Chamberlain <dave  2005-09-05 06:30:19 
Re: coin toss
"Fakename" <  2005-09-05 17:34:00 
Re: coin toss
Jim Spriggs <jim.sprig  2005-09-05 21:56:01 
Re: coin toss
Duane Bozarth <dpbozar  2005-09-06 01:15:12 
Re: coin toss
Robert Morewood <see.s  2005-09-06 16:54:58 
Re: coin toss
Dave Chamberlain <dave  2005-09-07 00:00:43 
Re: coin toss
Kevin Karplus <karplus  2005-09-05 21:56:02 
Re: coin toss
"Fakename" <  2005-09-06 01:15:13 
Re: coin toss
"Fakename" <  2005-09-06 01:15:15 
Re: coin toss
Duane Bozarth <dpbozar  2005-09-08 03:58:28 
Re: coin toss
"BlankMondragon"  2005-09-08 03:58:29 
Re: coin toss
Robert Morewood <see.s  2005-09-08 16:23:59 
Re: coin toss
"BlankMondragon"  2005-09-09 05:38:10 
Re: coin toss
Dave Chamberlain <dave  2005-09-09 15:11:12 
Re: coin toss
Duane Bozarth <dpbozar  2005-09-09 18:50:19 
Re: coin toss
"BlankMondragon"  2005-09-13 22:13:22 
Re: coin toss
Duane Bozarth <dpbozar  2005-09-13 23:49:29 
Re: coin toss
Dave Chamberlain <dave  2005-09-14 05:41:35 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Nov 21 13:17:46 CST 2008.