[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: rand("state")
From: |
Mike Miller |
Subject: |
Re: rand("state") |
Date: |
Wed, 15 Feb 2006 21:09:40 -0600 (CST) |
On Wed, 15 Feb 2006, Mike Miller wrote:
On Wed, 15 Feb 2006, Paul Kienzle wrote:
You don't get any improvement in the randomness by using longer seeds.
That is interesting. The one thing I don't understand is why there is a
625-integer state if I get no improvement in randomness for using 625
integers for the seed instead of a single integer. I'm probably
confusing "state" and "seed." With a period of about 4.3*10^6001, I
would think that using a seed that is always less than 10^9 would be
allowing the user to access only a small minority of the random
sequences available.
I just did something else to test how this works. It seems to me that use
of a single 32-bit integer seed works and is fine for many applications.
Use of a single integer doesn't change the quality of the random numbers
produced and it is easier to deal with. However, the single integer seed
limits the number of possible pseudorandom starting sequences to 2^32.
Use of the full 624 32-bit integers (plus the position integer) allows for
all possible 2^19936 starting sequences.
If you will be producing many random replicates in a simulation study, it
is better to use the full 625-integer seed so that the probability of any
two replicates being identical is extremely small.
Do I have this right?
Mike
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------
- rand("state"), Mike Miller, 2006/02/15
- Re: rand("state"), Bill Denney, 2006/02/15
- Re: rand("state"), Mike Miller, 2006/02/15
- Re: rand("state"), Mike Miller, 2006/02/15
- Re: rand("state"), Paul Kienzle, 2006/02/15
- Re: rand("state"), Mike Miller, 2006/02/15
- Re: rand("state"),
Mike Miller <=
- Re: rand("state"), Francesco Potorti`, 2006/02/16
- Re: rand("state"), Paul Kienzle, 2006/02/16
- Re: rand("state"), Mike Miller, 2006/02/16
- Re: rand("state"), Paul Kienzle, 2006/02/16
- Re: rand("state"), Francesco Potorti`, 2006/02/16
- Re: rand("state"), Mike Miller, 2006/02/16
- Re: rand("state"), Francesco Potorti`, 2006/02/16
- Re: rand("state"), Mike Miller, 2006/02/16
- Re: rand("state"), Francesco Potorti`, 2006/02/16
- Re: rand("state"), Michael Creel, 2006/02/17