Re: Using The Random Function to predict Things
- To: mathgroup at smc.vnet.net
- Subject: [mg62972] Re: Using The Random Function to predict Things
- From: "Jens-Peer Kuska" <kuska at informatik.uni-leipzig.de>
- Date: Fri, 9 Dec 2005 06:19:41 -0500 (EST)
- Organization: Uni Leipzig
- References: <dnbn04$5qv$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Hi, lst = Table[Random[Integer], {5000000}]; threes = Count[ll = Apply[Plus, Partition[lst, 3, 1], {1}], 3]; and N[threes/Length[ll]] gives you the probability for three 1 in turn. Regards Jens "mathuser" <fieryashish at gmail.com> schrieb im Newsbeitrag news:dnbn04$5qv$1 at smc.vnet.net... | Hi there friends... | I used this line of code "typicalList = Table[Random[Integer], {50}]" and got this result... | | {1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, \ | 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 1} | | By generating a few more of these random lists, I'm to predict a similiar situation: such as how long i would expect to wait for 3 heads in a coin tossing competition... | | any suggestion or help as to what code i could use to do this? | | thanks a lot guys |