DIEHARD test results for Mersenne Twister (MT) version 4.1 output which was
90 million bits.  MT was initialized with the original MT authors' default
value.  DIEHARD.EXE dated 1995-12-29 was used.

Read the "NOTE:" immediately following the line of low line characters, as well
as DIEHARD.TXT (a plain text file) for how to interpret these results.

I checked MT's performance by searching DIEHARD's output, looking for p-values
too close to 0.0 or 1.0, by searching for "0.0000" and also "0.9999" (no
quotes).  I found none.  The p-values also appear to have a uniform distibution
between 0 and 1.

Ron Charlton
2010-09-17

DIEHARD.EXE output starts after the next line:
_______________________________________________________________________________
       NOTE: Most of the tests in DIEHARD return a p-value, which               
       should be uniform on [0,1) if the input file contains truly              
       independent random bits.   Those p-values are obtained by                
       p=F(X), where F is the assumed distribution of the sample                
       random variable X---often normal. But that assumed F is just             
       an asymptotic approximation, for which the fit will be worst             
       in the tails. Thus you should not be surprised with                      
       occasional p-values near 0 or 1, such as .0012 or .9983.                 
       When a bit stream really FAILS BIG, you will get p's of 0 or             
       1 to six or more places.  By all means, do not, as a                     
       Statistician might, think that a p < .025 or p> .975 means               
       that the RNG has "failed the test at the .05 level".  Such               
       p's happen among the hundreds that DIEHARD produces, even                
       with good RNG's.  So keep in mind that " p happens".                     
     :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::        
     ::            This is the BIRTHDAY SPACINGS TEST                 ::        
     :: Choose m birthdays in a year of n days.  List the spacings    ::        
     :: between the birthdays.  If j is the number of values that     ::        
     :: occur more than once in that list, then j is asymptotically   ::        
     :: Poisson distributed with mean m^3/(4n).  Experience shows n   ::        
     :: must be quite large, say n>=2^18, for comparing the results   ::        
     :: to the Poisson distribution with that mean.  This test uses   ::        
     :: n=2^24 and m=2^9,  so that the underlying distribution for j  ::        
     :: is taken to be Poisson with lambda=2^27/(2^26)=2.  A sample   ::        
     :: of 500 j's is taken, and a chi-square goodness of fit test    ::        
     :: provides a p value.  The first test uses bits 1-24 (counting  ::        
     :: from the left) from integers in the specified file.           ::        
     ::   Then the file is closed and reopened. Next, bits 2-25 are   ::        
     :: used to provide birthdays, then 3-26 and so on to bits 9-32.  ::        
     :: Each set of bits provides a p-value, and the nine p-values    ::        
     :: provide a sample for a KSTEST.                                ::        
     :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::        
 BIRTHDAY SPACINGS TEST, M= 512 N=2**24 LAMBDA=  2.0000
           Results for DiehardData.out
                   For a sample of size 500:     mean   
           DiehardData.out using bits  1 to 24   1.982
  duplicate       number       number 
  spacings       observed     expected
        0          73.       67.668
        1         129.      135.335
        2         144.      135.335
        3          85.       90.224
        4          41.       45.112
        5          17.       18.045
  6 to INF         11.        8.282
 Chisquare with  6 d.o.f. =     2.90 p-value=  .178875
  :::::::::::::::::::::::::::::::::::::::::
                   For a sample of size 500:     mean   
           DiehardData.out using bits  2 to 25   1.952
  duplicate       number       number 
  spacings       observed     expected
        0          61.       67.668
        1         149.      135.335
        2         143.      135.335
        3          81.       90.224
        4          42.       45.112
        5          16.       18.045
  6 to INF          8.        8.282
 Chisquare with  6 d.o.f. =     3.87 p-value=  .305689
  :::::::::::::::::::::::::::::::::::::::::
                   For a sample of size 500:     mean   
           DiehardData.out using bits  3 to 26   2.030
  duplicate       number       number 
  spacings       observed     expected
        0          63.       67.668
        1         127.      135.335
        2         146.      135.335
        3          91.       90.224
        4          46.       45.112
        5          23.       18.045
  6 to INF          4.        8.282
 Chisquare with  6 d.o.f. =     5.27 p-value=  .490875
  :::::::::::::::::::::::::::::::::::::::::
                   For a sample of size 500:     mean   
           DiehardData.out using bits  4 to 27   2.068
  duplicate       number       number 
  spacings       observed     expected
        0          64.       67.668
        1         115.      135.335
        2         167.      135.335
        3          75.       90.224
        4          45.       45.112
        5          24.       18.045
  6 to INF         10.        8.282
 Chisquare with  6 d.o.f. =    15.55 p-value=  .983640
  :::::::::::::::::::::::::::::::::::::::::
                   For a sample of size 500:     mean   
           DiehardData.out using bits  5 to 28   2.026
  duplicate       number       number 
  spacings       observed     expected
        0          56.       67.668
        1         142.      135.335
        2         139.      135.335
        3          92.       90.224
        4          47.       45.112
        5          17.       18.045
  6 to INF          7.        8.282
 Chisquare with  6 d.o.f. =     2.81 p-value=  .167971
  :::::::::::::::::::::::::::::::::::::::::
                   For a sample of size 500:     mean   
           DiehardData.out using bits  6 to 29   2.036
  duplicate       number       number 
  spacings       observed     expected
        0          76.       67.668
        1         123.      135.335
        2         127.      135.335
        3          93.       90.224
        4          51.       45.112
        5          22.       18.045
  6 to INF          8.        8.282
 Chisquare with  6 d.o.f. =     4.39 p-value=  .376519
  :::::::::::::::::::::::::::::::::::::::::
                   For a sample of size 500:     mean   
           DiehardData.out using bits  7 to 30   2.032
  duplicate       number       number 
  spacings       observed     expected
        0          59.       67.668
        1         133.      135.335
        2         144.      135.335
        3          97.       90.224
        4          41.       45.112
        5          18.       18.045
  6 to INF          8.        8.282
 Chisquare with  6 d.o.f. =     2.60 p-value=  .142742
  :::::::::::::::::::::::::::::::::::::::::
                   For a sample of size 500:     mean   
           DiehardData.out using bits  8 to 31   1.936
  duplicate       number       number 
  spacings       observed     expected
        0          65.       67.668
        1         141.      135.335
        2         140.      135.335
        3          93.       90.224
        4          44.       45.112
        5          12.       18.045
  6 to INF          5.        8.282
 Chisquare with  6 d.o.f. =     3.94 p-value=  .315374
  :::::::::::::::::::::::::::::::::::::::::
                   For a sample of size 500:     mean   
           DiehardData.out using bits  9 to 32   1.966
  duplicate       number       number 
  spacings       observed     expected
        0          69.       67.668
        1         145.      135.335
        2         120.      135.335
        3          92.       90.224
        4          56.       45.112
        5          11.       18.045
  6 to INF          7.        8.282
 Chisquare with  6 d.o.f. =     8.07 p-value=  .766675
  :::::::::::::::::::::::::::::::::::::::::
   The 9 p-values were
        .178875   .305689   .490875   .983640   .167971
        .376519   .142742   .315374   .766675
  A KSTEST for the 9 p-values yields  .603912

