Testing the XR232USB with the DIEHARD Test Series 
2.12.13, 16:20 - Linux

Testing the XR232USB with the DIEHARD Test Series


To check my new toy XR232USB for real randomness and independence, I found a series of Tests called DIEHARD.
It's 15 single tests which result in a P Value in the range of 0..1
http://www.stat.fsu.edu/pub/diehard/
So I let the device save a 10 Mb sized File with random numbers, and ....

The XR232USB passed all Tests \o/



If you are interested in the results, click on "weiterlesen"


BIRTHDAY SPACINGS TEST, M= 512 N=2**24 LAMBDA= 2.0000
rand.hex using bits 1 to 24 p-value= .921261
rand.hex using bits 2 to 25 p-value= .281768
rand.hex using bits 3 to 26 p-value= .138671
rand.hex using bits 4 to 27 p-value= .751373
rand.hex using bits 5 to 28 p-value= .855280
rand.hex using bits 6 to 29 p-value= .611108
rand.hex using bits 7 to 30 p-value= .253484
rand.hex using bits 8 to 31 p-value= .890132
rand.hex using bits 9 to 32 p-value= .455916
The 9 p-values were
.921261 .281768 .138671 .751373 .855280
.611108 .253484 .890132 .455916
A KSTEST for the 9 p-values yields .272255
--------------------------------------------------------------------------------
OPERM5 test for file rand.hex
chisquare for 99 degrees of freedom=109.495; p-value= .778854
OPERM5 test for file rand.hex
chisquare for 99 degrees of freedom= 86.959; p-value= .198889
--------------------------------------------------------------------------------
Binary rank test for rand.hex
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 199 211.4 .729394 .729
29 5171 5134.0 .266505 .996
30 23075 23103.0 .034049 1.030
31 11555 11551.5 .001046 1.031
chisquare= 1.031 for 3 d. of f.; p-value= .361210
Binary rank test for rand.hex
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 218 211.4 .204914 .205
30 5172 5134.0 .281110 .486
31 23067 23103.0 .056243 .542
32 11543 11551.5 .006291 .549
chisquare= .549 for 3 d. of f.; p-value= .321353
--------------------------------------------------------------------------------
b-rank test for bits 1 to 8 p=1-exp(-SUM/2)= .20999
b-rank test for bits 2 to 9 p=1-exp(-SUM/2)= .73708
b-rank test for bits 3 to 10 p=1-exp(-SUM/2)= .62154
b-rank test for bits 4 to 11 p=1-exp(-SUM/2)= .07176
b-rank test for bits 5 to 12 p=1-exp(-SUM/2)= .60599
b-rank test for bits 6 to 13 p=1-exp(-SUM/2)= .32821
b-rank test for bits 7 to 14 p=1-exp(-SUM/2)= .88233
b-rank test for bits 8 to 15 p=1-exp(-SUM/2)= .57902
b-rank test for bits 9 to 16 p=1-exp(-SUM/2)= .90375
b-rank test for bits 10 to 17 p=1-exp(-SUM/2)= .72821
b-rank test for bits 11 to 18 p=1-exp(-SUM/2)= .61863
b-rank test for bits 12 to 19 p=1-exp(-SUM/2)= .64208
b-rank test for bits 13 to 20 p=1-exp(-SUM/2)= .86312
b-rank test for bits 14 to 21 p=1-exp(-SUM/2)= .55851
b-rank test for bits 15 to 22 p=1-exp(-SUM/2)= .54974
b-rank test for bits 16 to 23 p=1-exp(-SUM/2)= .20165
b-rank test for bits 17 to 24 p=1-exp(-SUM/2)= .61421
b-rank test for bits 18 to 25 p=1-exp(-SUM/2)= .92028
b-rank test for bits 19 to 26 p=1-exp(-SUM/2)= .91919
b-rank test for bits 20 to 27 p=1-exp(-SUM/2)= .31276
b-rank test for bits 21 to 28 p=1-exp(-SUM/2)= .02673
b-rank test for bits 22 to 29 p=1-exp(-SUM/2)= .00637
b-rank test for bits 23 to 30 p=1-exp(-SUM/2)= .69901
b-rank test for bits 24 to 31 p=1-exp(-SUM/2)= .67167
b-rank test for bits 25 to 32 p=1-exp(-SUM/2)= .04696
TEST SUMMARY, 25 tests on 100,000 random 6x8 matrices
These should be 25 uniform [0,1] random variables:
.209992 .737078 .621537 .071755 .605992
.328214 .882326 .579017 .903748 .728213
.618630 .642081 .863118 .558513 .549737
.201645 .614212 .920276 .919189 .312764
.026732 .006369 .699008 .671668 .046964
brank test summary for rand.hex
The KS test for those 25 supposed UNI's yields
KS p-value= .585971
--------------------------------------------------------------------------------
No. missing words should average 141909. with sigma=428.
tst no 1: 141014 missing words, -2.09 sigmas from mean, p-value= .01822
tst no 2: 141739 missing words, -.40 sigmas from mean, p-value= .34533
tst no 3: 142450 missing words, 1.26 sigmas from mean, p-value= .89675
tst no 4: 141701 missing words, -.49 sigmas from mean, p-value= .31322
tst no 5: 142154 missing words, .57 sigmas from mean, p-value= .71622
tst no 6: 142266 missing words, .83 sigmas from mean, p-value= .79768
tst no 7: 141922 missing words, .03 sigmas from mean, p-value= .51181
tst no 8: 141162 missing words, -1.75 sigmas from mean, p-value= .04040
tst no 9: 142428 missing words, 1.21 sigmas from mean, p-value= .88722
tst no 10: 141283 missing words, -1.46 sigmas from mean, p-value= .07168
tst no 11: 141811 missing words, -.23 sigmas from mean, p-value= .40915
tst no 12: 141757 missing words, -.36 sigmas from mean, p-value= .36096
tst no 13: 141722 missing words, -.44 sigmas from mean, p-value= .33081
tst no 14: 142021 missing words, .26 sigmas from mean, p-value= .60292
tst no 15: 141628 missing words, -.66 sigmas from mean, p-value= .25549
tst no 16: 142419 missing words, 1.19 sigmas from mean, p-value= .88314
tst no 17: 142096 missing words, .44 sigmas from mean, p-value= .66864
tst no 18: 141906 missing words, -.01 sigmas from mean, p-value= .49690
tst no 19: 142195 missing words, .67 sigmas from mean, p-value= .74776
tst no 20: 141736 missing words, -.40 sigmas from mean, p-value= .34275
--------------------------------------------------------------------------------
OPSO for rand.hex using bits 23 to 32 142775 2.985 .9986
OPSO for rand.hex using bits 22 to 31 141483 -1.470 .0708
OPSO for rand.hex using bits 21 to 30 142139 .792 .7858
OPSO for rand.hex using bits 20 to 29 141439 -1.622 .0524
OPSO for rand.hex using bits 19 to 28 142632 2.492 .9936
OPSO for rand.hex using bits 18 to 27 141757 -.525 .2997
OPSO for rand.hex using bits 17 to 26 141930 .071 .5284
OPSO for rand.hex using bits 16 to 25 142004 .326 .6280
OPSO for rand.hex using bits 15 to 24 142427 1.785 .9629
OPSO for rand.hex using bits 14 to 23 142197 .992 .8394
OPSO for rand.hex using bits 13 to 22 141774 -.467 .3204
OPSO for rand.hex using bits 12 to 21 142057 .509 .6947
OPSO for rand.hex using bits 11 to 20 141074 -2.880 .0020
OPSO for rand.hex using bits 10 to 19 141821 -.305 .3803
OPSO for rand.hex using bits 9 to 18 141498 -1.418 .0780
OPSO for rand.hex using bits 8 to 17 142101 .661 .7457
OPSO for rand.hex using bits 7 to 16 141620 -.998 .1592
OPSO for rand.hex using bits 6 to 15 141687 -.767 .2216
OPSO for rand.hex using bits 5 to 14 141811 -.339 .3673
OPSO for rand.hex using bits 4 to 13 141573 -1.160 .1231
OPSO for rand.hex using bits 3 to 12 141727 -.629 .2648
OPSO for rand.hex using bits 2 to 11 141526 -1.322 .0931
OPSO for rand.hex using bits 1 to 10 141865 -.153 .4393
OQSO for rand.hex using bits 28 to 32 141849 -.205 .4190
OQSO for rand.hex using bits 27 to 31 142059 .507 .6940
OQSO for rand.hex using bits 26 to 30 141446 -1.571 .0581
OQSO for rand.hex using bits 25 to 29 141828 -.276 .3914
OQSO for rand.hex using bits 24 to 28 142027 .399 .6550
OQSO for rand.hex using bits 23 to 27 141678 -.784 .2165
OQSO for rand.hex using bits 22 to 26 141881 -.096 .4617
OQSO for rand.hex using bits 21 to 25 141961 .175 .5695
OQSO for rand.hex using bits 20 to 24 141661 -.842 .2000
OQSO for rand.hex using bits 19 to 23 142366 1.548 .9392
OQSO for rand.hex using bits 18 to 22 142069 .541 .7058
OQSO for rand.hex using bits 17 to 21 141579 -1.120 .1314
OQSO for rand.hex using bits 16 to 20 142434 1.779 .9623
OQSO for rand.hex using bits 15 to 19 141684 -.764 .2225
OQSO for rand.hex using bits 14 to 18 141812 -.330 .3707
OQSO for rand.hex using bits 13 to 17 141966 .192 .5762
OQSO for rand.hex using bits 12 to 16 142251 1.158 .8766
OQSO for rand.hex using bits 11 to 15 141657 -.855 .1962
OQSO for rand.hex using bits 10 to 14 142037 .433 .6674
OQSO for rand.hex using bits 9 to 13 141670 -.811 .2086
OQSO for rand.hex using bits 8 to 12 141786 -.418 .3380
OQSO for rand.hex using bits 7 to 11 141495 -1.405 .0801
OQSO for rand.hex using bits 6 to 10 141829 -.272 .3927
OQSO for rand.hex using bits 5 to 9 141570 -1.150 .1250
OQSO for rand.hex using bits 4 to 8 141851 -.198 .4216
OQSO for rand.hex using bits 3 to 7 141391 -1.757 .0395
OQSO for rand.hex using bits 2 to 6 142194 .965 .8327
OQSO for rand.hex using bits 1 to 5 141778 -.445 .3281
DNA for rand.hex using bits 31 to 32 142228 .940 .8264
DNA for rand.hex using bits 30 to 31 141912 .008 .5031
DNA for rand.hex using bits 29 to 30 141830 -.234 .4075
DNA for rand.hex using bits 28 to 29 142143 .689 .7547
DNA for rand.hex using bits 27 to 28 142023 .335 .6313
DNA for rand.hex using bits 26 to 27 141404 -1.491 .0680
DNA for rand.hex using bits 25 to 26 141614 -.871 .1918
DNA for rand.hex using bits 24 to 25 141957 .141 .5559
DNA for rand.hex using bits 23 to 24 142787 2.589 .9952
DNA for rand.hex using bits 22 to 23 141716 -.570 .2842
DNA for rand.hex using bits 21 to 22 141694 -.635 .2627
DNA for rand.hex using bits 20 to 21 142493 1.722 .9574
DNA for rand.hex using bits 19 to 20 142146 .698 .7575
DNA for rand.hex using bits 18 to 19 141572 -.995 .1599
DNA for rand.hex using bits 17 to 18 142133 .660 .7453
DNA for rand.hex using bits 16 to 17 141781 -.379 .3525
DNA for rand.hex using bits 15 to 16 141869 -.119 .4527
DNA for rand.hex using bits 14 to 15 142223 .925 .8226
DNA for rand.hex using bits 13 to 14 142195 .843 .8003
DNA for rand.hex using bits 12 to 13 142426 1.524 .9363
DNA for rand.hex using bits 11 to 12 141853 -.166 .4340
DNA for rand.hex using bits 10 to 11 141530 -1.119 .1316
DNA for rand.hex using bits 9 to 10 141863 -.137 .4456
DNA for rand.hex using bits 8 to 9 141994 .250 .5986
DNA for rand.hex using bits 7 to 8 141468 -1.302 .0965
DNA for rand.hex using bits 6 to 7 142092 .539 .7050
DNA for rand.hex using bits 5 to 6 141723 -.550 .2913
DNA for rand.hex using bits 4 to 5 141910 .002 .5008
DNA for rand.hex using bits 3 to 4 141893 -.048 .4808
DNA for rand.hex using bits 2 to 3 141152 -2.234 .0127
DNA for rand.hex using bits 1 to 2 141696 -.629 .2646
--------------------------------------------------------------------------------
Test results for rand.hex
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 rand.hex 2645.91 2.063 .980467
byte stream for rand.hex 2438.36 -.872 .191666
--------------------------------------------------------------------------------
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 2414.64 -1.207 .113670
bits 2 to 9 2470.18 -.422 .336596
bits 3 to 10 2550.95 .721 .764415
bits 4 to 11 2704.44 2.891 .998081
bits 5 to 12 2616.28 1.644 .949962
bits 6 to 13 2402.01 -1.386 .082912
bits 7 to 14 2571.68 1.014 .844626
bits 8 to 15 2555.44 .784 .783498
bits 9 to 16 2568.02 .962 .831973
bits 10 to 17 2571.01 1.004 .842376
bits 11 to 18 2419.74 -1.135 .128168
bits 12 to 19 2519.04 .269 .606164
bits 13 to 20 2556.20 .795 .786613
bits 14 to 21 2535.46 .501 .691978
bits 15 to 22 2613.53 1.606 .945813
bits 16 to 23 2517.75 .251 .599113
bits 17 to 24 2528.16 .398 .654752
bits 18 to 25 2494.93 -.072 .471417
bits 19 to 26 2577.57 1.097 .863674
bits 20 to 27 2543.30 .612 .729853
bits 21 to 28 2523.64 .334 .630941
bits 22 to 29 2449.90 -.709 .239298
bits 23 to 30 2544.71 .632 .736423
bits 24 to 31 2578.16 1.105 .865506
bits 25 to 32 2506.23 .088 .535109
--------------------------------------------------------------------------------
CDPARK: result of ten tests on file rand.hex
Of 12,000 tries, the average no. of successes
should be 3523 with sigma=21.9
Successes: 3506 z-score: -.776 p-value: .218799
Successes: 3516 z-score: -.320 p-value: .374623
Successes: 3504 z-score: -.868 p-value: .192812
Successes: 3507 z-score: -.731 p-value: .232514
Successes: 3525 z-score: .091 p-value: .536382
Successes: 3527 z-score: .183 p-value: .572463
Successes: 3526 z-score: .137 p-value: .554479
Successes: 3506 z-score: -.776 p-value: .218799
Successes: 3526 z-score: .137 p-value: .554479
Successes: 3521 z-score: -.091 p-value: .463618

