Re: Simulation
- To: mathgroup at smc.vnet.net
- Subject: [mg19379] Re: [mg19353] Simulation
- From: "Richard Finley" <rfinley at medicine.umsmed.edu>
- Date: Mon, 23 Aug 1999 13:57:03 -0400
- Sender: owner-wri-mathgroup at wolfram.com
Hi Roberto, This may be a little contrived but it is a simple way to do what you want: data = Table[NestList[# + 0.01*Sign[Random[Integer,{-1,4}]]&,5,1000]; This will give the results in the proportions you asked for....regards, RF >>> "Roberto Diego" <r-diego at develnet.es> 08/20/99 09:09PM >>> Hi there, I need help on how the expression: data=Table[NestList[#+0.01*Random[Integer,{-1,1}]&,5,1000]]; could be modified in order to get -1 with probability 1/6, 0 with p 4/6 and 1 with p 1/6 instead of 1/3,1/3,1/3 Thanks a lot Roberto Diego Sociedad de Bolsas