[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Need Suggestions for Random Numbers
> Also, can anyone recommend a statistical test for randomness, or
> for detecting repeating patterns in a "random" file?
Try using consecutive calls to your random-number generator to
generate two-dimensional coordinate pairs, and plot them. That is,
you do something like:
for( i = 0; i < LOTS; ++i ) {
x[i] = rand();
y[i] = rand();
}
for( i = 0; i < LOTS; ++i ) {
plot_point( x[i], y[i] );
}
It's surprising how fast this will demolish many psuedorandom
generators (and how good the eye is at pulling patterns out of plots).
And as far as nominal sources of "white" noise, be careful to avoid
contamination from 60-cycle power-line noise and its harmonics. Do
a Fourier transform and look for peaks, for sure.
I'm sure that the pros know lots of tricks like this.
-- Jay "not a pro" Freeman