Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

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
| 



  • Prev by Date: Evaluate[] not needed in With[]
  • Next by Date: Re: General--tracing the solver
  • Previous by thread: Using The Random Function to predict Things
  • Next by thread: Re: Using The Random Function to predict Things