Re: Question about RandomInteger
- To: mathgroup at smc.vnet.net
- Subject: [mg83168] Re: [mg83153] Question about RandomInteger
- From: "Thomas Dowling" <thomasgdowling at gmail.com>
- Date: Tue, 13 Nov 2007 06:59:54 -0500 (EST)
- References: <200711130838.DAA27746@smc.vnet.net>
Hello,
Use SeedRandom[ ] ?
SeedRandom[1256]; u =
RandomInteger[MultinomialDistribution[n, pdpd], 1]
and
SeedRandom[1245]; v =
RandomInteger[MultinomialDistribution[n, pdid], 1]
Tom Dowling
On Nov 13, 2007 8:38 AM, John <jwa0 at lehigh.edu> 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
>
>
>
- References:
- Question about RandomInteger
- From: John <jwa0@lehigh.edu>
- Question about RandomInteger