$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$

     :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::        
     ::            THE OVERLAPPING 5-PERMUTATION TEST                 ::        
     :: This is the OPERM5 test.  It looks at a sequence of one mill- ::        
     :: ion 32-bit random integers.  Each set of five consecutive     ::        
     :: integers can be in one of 120 states, for the 5! possible or- ::        
     :: derings of five numbers.  Thus the 5th, 6th, 7th,...numbers   ::        
     :: each provide a state. As many thousands of state transitions  ::        
     :: are observed,  cumulative counts are made of the number of    ::        
     :: occurences of each state.  Then the quadratic form in the     ::        
     :: weak inverse of the 120x120 covariance matrix yields a test   ::        
     :: equivalent to the likelihood ratio test that the 120 cell     ::        
     :: counts came from the specified (asymptotically) normal dis-   ::        
     :: tribution with the specified 120x120 covariance matrix (with  ::        
     :: rank 99).  This version uses 1,000,000 integers, twice.       ::        
     :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::        
           OPERM5 test for file DiehardData.out
     For a sample of 1,000,000 consecutive 5-tuples,
 chisquare for 99 degrees of freedom=112.289; p-value= .829564
           OPERM5 test for file DiehardData.out
     For a sample of 1,000,000 consecutive 5-tuples,
 chisquare for 99 degrees of freedom=101.263; p-value= .581988
     :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::        
     :: This is the BINARY RANK TEST for 31x31 matrices. The leftmost ::        
     :: 31 bits of 31 random integers from the test sequence are used ::        
     :: to form a 31x31 binary matrix over the field {0,1}. The rank  ::        
     :: is determined. That rank can be from 0 to 31, but ranks< 28   ::        
     :: are rare, and their counts are pooled with those for rank 28. ::        
     :: Ranks are found for 40,000 such random matrices and a chisqua-::        
     :: re test is performed on counts for ranks 31,30,29 and <=28.   ::        
     :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::        
    Binary rank test for DiehardData.out
         Rank test for 31x31 binary matrices:
        rows from leftmost 31 bits of each 32-bit integer
      rank   observed  expected (o-e)^2/e  sum
        28       227     211.4  1.148427    1.148
        29      5167    5134.0   .211983    1.360
        30     23122   23103.0   .015549    1.376
        31     11484   11551.5   .394714    1.771
  chisquare= 1.771 for 3 d. of f.; p-value= .470312
--------------------------------------------------------------
     :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::        
     :: This is the BINARY RANK TEST for 32x32 matrices. A random 32x ::        
     :: 32 binary matrix is formed, each row a 32-bit random integer. ::        
     :: The rank is determined. That rank can be from 0 to 32, ranks  ::        
     :: less than 29 are rare, and their counts are pooled with those ::        
     :: for rank 29.  Ranks are found for 40,000 such random matrices ::        
     :: and a chisquare test is performed on counts for ranks  32,31, ::        
     :: 30 and <=29.                                                  ::        
     :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::        
    Binary rank test for DiehardData.out
         Rank test for 32x32 binary matrices:
        rows from leftmost 32 bits of each 32-bit integer
      rank   observed  expected (o-e)^2/e  sum
        29       213     211.4   .011838     .012
        30      4987    5134.0  4.209578    4.221
        31     23156   23103.0   .121371    4.343
        32     11644   11551.5   .740312    5.083
  chisquare= 5.083 for 3 d. of f.; p-value= .846268
--------------------------------------------------------------

