Skip to content

Instantly share code, notes, and snippets.

@bloc97
Created December 30, 2017 23:04
Show Gist options
  • Save bloc97/9872123df13b7d4d7b9e31fb9419808e to your computer and use it in GitHub Desktop.
Save bloc97/9872123df13b7d4d7b9e31fb9419808e to your computer and use it in GitHub Desktop.
Diehard test log for Method 1
BIRTHDAY SPACINGS TEST, M= 512 N=2**24 LAMBDA= 2.0000
data.bin using bits 1 to 24 p-value= .241977
data.bin using bits 2 to 25 p-value= .994238
data.bin using bits 3 to 26 p-value= .190980
data.bin using bits 4 to 27 p-value= .088161
data.bin using bits 5 to 28 p-value= .449030
data.bin using bits 6 to 29 p-value= .584528
data.bin using bits 7 to 30 p-value= .098073
data.bin using bits 8 to 31 p-value= .549704
data.bin using bits 9 to 32 p-value= .932893
The 9 p-values were
.241977 .994238 .190980 .088161 .449030
.584528 .098073 .549704 .932893
A KSTEST for the 9 p-values yields .416227
--------------------------------------------------------------------------------
OPERM5 test for file data.bin
chisquare for 99 degrees of freedom=119.546; p-value= .921722
OPERM5 test for file data.bin
chisquare for 99 degrees of freedom=120.268; p-value= .928115
--------------------------------------------------------------------------------
Binary rank test for data.bin
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 201 211.4 .513367 .513
29 5113 5134.0 .085982 .599
30 23233 23103.0 .730978 1.330
31 11453 11551.5 .840327 2.171
chisquare= 2.171 for 3 d. of f.; p-value= .532582
Binary rank test for data.bin
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 231 211.4 1.813725 1.814
30 5091 5134.0 .360319 2.174
31 23105 23103.0 .000165 2.174
32 11573 11551.5 .039926 2.214
chisquare= 2.214 for 3 d. of f.; p-value= .539207
--------------------------------------------------------------------------------
b-rank test for bits 1 to 8 p=1-exp(-SUM/2)= .43840
b-rank test for bits 2 to 9 p=1-exp(-SUM/2)= .35363
b-rank test for bits 3 to 10 p=1-exp(-SUM/2)= .74991
b-rank test for bits 4 to 11 p=1-exp(-SUM/2)= .64298
b-rank test for bits 5 to 12 p=1-exp(-SUM/2)= .20293
b-rank test for bits 6 to 13 p=1-exp(-SUM/2)= .19555
b-rank test for bits 7 to 14 p=1-exp(-SUM/2)= .08982
b-rank test for bits 8 to 15 p=1-exp(-SUM/2)= .72457
b-rank test for bits 9 to 16 p=1-exp(-SUM/2)= .98542
b-rank test for bits 10 to 17 p=1-exp(-SUM/2)= .55893
b-rank test for bits 11 to 18 p=1-exp(-SUM/2)= .16223
b-rank test for bits 12 to 19 p=1-exp(-SUM/2)= .30986
b-rank test for bits 13 to 20 p=1-exp(-SUM/2)= .58396
b-rank test for bits 14 to 21 p=1-exp(-SUM/2)= .83637
b-rank test for bits 15 to 22 p=1-exp(-SUM/2)= .66995
b-rank test for bits 16 to 23 p=1-exp(-SUM/2)= .93286
b-rank test for bits 17 to 24 p=1-exp(-SUM/2)= .02672
b-rank test for bits 18 to 25 p=1-exp(-SUM/2)= .73045
b-rank test for bits 19 to 26 p=1-exp(-SUM/2)= .56014
b-rank test for bits 20 to 27 p=1-exp(-SUM/2)= .65098
b-rank test for bits 21 to 28 p=1-exp(-SUM/2)= .60648
b-rank test for bits 22 to 29 p=1-exp(-SUM/2)= .82799
b-rank test for bits 23 to 30 p=1-exp(-SUM/2)= .85926
b-rank test for bits 24 to 31 p=1-exp(-SUM/2)= .87312
b-rank test for bits 25 to 32 p=1-exp(-SUM/2)= .00031
TEST SUMMARY, 25 tests on 100,000 random 6x8 matrices
These should be 25 uniform [0,1] random variables:
.438398 .353626 .749907 .642977 .202931
.195552 .089820 .724568 .985425 .558933
.162234 .309860 .583956 .836374 .669954
.932861 .026719 .730451 .560139 .650981
.606482 .827987 .859258 .873122 .000307
brank test summary for data.bin
The KS test for those 25 supposed UNI's yields
KS p-value= .454085
--------------------------------------------------------------------------------
No. missing words should average 141909. with sigma=428.
tst no 1: 142373 missing words, 1.08 sigmas from mean, p-value= .86067
tst no 2: 142877 missing words, 2.26 sigmas from mean, p-value= .98812
tst no 3: 142232 missing words, .75 sigmas from mean, p-value= .77455
tst no 4: 142061 missing words, .35 sigmas from mean, p-value= .63847
tst no 5: 142267 missing words, .84 sigmas from mean, p-value= .79833
tst no 6: 142877 missing words, 2.26 sigmas from mean, p-value= .98812
tst no 7: 142842 missing words, 2.18 sigmas from mean, p-value= .98534
tst no 8: 142672 missing words, 1.78 sigmas from mean, p-value= .96262
tst no 9: 141953 missing words, .10 sigmas from mean, p-value= .54064
tst no 10: 142710 missing words, 1.87 sigmas from mean, p-value= .96931
tst no 11: 141870 missing words, -.09 sigmas from mean, p-value= .46339
tst no 12: 142609 missing words, 1.63 sigmas from mean, p-value= .94895
tst no 13: 141613 missing words, -.69 sigmas from mean, p-value= .24436
tst no 14: 141761 missing words, -.35 sigmas from mean, p-value= .36446
tst no 15: 141864 missing words, -.11 sigmas from mean, p-value= .45783
tst no 16: 142056 missing words, .34 sigmas from mean, p-value= .63408
tst no 17: 142585 missing words, 1.58 sigmas from mean, p-value= .94279
tst no 18: 142134 missing words, .52 sigmas from mean, p-value= .70019
tst no 19: 142122 missing words, .50 sigmas from mean, p-value= .69037
tst no 20: 142899 missing words, 2.31 sigmas from mean, p-value= .98962
--------------------------------------------------------------------------------
OPSO for data.bin using bits 23 to 32 142377 1.613 .9466
OPSO for data.bin using bits 22 to 31 142396 1.678 .9533
OPSO for data.bin using bits 21 to 30 142052 .492 .6886
OPSO for data.bin using bits 20 to 29 142772 2.975 .9985
OPSO for data.bin using bits 19 to 28 142444 1.844 .9674
OPSO for data.bin using bits 18 to 27 142312 1.389 .9175
OPSO for data.bin using bits 17 to 26 142090 .623 .7334
OPSO for data.bin using bits 16 to 25 142560 2.244 .9876
OPSO for data.bin using bits 15 to 24 142418 1.754 .9603
OPSO for data.bin using bits 14 to 23 142195 .985 .8377
OPSO for data.bin using bits 13 to 22 142058 .513 .6959
OPSO for data.bin using bits 12 to 21 142413 1.737 .9588
OPSO for data.bin using bits 11 to 20 142667 2.613 .9955
OPSO for data.bin using bits 10 to 19 142402 1.699 .9553
OPSO for data.bin using bits 9 to 18 142104 .671 .7490
OPSO for data.bin using bits 8 to 17 142318 1.409 .9206
OPSO for data.bin using bits 7 to 16 142023 .392 .6525
OPSO for data.bin using bits 6 to 15 142576 2.299 .9892
OPSO for data.bin using bits 5 to 14 141962 .182 .5721
OPSO for data.bin using bits 4 to 13 142464 1.913 .9721
OPSO for data.bin using bits 3 to 12 142474 1.947 .9742
OPSO for data.bin using bits 2 to 11 142193 .978 .8360
OPSO for data.bin using bits 1 to 10 142503 2.047 .9797
OQSO for data.bin using bits 28 to 32 142087 .602 .7265
OQSO for data.bin using bits 27 to 31 141834 -.255 .3992
OQSO for data.bin using bits 26 to 30 141892 -.059 .4766
OQSO for data.bin using bits 25 to 29 141834 -.255 .3992
OQSO for data.bin using bits 24 to 28 141723 -.632 .2638
OQSO for data.bin using bits 23 to 27 142757 2.873 .9980
OQSO for data.bin using bits 22 to 26 142102 .653 .7432
OQSO for data.bin using bits 21 to 25 142351 1.497 .9328
OQSO for data.bin using bits 20 to 24 142153 .826 .7956
OQSO for data.bin using bits 19 to 23 141755 -.523 .3004
OQSO for data.bin using bits 18 to 22 141440 -1.591 .0558
OQSO for data.bin using bits 17 to 21 142094 .626 .7343
OQSO for data.bin using bits 16 to 20 142557 2.195 .9859
OQSO for data.bin using bits 15 to 19 141786 -.418 .3380
OQSO for data.bin using bits 14 to 18 142342 1.467 .9288
OQSO for data.bin using bits 13 to 17 142694 2.660 .9961
OQSO for data.bin using bits 12 to 16 142134 .762 .7769
OQSO for data.bin using bits 11 to 15 142065 .528 .7011
OQSO for data.bin using bits 10 to 14 142081 .582 .7197
OQSO for data.bin using bits 9 to 13 142451 1.836 .9668
OQSO for data.bin using bits 8 to 12 142026 .395 .6538
OQSO for data.bin using bits 7 to 11 142247 1.145 .8738
OQSO for data.bin using bits 6 to 10 142103 .657 .7443
OQSO for data.bin using bits 5 to 9 142253 1.165 .8780
OQSO for data.bin using bits 4 to 8 142191 .955 .8302
OQSO for data.bin using bits 3 to 7 142142 .789 .7849
OQSO for data.bin using bits 2 to 6 142069 .541 .7058
OQSO for data.bin using bits 1 to 5 142679 2.609 .9955
DNA for data.bin using bits 31 to 32 142022 .332 .6302
DNA for data.bin using bits 30 to 31 142227 .937 .8256
DNA for data.bin using bits 29 to 30 141734 -.517 .3025
DNA for data.bin using bits 28 to 29 141743 -.491 .3118
DNA for data.bin using bits 27 to 28 141799 -.325 .3724
DNA for data.bin using bits 26 to 27 142097 .554 .7101
DNA for data.bin using bits 25 to 26 142479 1.680 .9536
DNA for data.bin using bits 24 to 25 142471 1.657 .9512
DNA for data.bin using bits 23 to 24 141763 -.432 .3330
DNA for data.bin using bits 22 to 23 141769 -.414 .3395
DNA for data.bin using bits 21 to 22 141477 -1.275 .1011
DNA for data.bin using bits 20 to 21 141295 -1.812 .0350
DNA for data.bin using bits 19 to 20 141590 -.942 .1731
DNA for data.bin using bits 18 to 19 142505 1.757 .9606
DNA for data.bin using bits 17 to 18 141806 -.305 .3803
DNA for data.bin using bits 16 to 17 142902 2.928 .9983
DNA for data.bin using bits 15 to 16 142392 1.424 .9227
DNA for data.bin using bits 14 to 15 141791 -.349 .3635
DNA for data.bin using bits 13 to 14 141937 .082 .5325
DNA for data.bin using bits 12 to 13 142082 .509 .6947
DNA for data.bin using bits 11 to 12 141950 .120 .5477
DNA for data.bin using bits 10 to 11 141861 -.143 .4433
DNA for data.bin using bits 9 to 10 142934 3.023 .9987
DNA for data.bin using bits 8 to 9 142933 3.020 .9987
DNA for data.bin using bits 7 to 8 142679 2.270 .9884
DNA for data.bin using bits 6 to 7 141384 -1.550 .0606
DNA for data.bin using bits 5 to 6 142134 .663 .7463
DNA for data.bin using bits 4 to 5 141668 -.712 .2383
DNA for data.bin using bits 3 to 4 141504 -1.196 .1159
DNA for data.bin using bits 2 to 3 141955 .135 .5536
DNA for data.bin using bits 1 to 2 142982 3.164 .9992
--------------------------------------------------------------------------------
Test results for data.bin
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 data.bin 5498.27 42.402 1.000000
byte stream for data.bin 4181.07 23.774 1.000000
--------------------------------------------------------------------------------
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 2410.39 -1.267 .102525
bits 2 to 9 2460.26 -.562 .287032
bits 3 to 10 2611.91 1.583 .943254
bits 4 to 11 2410.89 -1.260 .103800
bits 5 to 12 2593.65 1.324 .907309
bits 6 to 13 2440.47 -.842 .199932
bits 7 to 14 2532.04 .453 .674785
bits 8 to 15 2515.84 .224 .588629
bits 9 to 16 2501.46 .021 .508262
bits 10 to 17 2479.15 -.295 .384037
bits 11 to 18 2403.30 -1.367 .085735
bits 12 to 19 2555.67 .787 .784426
bits 13 to 20 2663.01 2.305 .989424
bits 14 to 21 2524.37 .345 .634795
bits 15 to 22 2491.19 -.125 .450424
bits 16 to 23 2496.91 -.044 .482576
bits 17 to 24 2540.91 .579 .718539
bits 18 to 25 2482.82 -.243 .404004
bits 19 to 26 2592.94 1.314 .905627
bits 20 to 27 2549.87 .705 .759672
bits 21 to 28 2539.28 .556 .710742
bits 22 to 29 2464.96 -.496 .310096
bits 23 to 30 2580.23 1.135 .871726
bits 24 to 31 2562.78 .888 .812670
bits 25 to 32 2513.21 .187 .574115
--------------------------------------------------------------------------------
CDPARK: result of ten tests on file data.bin
Of 12,000 tries, the average no. of successes
should be 3523 with sigma=21.9
Successes: 3504 z-score: -.868 p-value: .192812
Successes: 3468 z-score: -2.511 p-value: .006012
Successes: 3510 z-score: -.594 p-value: .276387
Successes: 3518 z-score: -.228 p-value: .409702
Successes: 3522 z-score: -.046 p-value: .481790
Successes: 3510 z-score: -.594 p-value: .276387
Successes: 3533 z-score: .457 p-value: .676028
Successes: 3523 z-score: .000 p-value: .500000
Successes: 3535 z-score: .548 p-value: .708135
Successes: 3551 z-score: 1.279 p-value: .899470
square size avg. no. parked sample sigma
100. 3517.400 21.120
KSTEST for the above 10: p= .285528
--------------------------------------------------------------------------------
This is the MINIMUM DISTANCE test
for random integers in the file data.bin
Sample no. d^2 avg equiv uni
5 .2050 1.0526 .186208
10 .8037 .7519 .554117
15 .2750 .7991 .241488
20 1.5491 .7198 .789215
25 .9855 .8667 .628588
30 .5342 .9876 .415410
35 .9556 1.1248 .617246
40 2.9874 1.1784 .950334
45 .4764 1.1424 .380469
50 .1316 1.1082 .123849
55 .4524 1.1350 .365333
60 1.0353 1.1684 .646735
65 .9410 1.1733 .611618
70 .8638 1.1229 .580270
75 .0259 1.1350 .025735
80 .5710 1.0978 .436661
85 .2961 1.1009 .257366
90 .0754 1.1035 .072950
95 .4577 1.0781 .368685
100 .3561 1.0569 .300855
MINIMUM DISTANCE TEST for data.bin
Result of KS test on 20 transformed mindist^2's:
p-value= .115895
--------------------------------------------------------------------------------
The 3DSPHERES test for file data.bin
sample no: 1 r^3= 39.854 p-value= .73512
sample no: 2 r^3= 6.345 p-value= .19063
sample no: 3 r^3= 2.985 p-value= .09472
sample no: 4 r^3= 3.255 p-value= .10283
sample no: 5 r^3= 6.452 p-value= .19351
sample no: 6 r^3= 25.759 p-value= .57625
sample no: 7 r^3= 50.047 p-value= .81142
sample no: 8 r^3= 12.014 p-value= .33000
sample no: 9 r^3= 24.398 p-value= .55660
sample no: 10 r^3= 21.328 p-value= .50881
sample no: 11 r^3= 40.809 p-value= .74342
sample no: 12 r^3= 1.185 p-value= .03872
sample no: 13 r^3= 48.150 p-value= .79911
sample no: 14 r^3= 11.927 p-value= .32805
sample no: 15 r^3= 14.211 p-value= .37731
sample no: 16 r^3= 5.047 p-value= .15486
sample no: 17 r^3= 15.368 p-value= .40087
sample no: 18 r^3= .756 p-value= .02488
sample no: 19 r^3= 56.696 p-value= .84891
sample no: 20 r^3= 13.379 p-value= .35980
3DSPHERES test for file data.bin p-value= .731855
--------------------------------------------------------------------------------
RESULTS OF SQUEEZE TEST FOR data.bin
Table of standardized frequency counts
( (obs-exp)/sqrt(exp) )^2
for j taking values <=6,7,8,...,47,>=48:
1.3 2.6 1.8 2.1 1.3 1.5
1.6 1.4 1.9 4.2 3.7 2.7
5.1 4.4 2.5 2.8 2.3 -.3
-.5 -1.5 -3.0 -1.5 -2.1 -5.6
-5.9 -4.2 -5.4 -2.5 -4.6 -2.1
-2.8 -3.4 -2.4 -.8 -1.3 -1.4
.5 -2.0 -2.4 -.1 .1 -1.0
-1.1
Chi-square with 42 degrees of freedom:335.535
z-score= 32.027 p-value=1.000000
______________________________________________________________
--------------------------------------------------------------------------------
Test no. 1 p-value .898521
Test no. 2 p-value .564103
Test no. 3 p-value .830480
Test no. 4 p-value .020993
Test no. 5 p-value .319630
Test no. 6 p-value .482049
Test no. 7 p-value .389168
Test no. 8 p-value .051446
Test no. 9 p-value .857243
Test no. 10 p-value .573609
Results of the OSUM test for data.bin
KSTEST on the above 10 p-values: .128523
--------------------------------------------------------------------------------
The RUNS test for file data.bin
Up and down runs in a sample of 10000
_________________________________________________
Run test for data.bin :
runs up; ks test for 10 p's: .736332
runs down; ks test for 10 p's: .716585
Run test for data.bin :
runs up; ks test for 10 p's: .807277
runs down; ks test for 10 p's: .065076
--------------------------------------------------------------------------------
Results of craps test for data.bin
No. of wins: Observed Expected
98199 98585.86
Chisq= 34.95 for 20 degrees of freedom, p= .97963
Throws Observed Expected Chisq Sum
SUMMARY FOR data.bin
p-value for no. of wins: .041792
p-value for throws/game: .979629
Test completed. File data.bin
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment