help-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fwd: [Help-gsl] random number distributions


From: John D Lamb
Subject: Re: Fwd: [Help-gsl] random number distributions
Date: Thu, 18 May 2006 19:59:51 +0100
User-agent: Mozilla Thunderbird 1.0.8 (X11/20060411)

Joseph Wakeling wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

John D Lamb wrote:
There is nothing to stop you using two random number generators, though
you probably only need one. If you use two random number generators with
the same seed and call them equally often then the results will be
strongly correlated. If you use just one they will be nearly
uncorrelated. So I use one unless there's a good reason to do otherwise.

Is there any means of selecting two seeds so as to guard against this,
or will any two different seeds do the job as well as can be?
There's nothing in GSL. In practice, this kind of problem ought to be unusual. The kind of place it might come up is where you regularly gernerate a pair of numbers, one from a uniform distribution, the other from an exponential. If you use separate gsl_rng objects for these but use the same seed for both, then you'll get highly correlated random variates. I would use a single gsl_rng but you could use two gsl_rng objects with different seeds as long as you weren't worried about nth order autocorrletaion effects where n is probably very large. Using different methods of generating random numbers would also work.

JDL




reply via email to

[Prev in Thread] Current Thread [Next in Thread]