Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Determining the similarity between two random number generators

Suppose that I have two random number genertors RNG-A and RNG-B, such that:

  • They both produce random, non-infinite floating point numbers when called
  • I can call the generators repeatedly and generate as many random numbers as I like
  • The random numbers generated are independent and identically distributed (i.e. the output of the RNGs is independent of everything they have previously produced)
  • I can't guarantee anything else about the shape of the distribution

I would like to obtain a measure of how similar the two random distributions are, and ideally use this to determine if they appear to producing the same distribution.

What is is the best algorithm for doing this?

like image 857
mikera Avatar asked Oct 14 '22 21:10

mikera


1 Answers

I think you'll find your answers here.

Excerpts:

Testing Random Number Generators
Does observed data satisfies a particular distribution?
• Chi-square test
• Kolmogorov-Smirnov test
• Serial correlation test
• Two-level tests
• K-distributivity
• Serial test
• Spectral test
.....

Another section:

Serial Correlation Test
• Test if 2 random variables are dependent
—is their covariance non-zero?
– if so, dependent. converse not true.

HTH!

like image 156
Dr. belisarius Avatar answered Oct 18 '22 03:10

Dr. belisarius