Skip to content

Instantly share code, notes, and snippets.

@jfbu
Created May 7, 2018 07:06
Show Gist options
  • Save jfbu/cb749b2bcb96e812dddc95a94fcb0abc to your computer and use it in GitHub Desktop.
Save jfbu/cb749b2bcb96e812dddc95a94fcb0abc to your computer and use it in GitHub Desktop.
Typical outputs of RNGwalkhighbit.py
>>> test_highbit_tex(12345, 100000, 129)
TeX with seed 12345 and runs of length 129
skipping first 54
{0: 49272, 1: 50728}
TeX: observed probability of more 1s after 100000 batches of 129 is 0.50728
Power_divergenceResult(statistic=21.19936, pvalue=4.1390270194375e-06)
>>> test_highbit_py(82297, 100000, 129)
Python with seed 82297, runs of length 129, 100000 times
{0: 50120, 1: 49880}
Python: observed probability of more 1s after 100000 batches of 129 is 0.4988
Power_divergenceResult(statistic=0.576, pvalue=0.44788447826411193)
>>> test_highbit_tex(9918, 100000, 119)
TeX with seed 9918 and runs of length 119
skipping first 54
{0: 49406, 1: 50594}
TeX: observed probability of more 1s after 100000 batches of 119 is 0.50594
Power_divergenceResult(statistic=14.11344, pvalue=0.0001721096492646283)
>>> test_highbit_py(63671, 100000, 119)
Python with seed 63671, runs of length 119, 100000 times
{0: 49850, 1: 50150}
Python: observed probability of more 1s after 100000 batches of 119 is 0.5015
Power_divergenceResult(statistic=0.9, pvalue=0.34278171114790873)
>>>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment