MathGroup Archive 2007

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

Search the Archive

Re: Question about RandomInteger

Hi John,

I think you defined u and v below using := instead of =. This would 

explain the behaviour you observe. Written as below, there will be NO!! 


hope this helps, Daniel

John wrote:

> Needs["MultivariateStatistics`"]

> n=1000

> pdpd={1/6,1/6,1/6,1/6,1/6,1/6}

> pdid={1/7,1/5,1/6,1/6.1/6,33/210}

> u=RandomInteger[MultinomialDistribution[n,pdpd],1]

> v=RandomInteger[MultinomialDistribution[n,pdid],1]


> All of the above works.


> But u and v appear more than once in subsequent calculations, and

> RandomInteger reexecutes at each appearance. The reexecutions change

> the values of u and v, and that is not what I want to happen.


> Any advice will be appreciated.


> John



  • Prev by Date: Alas Alaska....
  • Next by Date: DelaunayTriangulation[] output
  • Previous by thread: Re: Question about RandomInteger
  • Next by thread: Re: Question about RandomInteger