3
$\begingroup$

The figure below shows $2000$ points in $(x,y)$ coordinates that are supposed to be high quality pseudorandom numbers.

2000

However, when I zoom in on any area lots of points are lined up along line segments, and there are relatively large areas with no points. This is illustrated in the next figure where I drew red lines to show where some of them are arranged in a short line. I also drew ellipses where there are larger gaps.

Zoomed in on the above figure with non-random features indicated

Does this look like high quality pseudorandom numbers? What quatitative tests can be used to verify or disprove my hypothesis?

  • 8
    Random does not mean "uniform"; nor does it mean "does not contain any small runs" etc. In fact, in a truly random sample, you can expect a certain amount of "clumping" and a certain amount of "valleys". A truly uniform distribution is *not* random.2012-06-30
  • 5
    I would be more concerned about your generator if the distribution of points did not show such patterns...2012-06-30
  • 3
    [Random.org](http://www.random.org/analysis/) has a bit of statistical analysis on their **true** random number generator, and includes a comparison of their random bitmap generator and one which used a bad pseudorandom number generator. Your data doesn't appear to be anything near as bad as this. Bad pseudorandom number generators will often give global structure; local structure will appear even in truly random situations.2012-06-30
  • 0
    possible duplicate of [How to compare randomness of two sets of data?](http://math.stackexchange.com/questions/30996/how-to-compare-randomness-of-two-sets-of-data)2012-06-30
  • 1
    those points arent on a line2012-06-30
  • 0
    @Arthur Fischer: How to produce a random number? I mean, if I don't want to use the random() function of Maple, or any other program, for example. When you say 'Bad pseudorandom number generators' I understand that I could create a better program. Is that the case?2012-06-30
  • 0
    **True** random number generators generally have as their seed/source some sort of random physical phenomena. Random.org uses atmospheric noise, [HotBits](http://www.fourmilab.ch/hotbits/) uses radioactive decay; you could use coin flips to generate random bits, although it might take a while to generate a C/C++ double data type this way. When I said "bad pseudorandom number generator" I was really referring to the one that was compared to random.org on that page (the PHP rand() function under Windows). Better algorithms exist, and the one you used appears (visually at least) to be one.2012-06-30
  • 0
    @ArthurFischer: actually, there are no "true" random number generators, because "true" randomness is a mathematical abstraction. Devising an actual "true" random number generator is no more realistic than making a perfect ball out of lead. Of course, you can have more or less close approximation of the abstraction, but you cannot actually find abstract mathematical objects in the physical world (unless they lie somewhere within the fundaments of physics themselves, but let's not get into that mess -- whether they do or not we couldn't get there anyhow).2012-06-30
  • 0
    @ArthurFischer Please consider promoting your comments to an answer.2013-06-21

0 Answers 0