Jan 20, 2009

Given a random number generator that is supposed to behave like a random variable uniformly distributed over [0,1], what tests can you think of that w

Given a random number generator that is supposed to behave like a random variable uniformly distributed over [0,1], what tests can you think of that will measure (in some meaningful way) the randomness of its numbers generated? Do there exist some standard often-applied procedures for this purpose?
As I know to test the random number generator, we should make sure the distribution of generator should be uniform. So I will use a vector to contain the generated random numbers, and sort this vector, cut the vector into some segment, count the elements on each segment, if the counters are roughly close, we can assume the generator is uniform distribution.

No comments:

Post a Comment