The numbers in the column to the right of each chart refer to the number of bits in the field being tested, and the numbers in the row at the bottom give the position of the most significant bit of each field. Green indicates that the results were "consistent" with the premise that random() produces a sequence of independent, uniformly distributed random numbers. Yellow and light blue results are marginal. Dark blue means that the generator NEVER FAILED the test (out of 1000 tries), whereas it should fail 5% of the time, on average. Orange and especially pink results are clearly unacceptable, while red means that the generator NEVER PASSED the test.
Consistent with the results of the pairs test, random() showed significant correlation among the low order bits. As expected, for an 8-byte state array, bit 0 always showed an interval of length 2, while for bit 1 the interval was always 1 or 3, with equal likelihood (see the explanation of the results from the pairs test for an explanation). Higher-indexed bits also revealed a great deal of structure under this test. For instance, in bit 4, only intervals 1, 2, 3, 4, and 6 occurred, and they had relative frequencies of 9, 3, 1, 2, and 1, respectively. If random() really produced uniformly distributed random variables, the relative frequencies would monotonically decline with increasing interval length.
Larger bit fields tended to fail for similar reasons: only certain intervals occurred, and the relative frequencies did not monotonically decline as the intervals got longer. For example, the 3-bit field consisting of bits 3, 2, and 1 showed intervals of either 1 and 15 or 7 and 9, in each case with equal frequencies for the two interval lengths.
Bits 12-15 are interesting. In the single-bit tests and for a state array of 8 bytes, bits 12, 13, and 14 always pass because they always produce the expected counts exactly. Bit 15, although it also always passes, appears to give a different set of observed counts for each see; regardless of the seed, however, the observed counts are always quite close to the expected counts.
For an explanation of the interval test, click here.
Click here for more results (larger state arrays).
Return to the testing home page.