Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1999

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

Search the Archive

Re: Simulation

  • To: mathgroup at
  • Subject: [mg19379] Re: [mg19353] Simulation
  • From: "Richard Finley" <rfinley at>
  • Date: Mon, 23 Aug 1999 13:57:03 -0400
  • Sender: owner-wri-mathgroup at

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> 08/20/99 09:09PM >>>
Hi there,

I need help on how the expression:


could be modified in order to get -1 with probability 1/6, 0 with p 4/6 
1 with p 1/6 instead of 1/3,1/3,1/3

Thanks a lot

Roberto Diego
Sociedad de Bolsas

  • Prev by Date: Re: Simulation
  • Next by Date: Re: Simulation...Ooops
  • Previous by thread: Re: Simulation
  • Next by thread: Re: Simulation