Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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 canada.bit
- For a sample of size 500: mean
- canada.bit using bits 1 to 24 1.948
- duplicate number number
- spacings observed expected
- 0 73. 67.668
- 1 138. 135.335
- 2 132. 135.335
- 3 97. 90.224
- 4 35. 45.112
- 5 16. 18.045
- 6 to INF 9. 8.282
- Chisquare with 6 d.o.f. = 3.62 p-value= .272641
- :::::::::::::::::::::::::::::::::::::::::
- For a sample of size 500: mean
- canada.bit using bits 2 to 25 1.960
- duplicate number number
- spacings observed expected
- 0 72. 67.668
- 1 143. 135.335
- 2 128. 135.335
- 3 87. 90.224
- 4 45. 45.112
- 5 13. 18.045
- 6 to INF 12. 8.282
- Chisquare with 6 d.o.f. = 4.30 p-value= .364408
- :::::::::::::::::::::::::::::::::::::::::
- For a sample of size 500: mean
- canada.bit using bits 3 to 26 1.938
- duplicate number number
- spacings observed expected
- 0 75. 67.668
- 1 112. 135.335
- 2 168. 135.335
- 3 91. 90.224
- 4 30. 45.112
- 5 18. 18.045
- 6 to INF 6. 8.282
- Chisquare with 6 d.o.f. = 18.40 p-value= .994693
- :::::::::::::::::::::::::::::::::::::::::
- For a sample of size 500: mean
- canada.bit using bits 4 to 27 1.988
- duplicate number number
- spacings observed expected
- 0 65. 67.668
- 1 146. 135.335
- 2 123. 135.335
- 3 98. 90.224
- 4 44. 45.112
- 5 15. 18.045
- 6 to INF 9. 8.282
- Chisquare with 6 d.o.f. = 3.34 p-value= .235347
- :::::::::::::::::::::::::::::::::::::::::
- For a sample of size 500: mean
- canada.bit using bits 5 to 28 1.908
- duplicate number number
- spacings observed expected
- 0 87. 67.668
- 1 134. 135.335
- 2 115. 135.335
- 3 97. 90.224
- 4 44. 45.112
- 5 19. 18.045
- 6 to INF 4. 8.282
- Chisquare with 6 d.o.f. = 11.39 p-value= .923025
- :::::::::::::::::::::::::::::::::::::::::
- For a sample of size 500: mean
- canada.bit using bits 6 to 29 2.112
- duplicate number number
- spacings observed expected
- 0 55. 67.668
- 1 121. 135.335
- 2 146. 135.335
- 3 103. 90.224
- 4 47. 45.112
- 5 24. 18.045
- 6 to INF 4. 8.282
- Chisquare with 6 d.o.f. = 10.80 p-value= .905169
- :::::::::::::::::::::::::::::::::::::::::
- For a sample of size 500: mean
- canada.bit using bits 7 to 30 1.944
- duplicate number number
- spacings observed expected
- 0 64. 67.668
- 1 142. 135.335
- 2 139. 135.335
- 3 93. 90.224
- 4 42. 45.112
- 5 15. 18.045
- 6 to INF 5. 8.282
- Chisquare with 6 d.o.f. = 2.74 p-value= .159363
- :::::::::::::::::::::::::::::::::::::::::
- For a sample of size 500: mean
- canada.bit using bits 8 to 31 1.980
- duplicate number number
- spacings observed expected
- 0 64. 67.668
- 1 142. 135.335
- 2 143. 135.335
- 3 78. 90.224
- 4 45. 45.112
- 5 22. 18.045
- 6 to INF 6. 8.282
- Chisquare with 6 d.o.f. = 4.11 p-value= .338623
- :::::::::::::::::::::::::::::::::::::::::
- For a sample of size 500: mean
- canada.bit using bits 9 to 32 2.008
- duplicate number number
- spacings observed expected
- 0 68. 67.668
- 1 129. 135.335
- 2 139. 135.335
- 3 93. 90.224
- 4 45. 45.112
- 5 18. 18.045
- 6 to INF 8. 8.282
- Chisquare with 6 d.o.f. = .49 p-value= .002076
- :::::::::::::::::::::::::::::::::::::::::
- The 9 p-values were
- .272641 .364408 .994693 .235347 .923025
- .905169 .159363 .338623 .002076
- A KSTEST for the 9 p-values yields .767290
- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
- Results of DIEHARD battery of tests sent to file canadares.txt
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement