Académique Documents
Professionnel Documents
Culture Documents
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
3
94.
90.224
4
37.
45.112
5
20.
18.045
6 to INF
9.
8.282
Chisquare with 6 d.o.f. =
2.03 p-value=
:::::::::::::::::::::::::::::::::::::::::
For a sample of size 500:
rng.32
using bits 5 to 28
duplicate
number
number
spacings
observed
expected
0
64.
67.668
1
135.
135.335
2
122.
135.335
3
103.
90.224
4
47.
45.112
5
23.
18.045
6 to INF
6.
8.282
Chisquare with 6 d.o.f. =
5.39 p-value=
:::::::::::::::::::::::::::::::::::::::::
For a sample of size 500:
rng.32
using bits 6 to 29
duplicate
number
number
spacings
observed
expected
0
70.
67.668
1
138.
135.335
2
137.
135.335
3
85.
90.224
4
50.
45.112
5
12.
18.045
6 to INF
8.
8.282
Chisquare with 6 d.o.f. =
3.02 p-value=
:::::::::::::::::::::::::::::::::::::::::
For a sample of size 500:
rng.32
using bits 7 to 30
duplicate
number
number
spacings
observed
expected
0
68.
67.668
1
147.
135.335
2
141.
135.335
3
70.
90.224
4
50.
45.112
5
19.
18.045
6 to INF
5.
8.282
Chisquare with 6 d.o.f. =
7.66 p-value=
:::::::::::::::::::::::::::::::::::::::::
For a sample of size 500:
rng.32
using bits 8 to 31
duplicate
number
number
spacings
observed
expected
0
68.
67.668
1
148.
135.335
2
139.
135.335
3
86.
90.224
4
41.
45.112
5
12.
18.045
6 to INF
6.
8.282
Chisquare with 6 d.o.f. =
4.51 p-value=
:::::::::::::::::::::::::::::::::::::::::
For a sample of size 500:
rng.32
using bits 9 to 32
duplicate
number
number
spacings
observed
expected
0
58.
67.668
1
132.
135.335
2
144.
135.335
3
85.
90.224
4
63.
45.112
5
12.
18.045
6 to INF
6.
8.282
Chisquare with 6 d.o.f. =
12.07 p-value=
:::::::::::::::::::::::::::::::::::::::::
The 9 p-values were
.524026
.204383
.473574
.083268
.193656
.735751
.392273
.939518
A KSTEST for the 9 p-values yields .147832
.083268
mean
2.054
.505320
mean
1.954
.193656
mean
1.932
.735751
mean
1.888
.392273
mean
2.048
.939518
.505320
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::
THE OVERLAPPING 5-PERMUTATION TEST
::
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
SUM
.002
.018
.023
SUM
.295
3.307
4.047
SUM
.145
.145
.147
SUM
.812
.822
.844
SUM
.135
.274
.331
SUM
.436
.492
.532
SUM
4.031
4.105
4.239
SUM
.546
4.940
6.364
SUM
.454
.507
.546
SUM
.171
1.679
2.165
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
SUM
.145
4.172
5.216
SUM
.112
1.824
2.358
SUM
1.505
1.771
1.939
SUM
7.242
8.866
9.009
SUM
2.511
2.828
2.843
SUM
.733
.736
.740
SUM
.056
.931
1.204
SUM
2.173
4.085
4.889
SUM
.008
.594
.751
SUM
3.477
3.824
4.093
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
tst
tst
tst
tst
no
no
no
no
17:
18:
19:
20:
141579
142721
143076
142746
missing
missing
missing
missing
words,
words,
words,
words,
-.77
1.90
2.73
1.95
sigmas
sigmas
sigmas
sigmas
from
from
from
from
mean,
mean,
mean,
mean,
p-value=
p-value=
p-value=
p-value=
.22012
.97105
.99679
.97470
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::
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 rng.32
Output: No. missing words (mw), equiv normal variate (z), p-value (p)
mw
z
p
OPSO for rng.32
using bits 23 to 32
141956
.161 .5639
OPSO for rng.32
using bits 22 to 31
141956
.161 .5639
OPSO for rng.32
using bits 21 to 30
141713 -.677 .2492
OPSO for rng.32
using bits 20 to 29
142168
.892 .8138
OPSO for rng.32
using bits 19 to 28
141916
.023 .5092
OPSO for rng.32
using bits 18 to 27
141966
.195 .5775
OPSO for rng.32
using bits 17 to 26
141588 -1.108 .1339
OPSO for rng.32
using bits 16 to 25
141697 -.732 .2320
OPSO for rng.32
using bits 15 to 24
142554 2.223 .9869
OPSO for rng.32
using bits 14 to 23
141656 -.874 .1912
OPSO for rng.32
using bits 13 to 22
141977
.233 .5923
OPSO for rng.32
using bits 12 to 21
141777 -.456 .3241
OPSO for rng.32
using bits 11 to 20
142268 1.237 .8919
OPSO for rng.32
using bits 10 to 19
141950
.140 .5558
OPSO for rng.32
using bits 9 to 18
142211 1.040 .8509
OPSO for rng.32
using bits 8 to 17
141512 -1.370 .0853
OPSO for rng.32
using bits 7 to 16
141846 -.218 .4136
OPSO for rng.32
using bits 6 to 15
141788 -.418 .3378
OPSO for rng.32
using bits 5 to 14
142063
.530 .7019
OPSO for rng.32
using bits 4 to 13
142018
.375 .6461
OPSO for rng.32
using bits 3 to 12
142225 1.089 .8618
OPSO for rng.32
using bits 2 to 11
142103
.668 .7479
OPSO for rng.32
using bits 1 to 10
142608 2.409 .9920
OQSO test for generator rng.32
Output: No. missing words (mw), equiv normal variate (z), p-value (p)
mw
z
p
OQSO for rng.32
using bits 28 to 32
141940
.104 .5414
OQSO for rng.32
using bits 27 to 31
141980
.240 .5947
OQSO for rng.32
using bits 26 to 30
141985
.257 .6012
OQSO for rng.32
using bits 25 to 29
142076
.565 .7140
OQSO for rng.32
using bits 24 to 28
141671 -.808 .2096
OQSO for rng.32
using bits 23 to 27
141694 -.730 .2327
OQSO for rng.32
using bits 22 to 26
142061
.514 .6964
OQSO for rng.32
using bits 21 to 25
141655 -.862 .1943
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
for
for
for
for
for
for
for
for
for
for
for
for
for
for
for
for
for
for
for
for
for
for
for
for
for
for
for
for
for
for
for
rng.32
rng.32
rng.32
rng.32
rng.32
rng.32
rng.32
rng.32
rng.32
rng.32
rng.32
rng.32
rng.32
rng.32
rng.32
rng.32
rng.32
rng.32
rng.32
rng.32
rng.32
rng.32
rng.32
rng.32
rng.32
rng.32
rng.32
rng.32
rng.32
rng.32
rng.32
using
using
using
using
using
using
using
using
using
using
using
using
using
using
using
using
using
using
using
using
using
using
using
using
using
using
using
using
using
using
using
bits
bits
bits
bits
bits
bits
bits
bits
bits
bits
bits
bits
bits
bits
bits
bits
bits
bits
bits
bits
bits
bits
bits
bits
bits
bits
bits
bits
bits
bits
bits
20
19
18
17
16
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
to
to
to
to
to
to
to
to
to
to
to
to
to
to
to
to
to
to
to
to
24
23
22
21
20
19
18
17
16
15
14
13
12
11
10
9
8
7
6
5
141639
142198
141923
141954
141512
141916
141575
141765
141723
141942
142272
141921
141979
141612
141501
142096
141937
141836
141776
141744
-.916
.979
.046
.151
-1.347
.023
-1.133
-.489
-.632
.111
1.229
.040
.236
-1.008
-1.384
.633
.094
-.249
-.452
-.560
.1797
.8361
.5185
.5602
.0890
.5090
.1285
.3123
.2638
.5441
.8905
.5158
.5934
.1568
.0832
.7366
.5374
.4018
.3256
.2876
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::
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 rng.32
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 rng.32
2581.57
1.154
.875652
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
2511.90
.168
.566796
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::
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 2543.54
.616
.730962
bits 2 to 9 2394.74
-1.489
.068299
bits 3 to 10 2572.75
1.029
.848216
bits 4 to 11 2514.84
.210
.583130
bits 5 to 12 2589.96
1.272
.898360
bits 6 to 13 2355.54
-2.043
.020531
bits 7 to 14 2441.75
-.824
.205014
bits 8 to 15 2535.97
.509
.694511
bits 9 to 16 2551.09
.723
.765020
bits 10 to 17 2363.09
-1.936
.026421
bits 11 to 18 2518.86
.267
.605181
bits 12 to 19 2485.76
-.201
.420217
bits 13 to 20 2515.30
.216
.585646
bits 14 to 21 2407.06
-1.314
.094358
bits 15 to 22 2426.05
-1.046
.147831
bits 16 to 23 2563.57
.899
.815683
bits 17 to 24 2475.94
-.340
.366804
bits 18 to 25 2466.11
-.479
.315864
bits 19 to 26 2514.20
.201
.579603
bits 20 to 27 2452.66
-.669
.251594
bits 21 to 28 2634.28
1.899
.971222
bits 22 to 29 2430.47
-.983
.162740
bits 23 to 30 2532.62
.461
.677734
bits 24 to 31 2525.65
.363
.641629
bits 25 to 32 2541.32
.584
.720496
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::
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 rng.32
Of 12,000 tries, the average no. of successes
should be 3523 with sigma=21.9
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
Successes:
Successes:
Successes:
Successes:
Successes:
Successes:
Successes:
Successes:
Successes:
Successes:
3534
3480
3518
3500
3540
3491
3511
3510
3506
3540
z-score:
.502 p-value: .692266
z-score: -1.963 p-value: .024796
z-score: -.228 p-value: .409702
z-score: -1.050 p-value: .146807
z-score:
.776 p-value: .781201
z-score: -1.461 p-value: .071982
z-score: -.548 p-value: .291865
z-score: -.594 p-value: .276387
z-score: -.776 p-value: .218799
z-score:
.776 p-value: .781201
square size
avg. no. parked
sample sigma
100.
3513.000
19.282
KSTEST for the above 10: p= .754720
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::
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 rng.32
Sample no.
d^2
avg
equiv uni
5
2.6399
1.0322
.929574
10
.1894
.7103
.173313
15
.2167
.8168
.195670
20
1.7202
.9084
.822515
25
.0505
.9032
.049472
30
.2419
.8864
.215781
35
.3905
.9212
.324624
40
3.4553
1.0062
.968967
45
.7277
.9756
.518728
50
.2264
1.0284
.203511
55
.0644
.9692
.062681
60
.3547
.9718
.299896
65
.3474
.9820
.294743
70
1.0588
1.0201
.654973
75
1.9523
1.0284
.859438
80
1.0461
1.0149
.650554
85
.5992
.9822
.452410
90
.3606
.9955
.303979
95
.1349
.9865
.126824
100
.7045
.9646
.507400
MINIMUM DISTANCE TEST for rng.32
Result of KS test on 20 transformed mindist^2's:
p-value= .066791
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::
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 rng.32
sample no: 1
r^3=
2.456
p-value= .07862
sample no: 2
r^3= 33.632
p-value= .67407
sample no: 3
r^3= 17.147
p-value= .43536
sample no: 4
r^3=
6.693
p-value= .19995
sample no: 5
r^3= 34.353
p-value= .68181
sample no: 6
r^3= 131.636
p-value= .98757
sample no: 7
r^3=
5.527
p-value= .16826
sample no: 8
r^3= 30.472
p-value= .63786
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
sample no: 9
r^3=
1.365
p-value= .04448
sample no: 10
r^3= 38.735
p-value= .72505
sample no: 11
r^3= 48.804
p-value= .80344
sample no: 12
r^3= 47.645
p-value= .79570
sample no: 13
r^3= 219.292
p-value= .99933
sample no: 14
r^3=
9.078
p-value= .26110
sample no: 15
r^3=
.896
p-value= .02941
sample no: 16
r^3= 32.395
p-value= .66035
sample no: 17
r^3=
4.243
p-value= .13190
sample no: 18
r^3= 43.663
p-value= .76670
sample no: 19
r^3=
9.466
p-value= .27060
sample no: 20
r^3= 101.247
p-value= .96578
A KS test is applied to those 20 p-values.
--------------------------------------------------------3DSPHERES test for file rng.32
p-value= .606348
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::
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 rng.32
Table of standardized frequency counts
( (obs-exp)/sqrt(exp) )^2
for j taking values <=6,7,8,...,47,>=48:
-.8
.5
-.1
.6
-.4
2.4
-.6
3.2
2.3
2.9
2.9
4.6
3.7
1.7
2.0
1.2
.9
.9
.4
-2.1
-2.6
-3.1
-1.6
-3.1
-1.8
-3.5
-3.5
-2.0
-3.8
-1.2
-2.5
-2.2
-2.9
-2.3
-2.3
-1.4
-.7
-.7
.9
-.7
-.6
.0
-1.1
Chi-square with 42 degrees of freedom:199.921
z-score= 17.231 p-value=1.000000
______________________________________________________________
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::
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 .479286
Test no. 2
p-value .511698
Test no. 3
p-value .369057
Test no. 4
p-value .756690
Test no. 5
p-value .879096
Test no. 6
p-value .716027
Test no. 7
p-value .790289
Test no. 8
p-value .173278
Test no. 9
p-value .186146
Test no. 10
p-value .896488
Results of the OSUM test for rng.32
KSTEST on the above 10 p-values: .360394
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::
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 ::
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944