Advertisement
Guest User

Untitled

a guest
Feb 12th, 2013
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.82 KB | None | 0 0
  1. NOTE: Most of the tests in DIEHARD return a p-value, which
  2. should be uniform on [0,1) if the input file contains truly
  3. independent random bits. Those p-values are obtained by
  4. p=F(X), where F is the assumed distribution of the sample
  5. random variable X---often normal. But that assumed F is just
  6. an asymptotic approximation, for which the fit will be worst
  7. in the tails. Thus you should not be surprised with
  8. occasional p-values near 0 or 1, such as .0012 or .9983.
  9. When a bit stream really FAILS BIG, you will get p's of 0 or
  10. 1 to six or more places. By all means, do not, as a
  11. Statistician might, think that a p < .025 or p> .975 means
  12. that the RNG has "failed the test at the .05 level". Such
  13. p's happen among the hundreds that DIEHARD produces, even
  14. with good RNG's. So keep in mind that " p happens".
  15. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  16. :: This is the BIRTHDAY SPACINGS TEST ::
  17. :: Choose m birthdays in a year of n days. List the spacings ::
  18. :: between the birthdays. If j is the number of values that ::
  19. :: occur more than once in that list, then j is asymptotically ::
  20. :: Poisson distributed with mean m^3/(4n). Experience shows n ::
  21. :: must be quite large, say n>=2^18, for comparing the results ::
  22. :: to the Poisson distribution with that mean. This test uses ::
  23. :: n=2^24 and m=2^9, so that the underlying distribution for j ::
  24. :: is taken to be Poisson with lambda=2^27/(2^26)=2. A sample ::
  25. :: of 500 j's is taken, and a chi-square goodness of fit test ::
  26. :: provides a p value. The first test uses bits 1-24 (counting ::
  27. :: from the left) from integers in the specified file. ::
  28. :: Then the file is closed and reopened. Next, bits 2-25 are ::
  29. :: used to provide birthdays, then 3-26 and so on to bits 9-32. ::
  30. :: Each set of bits provides a p-value, and the nine p-values ::
  31. :: provide a sample for a KSTEST. ::
  32. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  33. BIRTHDAY SPACINGS TEST, M= 512 N=2**24 LAMBDA= 2.0000
  34. Results for canada.bit
  35. For a sample of size 500: mean
  36. canada.bit using bits 1 to 24 1.948
  37. duplicate number number
  38. spacings observed expected
  39. 0 73. 67.668
  40. 1 138. 135.335
  41. 2 132. 135.335
  42. 3 97. 90.224
  43. 4 35. 45.112
  44. 5 16. 18.045
  45. 6 to INF 9. 8.282
  46. Chisquare with 6 d.o.f. = 3.62 p-value= .272641
  47. :::::::::::::::::::::::::::::::::::::::::
  48. For a sample of size 500: mean
  49. canada.bit using bits 2 to 25 1.960
  50. duplicate number number
  51. spacings observed expected
  52. 0 72. 67.668
  53. 1 143. 135.335
  54. 2 128. 135.335
  55. 3 87. 90.224
  56. 4 45. 45.112
  57. 5 13. 18.045
  58. 6 to INF 12. 8.282
  59. Chisquare with 6 d.o.f. = 4.30 p-value= .364408
  60. :::::::::::::::::::::::::::::::::::::::::
  61. For a sample of size 500: mean
  62. canada.bit using bits 3 to 26 1.938
  63. duplicate number number
  64. spacings observed expected
  65. 0 75. 67.668
  66. 1 112. 135.335
  67. 2 168. 135.335
  68. 3 91. 90.224
  69. 4 30. 45.112
  70. 5 18. 18.045
  71. 6 to INF 6. 8.282
  72. Chisquare with 6 d.o.f. = 18.40 p-value= .994693
  73. :::::::::::::::::::::::::::::::::::::::::
  74. For a sample of size 500: mean
  75. canada.bit using bits 4 to 27 1.988
  76. duplicate number number
  77. spacings observed expected
  78. 0 65. 67.668
  79. 1 146. 135.335
  80. 2 123. 135.335
  81. 3 98. 90.224
  82. 4 44. 45.112
  83. 5 15. 18.045
  84. 6 to INF 9. 8.282
  85. Chisquare with 6 d.o.f. = 3.34 p-value= .235347
  86. :::::::::::::::::::::::::::::::::::::::::
  87. For a sample of size 500: mean
  88. canada.bit using bits 5 to 28 1.908
  89. duplicate number number
  90. spacings observed expected
  91. 0 87. 67.668
  92. 1 134. 135.335
  93. 2 115. 135.335
  94. 3 97. 90.224
  95. 4 44. 45.112
  96. 5 19. 18.045
  97. 6 to INF 4. 8.282
  98. Chisquare with 6 d.o.f. = 11.39 p-value= .923025
  99. :::::::::::::::::::::::::::::::::::::::::
  100. For a sample of size 500: mean
  101. canada.bit using bits 6 to 29 2.112
  102. duplicate number number
  103. spacings observed expected
  104. 0 55. 67.668
  105. 1 121. 135.335
  106. 2 146. 135.335
  107. 3 103. 90.224
  108. 4 47. 45.112
  109. 5 24. 18.045
  110. 6 to INF 4. 8.282
  111. Chisquare with 6 d.o.f. = 10.80 p-value= .905169
  112. :::::::::::::::::::::::::::::::::::::::::
  113. For a sample of size 500: mean
  114. canada.bit using bits 7 to 30 1.944
  115. duplicate number number
  116. spacings observed expected
  117. 0 64. 67.668
  118. 1 142. 135.335
  119. 2 139. 135.335
  120. 3 93. 90.224
  121. 4 42. 45.112
  122. 5 15. 18.045
  123. 6 to INF 5. 8.282
  124. Chisquare with 6 d.o.f. = 2.74 p-value= .159363
  125. :::::::::::::::::::::::::::::::::::::::::
  126. For a sample of size 500: mean
  127. canada.bit using bits 8 to 31 1.980
  128. duplicate number number
  129. spacings observed expected
  130. 0 64. 67.668
  131. 1 142. 135.335
  132. 2 143. 135.335
  133. 3 78. 90.224
  134. 4 45. 45.112
  135. 5 22. 18.045
  136. 6 to INF 6. 8.282
  137. Chisquare with 6 d.o.f. = 4.11 p-value= .338623
  138. :::::::::::::::::::::::::::::::::::::::::
  139. For a sample of size 500: mean
  140. canada.bit using bits 9 to 32 2.008
  141. duplicate number number
  142. spacings observed expected
  143. 0 68. 67.668
  144. 1 129. 135.335
  145. 2 139. 135.335
  146. 3 93. 90.224
  147. 4 45. 45.112
  148. 5 18. 18.045
  149. 6 to INF 8. 8.282
  150. Chisquare with 6 d.o.f. = .49 p-value= .002076
  151. :::::::::::::::::::::::::::::::::::::::::
  152. The 9 p-values were
  153. .272641 .364408 .994693 .235347 .923025
  154. .905169 .159363 .338623 .002076
  155. A KSTEST for the 9 p-values yields .767290
  156.  
  157. $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
  158.  
  159. Results of DIEHARD battery of tests sent to file canadares.txt
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement