3.3.2 EMPIRICAL TESTS 73 unpublished], is unlike the (Adult web hosting)

3.3.2 EMPIRICAL TESTS 73 unpublished], is unlike the others in that it was not developed before the advent of computers; it is specifically intended for computer use. The reader probably wonders, Why are there so many tests? It has been said that more computer time is spent testing random numbers than using them in applications! This is untrue, although it is possible to go overboard in testing. The need for making several tests has been amply documented. It has been recorded, for example, that some numbers generated by a variant of the middle- square method have passed the frequency test, gap test, and poker test, yet flunked the serial test. Linear congruential sequences with small multipliers have been known to pass many tests, yet fail on the run test because there are too few runs of length one. The maximum-of-t test has also been used to ferret out some bad generators that otherwise seemed to perform respectably. Perhaps the main reason for doing extensive testing on random number generators is that people misusing Mr. X s random number generator will hardly ever admit that their programs are at fault: they will blame the generator, until Mr. X can prove to them that his numbers are sufficiently random. On the other hand, if the source of random numbers is only for Mr. X s personal use, he might decide not to bother to test them, since the techniques recommended in this chapter have a high probability of being satisfactory. EXERCISES 1. [10] Why should the serial test described in part B be applied to (Yo, Yl), (Yz, Ys), . , (Ygnp2,Yzn–1) instead of to (Yo, Yl), (Yl, Yz), . . . , (Y,-,, Y,)? 2. [IO] State an appropriate way to generalize the serial test to triples, quadruples, etc., instead of pairs. b 3. [MX?] How many U s need to be examined in the gap test (Algorithm G) before n gaps have been found, on the average, assuming that the sequence is random? What is the standard deviation of this quantity? 4. [&?I Prove that the probabilities in (4) are correct for the gap test. 5. [Mz?] The classical gap test used by Kendall and Babington-Smith considers the numbers UO, U1, , UN-1 to be a cyclic sequence with UN+3 identified with U,. Here N is a fixed number of U s that are to be subjected to the test. If n of the numbers UO, , UN-~ fall into the range cr 5 U, < /3, there are n gaps in the cyclic sequence. Let 2, be the number of gaps of length r, for 0 5 r < t, and let Zt be the number of gaps of length 2 t; show that the quantity V = CoCVCt(Zr -np,) /np, should have the chi-square distribution with t degrees of freedom, in the limit as N goes to infinity, where p, is given in Eq. (4). 6. [40] (H. Geiringer.) A frequency count of the first 2000 decimal digits in the representation of e = 2.71828.. gave a x2 value of 1.06, indicating that the actual frequencies of the digits 0, 1, . , 9 are much too close to their expected values to be considered randomly distributed. (In fact, x2 > 1.15 with probability 99.9 percent.) The same test applied to the first 10,000 digits of e gives the reasonable value x2 = 8.61; but the fact that the first 2000 digits are so evenly distributed is still surprising. Does the same phenomenon occur in the representation of e to other bases? [See AMA4 72 (1965), 483-500.1

Leave a Reply