$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$

     :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::        
     :: This is the BINARY RANK TEST for 6x8 matrices.  From each of  ::        
     :: six random 32-bit integers from the generator under test, a   ::        
     :: specified byte is chosen, and the resulting six bytes form a  ::        
     :: 6x8 binary matrix whose rank is determined.  That rank can be ::        
     :: from 0 to 6, but ranks 0,1,2,3 are rare; their counts are     ::        
     :: pooled with those for rank 4. Ranks are found for 100,000     ::        
     :: random matrices, and a chi-square test is performed on        ::        
     :: counts for ranks 6,5 and <=4.                                 ::        
     :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::        
         Binary Rank Test for DiehardData.out
        Rank of a 6x8 binary matrix,
     rows formed from eight bits of the RNG DiehardData.out
     b-rank test for bits  1 to  8
                     OBSERVED   EXPECTED     (O-E)^2/E      SUM
          r<=4          978       944.3       1.203       1.203
          r =5        21866     21743.9        .686       1.888
          r =6        77156     77311.8        .314       2.202
                        p=1-exp(-SUM/2)= .66750
        Rank of a 6x8 binary matrix,
     rows formed from eight bits of the RNG DiehardData.out
     b-rank test for bits  2 to  9
                     OBSERVED   EXPECTED     (O-E)^2/E      SUM
          r<=4          941       944.3        .012        .012
          r =5        21827     21743.9        .318        .329
          r =6        77232     77311.8        .082        .412
                        p=1-exp(-SUM/2)= .18597
        Rank of a 6x8 binary matrix,
     rows formed from eight bits of the RNG DiehardData.out
     b-rank test for bits  3 to 10
                     OBSERVED   EXPECTED     (O-E)^2/E      SUM
          r<=4          913       944.3       1.038       1.038
          r =5        22040     21743.9       4.032       5.070
          r =6        77047     77311.8        .907       5.977
                        p=1-exp(-SUM/2)= .94963
        Rank of a 6x8 binary matrix,
     rows formed from eight bits of the RNG DiehardData.out
     b-rank test for bits  4 to 11
                     OBSERVED   EXPECTED     (O-E)^2/E      SUM
          r<=4          936       944.3        .073        .073
          r =5        21855     21743.9        .568        .641
          r =6        77209     77311.8        .137        .777
                        p=1-exp(-SUM/2)= .32204
        Rank of a 6x8 binary matrix,
     rows formed from eight bits of the RNG DiehardData.out
     b-rank test for bits  5 to 12
                     OBSERVED   EXPECTED     (O-E)^2/E      SUM
          r<=4          968       944.3        .595        .595
          r =5        21808     21743.9        .189        .784
          r =6        77224     77311.8        .100        .883
                        p=1-exp(-SUM/2)= .35707
        Rank of a 6x8 binary matrix,
     rows formed from eight bits of the RNG DiehardData.out
     b-rank test for bits  6 to 13
                     OBSERVED   EXPECTED     (O-E)^2/E      SUM
          r<=4          965       944.3        .454        .454
          r =5        21885     21743.9        .916       1.369
          r =6        77150     77311.8        .339       1.708
                        p=1-exp(-SUM/2)= .57428
        Rank of a 6x8 binary matrix,
     rows formed from eight bits of the RNG DiehardData.out
     b-rank test for bits  7 to 14
                     OBSERVED   EXPECTED     (O-E)^2/E      SUM
          r<=4          945       944.3        .001        .001
          r =5        21565     21743.9       1.472       1.472
          r =6        77490     77311.8        .411       1.883
                        p=1-exp(-SUM/2)= .60999
        Rank of a 6x8 binary matrix,
     rows formed from eight bits of the RNG DiehardData.out
     b-rank test for bits  8 to 15
                     OBSERVED   EXPECTED     (O-E)^2/E      SUM
          r<=4          922       944.3        .527        .527
          r =5        21820     21743.9        .266        .793
          r =6        77258     77311.8        .037        .830
                        p=1-exp(-SUM/2)= .33981
        Rank of a 6x8 binary matrix,
     rows formed from eight bits of the RNG DiehardData.out
     b-rank test for bits  9 to 16
                     OBSERVED   EXPECTED     (O-E)^2/E      SUM
          r<=4          955       944.3        .121        .121
          r =5        21720     21743.9        .026        .147
          r =6        77325     77311.8        .002        .150
                        p=1-exp(-SUM/2)= .07213
        Rank of a 6x8 binary matrix,
     rows formed from eight bits of the RNG DiehardData.out
     b-rank test for bits 10 to 17
                     OBSERVED   EXPECTED     (O-E)^2/E      SUM
          r<=4          930       944.3        .217        .217
          r =5        21760     21743.9        .012        .229
          r =6        77310     77311.8        .000        .229
                        p=1-exp(-SUM/2)= .10799
        Rank of a 6x8 binary matrix,
     rows formed from eight bits of the RNG DiehardData.out
     b-rank test for bits 11 to 18
                     OBSERVED   EXPECTED     (O-E)^2/E      SUM
          r<=4          925       944.3        .395        .395
          r =5        21749     21743.9        .001        .396
          r =6        77326     77311.8        .003        .398
                        p=1-exp(-SUM/2)= .18058
        Rank of a 6x8 binary matrix,
     rows formed from eight bits of the RNG DiehardData.out
     b-rank test for bits 12 to 19
                     OBSERVED   EXPECTED     (O-E)^2/E      SUM
          r<=4          952       944.3        .063        .063
          r =5        21798     21743.9        .135        .197
          r =6        77250     77311.8        .049        .247
                        p=1-exp(-SUM/2)= .11608
        Rank of a 6x8 binary matrix,
     rows formed from eight bits of the RNG DiehardData.out
     b-rank test for bits 13 to 20
                     OBSERVED   EXPECTED     (O-E)^2/E      SUM
          r<=4          962       944.3        .332        .332
          r =5        21665     21743.9        .286        .618
          r =6        77373     77311.8        .048        .666
                        p=1-exp(-SUM/2)= .28339
        Rank of a 6x8 binary matrix,
     rows formed from eight bits of the RNG DiehardData.out
     b-rank test for bits 14 to 21
                     OBSERVED   EXPECTED     (O-E)^2/E      SUM
          r<=4          948       944.3        .014        .014
          r =5        21943     21743.9       1.823       1.838
          r =6        77109     77311.8        .532       2.370
                        p=1-exp(-SUM/2)= .69419
        Rank of a 6x8 binary matrix,
     rows formed from eight bits of the RNG DiehardData.out
     b-rank test for bits 15 to 22
                     OBSERVED   EXPECTED     (O-E)^2/E      SUM
          r<=4          966       944.3        .499        .499
          r =5        21764     21743.9        .019        .517
          r =6        77270     77311.8        .023        .540
                        p=1-exp(-SUM/2)= .23654
        Rank of a 6x8 binary matrix,
     rows formed from eight bits of the RNG DiehardData.out
     b-rank test for bits 16 to 23
                     OBSERVED   EXPECTED     (O-E)^2/E      SUM
          r<=4          954       944.3        .100        .100
          r =5        21669     21743.9        .258        .358
          r =6        77377     77311.8        .055        .413
                        p=1-exp(-SUM/2)= .18641
        Rank of a 6x8 binary matrix,
     rows formed from eight bits of the RNG DiehardData.out
     b-rank test for bits 17 to 24
                     OBSERVED   EXPECTED     (O-E)^2/E      SUM
          r<=4          933       944.3        .135        .135
          r =5        21933     21743.9       1.645       1.780
          r =6        77134     77311.8        .409       2.189
                        p=1-exp(-SUM/2)= .66524
        Rank of a 6x8 binary matrix,
     rows formed from eight bits of the RNG DiehardData.out
     b-rank test for bits 18 to 25
                     OBSERVED   EXPECTED     (O-E)^2/E      SUM
          r<=4          941       944.3        .012        .012
          r =5        21858     21743.9        .599        .610
          r =6        77201     77311.8        .159        .769
                        p=1-exp(-SUM/2)= .31924
        Rank of a 6x8 binary matrix,
     rows formed from eight bits of the RNG DiehardData.out
     b-rank test for bits 19 to 26
                     OBSERVED   EXPECTED     (O-E)^2/E      SUM
          r<=4          998       944.3       3.054       3.054
          r =5        21595     21743.9       1.020       4.073
          r =6        77407     77311.8        .117       4.191
                        p=1-exp(-SUM/2)= .87696
        Rank of a 6x8 binary matrix,
     rows formed from eight bits of the RNG DiehardData.out
     b-rank test for bits 20 to 27
                     OBSERVED   EXPECTED     (O-E)^2/E      SUM
          r<=4          928       944.3        .281        .281
          r =5        21535     21743.9       2.007       2.288
          r =6        77537     77311.8        .656       2.944
                        p=1-exp(-SUM/2)= .77057
        Rank of a 6x8 binary matrix,
     rows formed from eight bits of the RNG DiehardData.out
     b-rank test for bits 21 to 28
                     OBSERVED   EXPECTED     (O-E)^2/E      SUM
          r<=4          891       944.3       3.009       3.009
          r =5        21559     21743.9       1.572       4.581
          r =6        77550     77311.8        .734       5.315
                        p=1-exp(-SUM/2)= .92987
        Rank of a 6x8 binary matrix,
     rows formed from eight bits of the RNG DiehardData.out
     b-rank test for bits 22 to 29
                     OBSERVED   EXPECTED     (O-E)^2/E      SUM
          r<=4          900       944.3       2.078       2.078
          r =5        21644     21743.9        .459       2.537
          r =6        77456     77311.8        .269       2.806
                        p=1-exp(-SUM/2)= .75418
        Rank of a 6x8 binary matrix,
     rows formed from eight bits of the RNG DiehardData.out
     b-rank test for bits 23 to 30
                     OBSERVED   EXPECTED     (O-E)^2/E      SUM
          r<=4          955       944.3        .121        .121
          r =5        21587     21743.9       1.132       1.253
          r =6        77458     77311.8        .276       1.530
                        p=1-exp(-SUM/2)= .53463
        Rank of a 6x8 binary matrix,
     rows formed from eight bits of the RNG DiehardData.out
     b-rank test for bits 24 to 31
                     OBSERVED   EXPECTED     (O-E)^2/E      SUM
          r<=4          899       944.3       2.173       2.173
          r =5        21810     21743.9        .201       2.374
          r =6        77291     77311.8        .006       2.380
                        p=1-exp(-SUM/2)= .69575
        Rank of a 6x8 binary matrix,
     rows formed from eight bits of the RNG DiehardData.out
     b-rank test for bits 25 to 32
                     OBSERVED   EXPECTED     (O-E)^2/E      SUM
          r<=4          944       944.3        .000        .000
          r =5        21615     21743.9        .764        .764
          r =6        77441     77311.8        .216        .980
                        p=1-exp(-SUM/2)= .38741
   TEST SUMMARY, 25 tests on 100,000 random 6x8 matrices
 These should be 25 uniform [0,1] random variables:
     .667496     .185965     .949630     .322042     .357070
     .574284     .609989     .339812     .072135     .107989
     .180579     .116079     .283395     .694186     .236541
     .186410     .665245     .319236     .876961     .770572
     .929869     .754177     .534628     .695746     .387414
   brank test summary for DiehardData.out
       The KS test for those 25 supposed UNI's yields
                    KS p-value= .198600