square size avg. no. parked sample sigma
100. 3516.400 9.200
KSTEST for the above 10: p= .877698
--------------------------------------------------------------------------------
This is the MINIMUM DISTANCE test
for random integers in the file rand.hex
Sample no. d^2 avg equiv uni
5 1.3386 1.6097 .739532
10 3.6174 1.4856 .973632
15 .2419 1.2096 .215811
20 1.2894 1.2119 .726352
25 2.0832 1.0853 .876763
30 .3477 1.0001 .294910
35 .0056 .9793 .005602
40 1.6616 .9850 .811736
45 1.0120 .9723 .638347
50 .5805 1.0006 .442024
55 4.1322 1.0141 .984283
60 .0238 .9572 .023652
65 .3976 .9341 .329431
70 .8872 .9250 .590018
75 .0465 .9045 .045634
80 .0548 .9016 .053610
85 .3462 .9229 .293852
90 1.2644 .9269 .719388
95 .3463 .9581 .293901
100 .6465 .9343 .477811
MINIMUM DISTANCE TEST for rand.hex
Result of KS test on 20 transformed mindist^2's:
p-value= .470483
--------------------------------------------------------------------------------
The 3DSPHERES test for file rand.hex
sample no: 1 r^3= 5.778 p-value= .17518
sample no: 2 r^3= 12.341 p-value= .33726
sample no: 3 r^3= 36.302 p-value= .70182
sample no: 4 r^3= 3.829 p-value= .11981
sample no: 5 r^3= 48.600 p-value= .80210
sample no: 6 r^3= 2.174 p-value= .06991
sample no: 7 r^3= 9.873 p-value= .28042
sample no: 8 r^3= 18.124 p-value= .45345
sample no: 9 r^3= 2.450 p-value= .07843
sample no: 10 r^3= 1.172 p-value= .03830
sample no: 11 r^3= 8.004 p-value= .23418
sample no: 12 r^3= 1.618 p-value= .05252
sample no: 13 r^3= 10.904 p-value= .30474
sample no: 14 r^3= 34.113 p-value= .67926
sample no: 15 r^3= 2.712 p-value= .08642
sample no: 16 r^3= 28.358 p-value= .61143
sample no: 17 r^3= 14.675 p-value= .38686
sample no: 18 r^3= 2.347 p-value= .07525
sample no: 19 r^3= 46.851 p-value= .79022
sample no: 20 r^3= 74.660 p-value= .91698
3DSPHERES test for file rand.hex p-value= .967607
--------------------------------------------------------------------------------
RESULTS OF SQUEEZE TEST FOR rand.hex
Table of standardized frequency counts
( (obs-exp)/sqrt(exp) )^2
for j taking values <=6,7,8,...,47,>=48:
-1.5 -1.2 -.4 -2.7 .3 .2
-.7 -1.5 2.3 1.4 -1.1 -1.5
-.6 .6 1.9 -.7 1.1 -.3
-.4 .8 .3 -1.5 -1.3 .2
-.4 .2 .2 .7 -1.1 1.0
.0 1.4 -.7 .7 1.3 .4
-.2 -1.0 .1 -.1 -.6 -1.0
-1.1
Chi-square with 42 degrees of freedom: 47.117
z-score= .558 p-value= .729002
______________________________________________________________
--------------------------------------------------------------------------------
Test no. 1 p-value .508369
Test no. 2 p-value .848100
Test no. 3 p-value .184618
Test no. 4 p-value .751256
Test no. 5 p-value .438487
Test no. 6 p-value .043911
Test no. 7 p-value .957624
Test no. 8 p-value .768184
Test no. 9 p-value .896934
Test no. 10 p-value .337636
Results of the OSUM test for rand.hex
KSTEST on the above 10 p-values: .270623
--------------------------------------------------------------------------------
The RUNS test for file rand.hex
Up and down runs in a sample of 10000
_________________________________________________
Run test for rand.hex :
runs up; ks test for 10 p's: .492343
runs down; ks test for 10 p's: .079916
Run test for rand.hex :
runs up; ks test for 10 p's: .919477
runs down; ks test for 10 p's: .533420
--------------------------------------------------------------------------------
Results of craps test for rand.hex
No. of wins: Observed Expected
98251 98585.86
Chisq= 24.95 for 20 degrees of freedom, p= .79658
Throws Observed Expected Chisq Sum
SUMMARY FOR rand.hex
p-value for no. of wins: .067107
p-value for throws/game: .796575
Test completed. File rand.hex
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::




Kommentare

webdoktor 
4.12.13, 11:37
related link https://groups.google.com/forum/#!topic/de.sci.electronics/cR3Bcqj_kV4[101-125-false]

Kommentar hinzufügen
nocomments