$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$

     :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::        
     ::                   THE BITSTREAM TEST                          ::        
     :: The file under test is viewed as a stream of bits. Call them  ::        
     :: b1,b2,... .  Consider an alphabet with two "letters", 0 and 1 ::        
     :: and think of the stream of bits as a succession of 20-letter  ::        
     :: "words", overlapping.  Thus the first word is b1b2...b20, the ::        
     :: second is b2b3...b21, and so on.  The bitstream test counts   ::        
     :: the number of missing 20-letter (20-bit) words in a string of ::        
     :: 2^21 overlapping 20-letter words.  There are 2^20 possible 20 ::        
     :: letter words.  For a truly random string of 2^21+19 bits, the ::        
     :: number of missing words j should be (very close to) normally  ::        
     :: distributed with mean 141,909 and sigma 428.  Thus            ::        
     ::  (j-141909)/428 should be a standard normal variate (z score) ::        
     :: that leads to a uniform [0,1) p value.  The test is repeated  ::        
     :: twenty times.                                                 ::        
     :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::        
 THE OVERLAPPING 20-tuples BITSTREAM  TEST, 20 BITS PER WORD, N words
   This test uses N=2^21 and samples the bitstream 20 times.
  No. missing words should average  141909. with sigma=428.
---------------------------------------------------------
 tst no  1:  141929 missing words,     .05 sigmas from mean, p-value= .51833
 tst no  2:  141933 missing words,     .06 sigmas from mean, p-value= .52205
 tst no  3:  141538 missing words,    -.87 sigmas from mean, p-value= .19281
 tst no  4:  142372 missing words,    1.08 sigmas from mean, p-value= .86015
 tst no  5:  141475 missing words,   -1.01 sigmas from mean, p-value= .15510
 tst no  6:  142171 missing words,     .61 sigmas from mean, p-value= .72953
 tst no  7:  142472 missing words,    1.31 sigmas from mean, p-value= .90569
 tst no  8:  141707 missing words,    -.47 sigmas from mean, p-value= .31820
 tst no  9:  141737 missing words,    -.40 sigmas from mean, p-value= .34361
 tst no 10:  141850 missing words,    -.14 sigmas from mean, p-value= .44488
 tst no 11:  141728 missing words,    -.42 sigmas from mean, p-value= .33591
 tst no 12:  141125 missing words,   -1.83 sigmas from mean, p-value= .03344
 tst no 13:  141611 missing words,    -.70 sigmas from mean, p-value= .24289
 tst no 14:  142270 missing words,     .84 sigmas from mean, p-value= .80030
 tst no 15:  142320 missing words,     .96 sigmas from mean, p-value= .83135
 tst no 16:  142305 missing words,     .92 sigmas from mean, p-value= .82238
 tst no 17:  141970 missing words,     .14 sigmas from mean, p-value= .55636
 tst no 18:  141757 missing words,    -.36 sigmas from mean, p-value= .36096
 tst no 19:  142744 missing words,    1.95 sigmas from mean, p-value= .97442
 tst no 20:  142363 missing words,    1.06 sigmas from mean, p-value= .85542

$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$

     :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::        
     ::             The tests OPSO, OQSO and DNA                      ::        
     ::         OPSO means Overlapping-Pairs-Sparse-Occupancy         ::        
     :: The OPSO test considers 2-letter words from an alphabet of    ::        
     :: 1024 letters.  Each letter is determined by a specified ten   ::        
     :: bits from a 32-bit integer in the sequence to be tested. OPSO ::        
     :: generates  2^21 (overlapping) 2-letter words  (from 2^21+1    ::        
     :: "keystrokes")  and counts the number of missing words---that  ::        
     :: is 2-letter words which do not appear in the entire sequence. ::        
     :: That count should be very close to normally distributed with  ::        
     :: mean 141,909, sigma 290. Thus (missingwrds-141909)/290 should ::        
     :: be a standard normal variable. The OPSO test takes 32 bits at ::        
     :: a time from the test file and uses a designated set of ten    ::        
     :: consecutive bits. It then restarts the file for the next de-  ::        
     :: signated 10 bits, and so on.                                  ::        
     ::                                                               ::        
     ::     OQSO means Overlapping-Quadruples-Sparse-Occupancy        ::        
     ::   The test OQSO is similar, except that it considers 4-letter ::        
     :: words from an alphabet of 32 letters, each letter determined  ::        
     :: by a designated string of 5 consecutive bits from the test    ::        
     :: file, elements of which are assumed 32-bit random integers.   ::        
     :: The mean number of missing words in a sequence of 2^21 four-  ::        
     :: letter words,  (2^21+3 "keystrokes"), is again 141909, with   ::        
     :: sigma = 295.  The mean is based on theory; sigma comes from   ::        
     :: extensive simulation.                                         ::        
     ::                                                               ::        
     ::    The DNA test considers an alphabet of 4 letters::  C,G,A,T,::        
     :: determined by two designated bits in the sequence of random   ::        
     :: integers being tested.  It considers 10-letter words, so that ::        
     :: as in OPSO and OQSO, there are 2^20 possible words, and the   ::        
     :: mean number of missing words from a string of 2^21  (over-    ::        
     :: lapping)  10-letter  words (2^21+9 "keystrokes") is 141909.   ::        
     :: The standard deviation sigma=339 was determined as for OQSO   ::        
     :: by simulation.  (Sigma for OPSO, 290, is the true value (to   ::        
     :: three places), not determined by simulation.                  ::        
     :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::        
 OPSO test for generator DiehardData.out
  Output: No. missing words (mw), equiv normal variate (z), p-value (p)
                                                           mw     z     p
    OPSO for DiehardData.out using bits 23 to 32        142389  1.654  .9509
    OPSO for DiehardData.out using bits 22 to 31        142213  1.047  .8525
    OPSO for DiehardData.out using bits 21 to 30        141797  -.387  .3493
    OPSO for DiehardData.out using bits 20 to 29        141981   .247  .5976
    OPSO for DiehardData.out using bits 19 to 28        141769  -.484  .3142
    OPSO for DiehardData.out using bits 18 to 27        141719  -.656  .2558
    OPSO for DiehardData.out using bits 17 to 26        141637  -.939  .1738
    OPSO for DiehardData.out using bits 16 to 25        142507  2.061  .9803
    OPSO for DiehardData.out using bits 15 to 24        142404  1.706  .9560
    OPSO for DiehardData.out using bits 14 to 23        141858  -.177  .4298
    OPSO for DiehardData.out using bits 13 to 22        141802  -.370  .3557
    OPSO for DiehardData.out using bits 12 to 21        142251  1.178  .8806
    OPSO for DiehardData.out using bits 11 to 20        142606  2.402  .9919
    OPSO for DiehardData.out using bits 10 to 19        142473  1.944  .9740
    OPSO for DiehardData.out using bits  9 to 18        142146   .816  .7928
    OPSO for DiehardData.out using bits  8 to 17        142298  1.340  .9099
    OPSO for DiehardData.out using bits  7 to 16        142460  1.899  .9712
    OPSO for DiehardData.out using bits  6 to 15        142204  1.016  .8452
    OPSO for DiehardData.out using bits  5 to 14        141723  -.643  .2603
    OPSO for DiehardData.out using bits  4 to 13        142193   .978  .8360
    OPSO for DiehardData.out using bits  3 to 12        141489 -1.449  .0736
    OPSO for DiehardData.out using bits  2 to 11        141733  -.608  .2716
    OPSO for DiehardData.out using bits  1 to 10        141871  -.132  .4474
 OQSO test for generator DiehardData.out
  Output: No. missing words (mw), equiv normal variate (z), p-value (p)
                                                           mw     z     p
    OQSO for DiehardData.out using bits 28 to 32        141941   .107  .5427
    OQSO for DiehardData.out using bits 27 to 31        141550 -1.218  .1116
    OQSO for DiehardData.out using bits 26 to 30        142039   .440  .6699
    OQSO for DiehardData.out using bits 25 to 29        141492 -1.415  .0786
    OQSO for DiehardData.out using bits 24 to 28        141840  -.235  .4071
    OQSO for DiehardData.out using bits 23 to 27        142134   .762  .7769
    OQSO for DiehardData.out using bits 22 to 26        141401 -1.723  .0424
    OQSO for DiehardData.out using bits 21 to 25        141546 -1.232  .1090
    OQSO for DiehardData.out using bits 20 to 24        142082   .585  .7208
    OQSO for DiehardData.out using bits 19 to 23        141929   .067  .5266
    OQSO for DiehardData.out using bits 18 to 22        141704  -.696  .2432
    OQSO for DiehardData.out using bits 17 to 21        141873  -.123  .4510
    OQSO for DiehardData.out using bits 16 to 20        142472  1.907  .9718
    OQSO for DiehardData.out using bits 15 to 19        141782  -.432  .3330
    OQSO for DiehardData.out using bits 14 to 18        142150   .816  .7927
    OQSO for DiehardData.out using bits 13 to 17        142175   .901  .8161
    OQSO for DiehardData.out using bits 12 to 16        142060   .511  .6952
    OQSO for DiehardData.out using bits 11 to 15        141429 -1.628  .0517
    OQSO for DiehardData.out using bits 10 to 14        142099   .643  .7399
    OQSO for DiehardData.out using bits  9 to 13        142018   .368  .6437
    OQSO for DiehardData.out using bits  8 to 12        142120   .714  .7624
    OQSO for DiehardData.out using bits  7 to 11        142186   .938  .8258
    OQSO for DiehardData.out using bits  6 to 10        141715  -.659  .2550
    OQSO for DiehardData.out using bits  5 to  9        142189   .948  .8284
    OQSO for DiehardData.out using bits  4 to  8        141481 -1.452  .0733
    OQSO for DiehardData.out using bits  3 to  7        141365 -1.845  .0325
    OQSO for DiehardData.out using bits  2 to  6        142104   .660  .7453
    OQSO for DiehardData.out using bits  1 to  5        141993   .284  .6117
  DNA test for generator DiehardData.out
  Output: No. missing words (mw), equiv normal variate (z), p-value (p)
                                                           mw     z     p
     DNA for DiehardData.out using bits 31 to 32        141214 -2.051  .0201
     DNA for DiehardData.out using bits 30 to 31        142188   .822  .7945
     DNA for DiehardData.out using bits 29 to 30        142159   .736  .7693
     DNA for DiehardData.out using bits 28 to 29        142114   .604  .7270
     DNA for DiehardData.out using bits 27 to 28        142294  1.135  .8718
     DNA for DiehardData.out using bits 26 to 27        141715  -.573  .2832
     DNA for DiehardData.out using bits 25 to 26        142459  1.621  .9475
     DNA for DiehardData.out using bits 24 to 25        142440  1.565  .9413
     DNA for DiehardData.out using bits 23 to 24        141612  -.877  .1902
     DNA for DiehardData.out using bits 22 to 23        141808  -.299  .3825
     DNA for DiehardData.out using bits 21 to 22        141405 -1.488  .0684
     DNA for DiehardData.out using bits 20 to 21        142265  1.049  .8530
     DNA for DiehardData.out using bits 19 to 20        142468  1.648  .9503
     DNA for DiehardData.out using bits 18 to 19        142388  1.412  .9210
     DNA for DiehardData.out using bits 17 to 18        142132   .657  .7444
     DNA for DiehardData.out using bits 16 to 17        141902  -.022  .4914
     DNA for DiehardData.out using bits 15 to 16        141661  -.733  .2319
     DNA for DiehardData.out using bits 14 to 15        141925   .046  .5184
     DNA for DiehardData.out using bits 13 to 14        142123   .630  .7358
     DNA for DiehardData.out using bits 12 to 13        141548 -1.066  .1432
     DNA for DiehardData.out using bits 11 to 12        142050   .415  .6609
     DNA for DiehardData.out using bits 10 to 11        142055   .430  .6663
     DNA for DiehardData.out using bits  9 to 10        142154   .722  .7648
     DNA for DiehardData.out using bits  8 to  9        141262 -1.910  .0281
     DNA for DiehardData.out using bits  7 to  8        142357  1.321  .9067
     DNA for DiehardData.out using bits  6 to  7        141290 -1.827  .0339
     DNA for DiehardData.out using bits  5 to  6        141976   .197  .5780
     DNA for DiehardData.out using bits  4 to  5        142190   .828  .7961
     DNA for DiehardData.out using bits  3 to  4        141702  -.612  .2704
     DNA for DiehardData.out using bits  2 to  3        141840  -.205  .4190
     DNA for DiehardData.out using bits  1 to  2        142032   .362  .6413

$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$

     :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::        
     ::     This is the COUNT-THE-1's TEST on a stream of bytes.      ::        
     :: Consider the file under test as a stream of bytes (four per   ::        
     :: 32 bit integer).  Each byte can contain from 0 to 8 1's,      ::        
     :: with probabilities 1,8,28,56,70,56,28,8,1 over 256.  Now let  ::        
     :: the stream of bytes provide a string of overlapping  5-letter ::        
     :: words, each "letter" taking values A,B,C,D,E. The letters are ::        
     :: determined by the number of 1's in a byte::  0,1,or 2 yield A,::        
     :: 3 yields B, 4 yields C, 5 yields D and 6,7 or 8 yield E. Thus ::        
     :: we have a monkey at a typewriter hitting five keys with vari- ::        
     :: ous probabilities (37,56,70,56,37 over 256).  There are 5^5   ::        
     :: possible 5-letter words, and from a string of 256,000 (over-  ::        
     :: lapping) 5-letter words, counts are made on the frequencies   ::        
     :: for each word.   The quadratic form in the weak inverse of    ::        
     :: the covariance matrix of the cell counts provides a chisquare ::        
     :: test::  Q5-Q4, the difference of the naive Pearson sums of    ::        
     :: (OBS-EXP)^2/EXP on counts for 5- and 4-letter cell counts.    ::        
     :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::        
   Test results for DiehardData.out
 Chi-square with 5^5-5^4=2500 d.of f. for sample size:2560000
                               chisquare  equiv normal  p-value
  Results fo COUNT-THE-1's in successive bytes:
 byte stream for DiehardData.out  2491.22      -.124      .450614
 byte stream for DiehardData.out  2433.14      -.946      .172198

$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$

     :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::        
     ::     This is the COUNT-THE-1's TEST for specific bytes.        ::        
     :: Consider the file under test as a stream of 32-bit integers.  ::        
     :: From each integer, a specific byte is chosen , say the left-  ::        
     :: most::  bits 1 to 8. Each byte can contain from 0 to 8 1's,   ::        
     :: with probabilitie 1,8,28,56,70,56,28,8,1 over 256.  Now let   ::        
     :: the specified bytes from successive integers provide a string ::        
     :: of (overlapping) 5-letter words, each "letter" taking values  ::        
     :: A,B,C,D,E. The letters are determined  by the number of 1's,  ::        
     :: in that byte::  0,1,or 2 ---> A, 3 ---> B, 4 ---> C, 5 ---> D,::        
     :: and  6,7 or 8 ---> E.  Thus we have a monkey at a typewriter  ::        
     :: hitting five keys with with various probabilities::  37,56,70,::        
     :: 56,37 over 256. There are 5^5 possible 5-letter words, and    ::        
     :: from a string of 256,000 (overlapping) 5-letter words, counts ::        
     :: are made on the frequencies for each word. The quadratic form ::        
     :: in the weak inverse of the covariance matrix of the cell      ::        
     :: counts provides a chisquare test::  Q5-Q4, the difference of  ::        
     :: the naive Pearson  sums of (OBS-EXP)^2/EXP on counts for 5-   ::        
     :: and 4-letter cell counts.                                     ::        
     :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::        
 Chi-square with 5^5-5^4=2500 d.of f. for sample size: 256000
                      chisquare  equiv normal  p value
  Results for COUNT-THE-1's in specified bytes:
           bits  1 to  8  2545.00       .636      .737741
           bits  2 to  9  2541.31       .584      .720460
           bits  3 to 10  2675.86      2.487      .993558
           bits  4 to 11  2523.41       .331      .629723
           bits  5 to 12  2571.42      1.010      .843770
           bits  6 to 13  2493.37      -.094      .462655
           bits  7 to 14  2513.89       .196      .577865
           bits  8 to 15  2456.90      -.610      .271079
           bits  9 to 16  2611.96      1.583      .943330
           bits 10 to 17  2609.00      1.541      .938398
           bits 11 to 18  2606.41      1.505      .933822
           bits 12 to 19  2536.84       .521      .698795
           bits 13 to 20  2514.21       .201      .579645
           bits 14 to 21  2414.21     -1.213      .112527
           bits 15 to 22  2483.54      -.233      .407948
           bits 16 to 23  2356.61     -2.028      .021287
           bits 17 to 24  2573.81      1.044      .851730
           bits 18 to 25  2517.60       .249      .598256
           bits 19 to 26  2471.73      -.400      .344632
           bits 20 to 27  2533.64       .476      .682895
           bits 21 to 28  2473.42      -.376      .353470
           bits 22 to 29  2522.63       .320      .625535
           bits 23 to 30  2511.00       .156      .561826
           bits 24 to 31  2408.63     -1.292      .098143
           bits 25 to 32  2493.73      -.089      .464674

$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$

     :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::        
     ::               THIS IS A PARKING LOT TEST                      ::        
     :: In a square of side 100, randomly "park" a car---a circle of  ::        
     :: radius 1.   Then try to park a 2nd, a 3rd, and so on, each    ::        
     :: time parking "by ear".  That is, if an attempt to park a car  ::        
     :: causes a crash with one already parked, try again at a new    ::        
     :: random location. (To avoid path problems, consider parking    ::        
     :: helicopters rather than cars.)   Each attempt leads to either ::        
     :: a crash or a success, the latter followed by an increment to  ::        
     :: the list of cars already parked. If we plot n:  the number of ::        
     :: attempts, versus k::  the number successfully parked, we get a::        
     :: curve that should be similar to those provided by a perfect   ::        
     :: random number generator.  Theory for the behavior of such a   ::        
     :: random curve seems beyond reach, and as graphics displays are ::        
     :: not available for this battery of tests, a simple characteriz ::        
     :: ation of the random experiment is used: k, the number of cars ::        
     :: successfully parked after n=12,000 attempts. Simulation shows ::        
     :: that k should average 3523 with sigma 21.9 and is very close  ::        
     :: to normally distributed.  Thus (k-3523)/21.9 should be a st-  ::        
     :: andard normal variable, which, converted to a uniform varia-  ::        
     :: ble, provides input to a KSTEST based on a sample of 10.      ::        
     :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::        
           CDPARK: result of ten tests on file DiehardData.out
            Of 12,000 tries, the average no. of successes
                 should be 3523 with sigma=21.9
            Successes: 3549    z-score:  1.187 p-value: .882429
            Successes: 3490    z-score: -1.507 p-value: .065925
            Successes: 3573    z-score:  2.283 p-value: .988788
            Successes: 3501    z-score: -1.005 p-value: .157553
            Successes: 3526    z-score:   .137 p-value: .554479
            Successes: 3529    z-score:   .274 p-value: .607947
            Successes: 3534    z-score:   .502 p-value: .692266
            Successes: 3512    z-score:  -.502 p-value: .307734
            Successes: 3510    z-score:  -.594 p-value: .276387
            Successes: 3487    z-score: -1.644 p-value: .050105
 
           square size   avg. no.  parked   sample sigma
             100.            3521.100       25.401
            KSTEST for the above 10: p=  .192624

$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$

     :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::        
     ::               THE MINIMUM DISTANCE TEST                       ::        
     :: It does this 100 times::   choose n=8000 random points in a   ::        
     :: square of side 10000.  Find d, the minimum distance between   ::        
     :: the (n^2-n)/2 pairs of points.  If the points are truly inde- ::        
     :: pendent uniform, then d^2, the square of the minimum distance ::        
     :: should be (very close to) exponentially distributed with mean ::        
     :: .995 .  Thus 1-exp(-d^2/.995) should be uniform on [0,1) and  ::        
     :: a KSTEST on the resulting 100 values serves as a test of uni- ::        
     :: formity for random points in the square. Test numbers=0 mod 5 ::        
     :: are printed but the KSTEST is based on the full set of 100    ::        
     :: random choices of 8000 points in the 10000x10000 square.      ::        
     :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::        
               This is the MINIMUM DISTANCE test
              for random integers in the file DiehardData.out
     Sample no.    d^2     avg     equiv uni            
           5    1.2430    .5216     .713287
          10     .2714   1.1383     .238750
          15    2.8736   1.1598     .944316
          20    1.1715   1.1373     .691906
          25    1.0291    .9979     .644500
          30     .0164    .9365     .016342
          35    2.2194    .9176     .892535
          40     .1591    .9354     .147799
          45     .1053    .8671     .100397
          50     .6840    .8532     .497138
          55     .2823    .8459     .247014
          60     .1917    .8234     .175266
          65    1.7967    .8405     .835651
          70    2.5430    .9025     .922371
          75     .8601    .8993     .578715
          80     .0556    .8765     .054313
          85     .1939    .8710     .177080
          90     .0503    .8481     .049327
          95     .3419    .8445     .290814
         100     .2160    .8541     .195164
     MINIMUM DISTANCE TEST for DiehardData.out
          Result of KS test on 20 transformed mindist^2's:
                                  p-value= .900961

$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 

     :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::        
     ::              THE 3DSPHERES TEST                               ::        
     :: Choose  4000 random points in a cube of edge 1000.  At each   ::        
     :: point, center a sphere large enough to reach the next closest ::        
     :: point. Then the volume of the smallest such sphere is (very   ::        
     :: close to) exponentially distributed with mean 120pi/3.  Thus  ::        
     :: the radius cubed is exponential with mean 30. (The mean is    ::        
     :: obtained by extensive simulation).  The 3DSPHERES test gener- ::        
     :: ates 4000 such spheres 20 times.  Each min radius cubed leads ::        
     :: to a uniform variable by means of 1-exp(-r^3/30.), then a     ::        
     ::  KSTEST is done on the 20 p-values.                           ::        
     :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::        
               The 3DSPHERES test for file DiehardData.out
 sample no:  1     r^3=  10.324     p-value= .29116
 sample no:  2     r^3=  20.719     p-value= .49874
 sample no:  3     r^3=  19.945     p-value= .48564
 sample no:  4     r^3=  12.609     p-value= .34315
 sample no:  5     r^3=  10.656     p-value= .29896
 sample no:  6     r^3=  26.330     p-value= .58424
 sample no:  7     r^3=  66.183     p-value= .88987
 sample no:  8     r^3=  17.824     p-value= .44796
 sample no:  9     r^3=  24.510     p-value= .55824
 sample no: 10     r^3=  22.680     p-value= .53046
 sample no: 11     r^3=  57.116     p-value= .85101
 sample no: 12     r^3=  58.990     p-value= .86003
 sample no: 13     r^3=   5.683     p-value= .17256
 sample no: 14     r^3=  33.413     p-value= .67168
 sample no: 15     r^3=  16.571     p-value= .42441
 sample no: 16     r^3=  47.228     p-value= .79284
 sample no: 17     r^3=   6.328     p-value= .19016
 sample no: 18     r^3=  97.418     p-value= .96112
 sample no: 19     r^3= 100.881     p-value= .96536
 sample no: 20     r^3=   5.328     p-value= .16271
  A KS test is applied to those 20 p-values.
---------------------------------------------------------
       3DSPHERES test for file DiehardData.out      p-value= .422597
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$

     :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::        
     ::      This is the SQEEZE test                                  ::        
     ::  Random integers are floated to get uniforms on [0,1). Start- ::        
     ::  ing with k=2^31=2147483647, the test finds j, the number of  ::        
     ::  iterations necessary to reduce k to 1, using the reduction   ::        
     ::  k=ceiling(k*U), with U provided by floating integers from    ::        
     ::  the file being tested.  Such j's are found 100,000 times,    ::        
     ::  then counts for the number of times j was <=6,7,...,47,>=48  ::        
     ::  are used to provide a chi-square test for cell frequencies.  ::        
     :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::        
            RESULTS OF SQUEEZE TEST FOR DiehardData.out
         Table of standardized frequency counts
     ( (obs-exp)/sqrt(exp) )^2
        for j taking values <=6,7,8,...,47,>=48:
     -.1     -.3     -.1     -.3     -.5      .3
    -1.0     -.5     -.5     1.0      .8      .2
    -1.2      .0     1.4    -1.0      .9    -1.3
     1.4      .1     1.4    -1.2    -1.3      .6
      .4     1.3     -.5    -2.8    -1.4     1.0
      .2     -.2     1.9     -.2    -1.2     1.0
     -.9    -1.0     -.8    -1.3     -.6    -1.0
     -.1
           Chi-square with 42 degrees of freedom: 42.209
              z-score=   .023  p-value= .538056
______________________________________________________________

$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$

     :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::        
     ::             The  OVERLAPPING SUMS test                        ::        
     :: Integers are floated to get a sequence U(1),U(2),... of uni-  ::        
     :: form [0,1) variables.  Then overlapping sums,                 ::        
     ::   S(1)=U(1)+...+U(100), S2=U(2)+...+U(101),... are formed.    ::        
     :: The S's are virtually normal with a certain covariance mat-   ::        
     :: rix.  A linear transformation of the S's converts them to a   ::        
     :: sequence of independent standard normals, which are converted ::        
     :: to uniform variables for a KSTEST. The  p-values from ten     ::        
     :: KSTESTs are given still another KSTEST.                       ::        
     :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::        
                Test no.  1      p-value  .442348
                Test no.  2      p-value  .108886
                Test no.  3      p-value  .040134
                Test no.  4      p-value  .003092
                Test no.  5      p-value  .660272
                Test no.  6      p-value  .719868
                Test no.  7      p-value  .266695
                Test no.  8      p-value  .216108
                Test no.  9      p-value  .807309
                Test no. 10      p-value  .571880
   Results of the OSUM test for DiehardData.out
        KSTEST on the above 10 p-values:  .746159

$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$

     :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::        
     ::     This is the RUNS test.  It counts runs up, and runs down, ::        
     :: in a sequence of uniform [0,1) variables, obtained by float-  ::        
     :: ing the 32-bit integers in the specified file. This example   ::        
     :: shows how runs are counted:  .123,.357,.789,.425,.224,.416,.95::        
     :: contains an up-run of length 3, a down-run of length 2 and an ::        
     :: up-run of (at least) 2, depending on the next values.  The    ::        
     :: covariance matrices for the runs-up and runs-down are well    ::        
     :: known, leading to chisquare tests for quadratic forms in the  ::        
     :: weak inverses of the covariance matrices.  Runs are counted   ::        
     :: for sequences of length 10,000.  This is done ten times. Then ::        
     :: repeated.                                                     ::        
     :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::        
           The RUNS test for file DiehardData.out
     Up and down runs in a sample of 10000
_________________________________________________ 
                 Run test for DiehardData.out:
       runs up; ks test for 10 p's: .554295
     runs down; ks test for 10 p's: .603510
                 Run test for DiehardData.out:
       runs up; ks test for 10 p's: .584617
     runs down; ks test for 10 p's: .908364

$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$

     :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::        
     :: This is the CRAPS TEST. It plays 200,000 games of craps, finds::        
     :: the number of wins and the number of throws necessary to end  ::        
     :: each game.  The number of wins should be (very close to) a    ::        
     :: normal with mean 200000p and variance 200000p(1-p), with      ::        
     :: p=244/495.  Throws necessary to complete the game can vary    ::        
     :: from 1 to infinity, but counts for all>21 are lumped with 21. ::        
     :: A chi-square test is made on the no.-of-throws cell counts.   ::        
     :: Each 32-bit integer from the test file provides the value for ::        
     :: the throw of a die, by floating to [0,1), multiplying by 6    ::        
     :: and taking 1 plus the integer part of the result.             ::        
     :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::        
                Results of craps test for DiehardData.out
  No. of wins:  Observed Expected
                                97978    98585.86
                  97978= No. of wins, z-score=-2.719 pvalue= .00328
   Analysis of Throws-per-Game:
 Chisq=  20.53 for 20 degrees of freedom, p=  .57450
               Throws Observed Expected  Chisq     Sum
                  1    66580    66666.7    .113     .113
                  2    37526    37654.3    .437     .550
                  3    27133    26954.7   1.179    1.729
                  4    19468    19313.5   1.237    2.966
                  5    13844    13851.4    .004    2.970
                  6    10018     9943.5    .558    3.527
                  7     7033     7145.0   1.756    5.284
                  8     5197     5139.1    .653    5.936
                  9     3637     3699.9   1.068    7.005
                 10     2680     2666.3    .070    7.075
                 11     1928     1923.3    .011    7.086
                 12     1357     1388.7    .725    7.812
                 13     1022     1003.7    .333    8.145
                 14      731      726.1    .033    8.177
                 15      532      525.8    .072    8.250
                 16      329      381.2   7.135   15.385
                 17      260      276.5    .989   16.374
                 18      218      200.8   1.468   17.842
                 19      142      146.0    .109   17.951
                 20      105      106.2    .014   17.965
                 21      260      287.1   2.561   20.526
            SUMMARY  FOR DiehardData.out
                p-value for no. of wins: .003277
                p-value for throws/game: .574501

$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$

 Results of DIEHARD battery of tests sent to file DiehardData.txt
