Coin flip simulation still running – 62 days!

The coin flip experiment I described before is still running… so far for 62 days. It is running on a dedicated linux box on my network:

nw@randomlinux$ uname -a
Linux randomlinux 4.9.0-6-amd64 #1 SMP Debian 4.9.88-1 (2018-04-29) x86_64 GNU/Linux

nw@randomlinux:~$ lscpu
Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                4
On-line CPU(s) list:   0-3
Thread(s) per core:    1
Core(s) per socket:    4
Socket(s):             1
NUMA node(s):          1
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 76
Model name:            Intel(R) Atom(TM) x5-Z8350  CPU @ 1.44GHz
Stepping:              4
CPU MHz:               482.695
CPU max MHz:           1920.0000
CPU min MHz:           480.0000
BogoMIPS:              2880.00
Virtualization:        VT-x
L1d cache:             24K
L1i cache:             32K
L2 cache:              1024K
NUMA node0 CPU(s):     0-3

and the updated results are:

  • Trials Completed: 5,008,009
  • Total Coin Flips: 8,604,595,583,786
  • Longest Trial: 2,785,974,537,774
  • Trials Ending in 2 flips: 2,504,265 (50.005%)

Updated breakdown of the percentages of trials completed in N flips, and the corresponding prediction:

length (flips) actual % theoretical %
2 50.005% 50.00%
4 12.503% 12.50%
6 6.244% 6.25%
8 3.903% 3.906%
10 2.736% 2.734%
12 2.062% 2.051%
14 1.610% 1.611%
16 1.316% 1.309%

I’m letting this run until the next power failure terminates the experiment. Unfortunately the little box this is running on is not set up on a UPS. My power typically glitches (short outages) a few times each year (I’ve written about this before) so I don’t know how long to expect this run to get, but as long as it is still running I will keep collecting the data. Let’s hope for no thunderstorms in the hilltop area any time soon.

 

One Reply to “Coin flip simulation still running – 62 days!”

  1. … and, right on cue – huge T-storms came through last night. If you are superstitious you will observe that the storms came literally within 12 hours of my posting “it’s still going”, and later that evening the power failed. So, it is no longer still going.

    I retrieved one more data update after the above posting and before the power failure. At the time it was still working on the 5,008,010th trial, for which it had reached just short of 100 billion flips without getting back to even. Sounds like a lot, but really 100 billion is (as you can see from the other reports) still far from the largest such trial in this experiment. We can’t include this data in any of the results because it hadn’t resolved yet, so the experiment ends with the 5,008,009th trial and with the statistics as reported above.

    Total elapsed time as of that last data update was 5,451,194 seconds, or a little over 63 days.

    Total flips was 8,604,595,583,786 as already reported (not including the 99B flips in the still-active-at-the-time trial) . Including those flips the total was 8704565049807.

    With those flips included we can compute how many flips/second the tiny linux box ran. Note: the elapsed time includes the still-active trial, so we can and should include those flips for this calculation. That works out to 1596817.9 flips per second or about 626 nanoseconds per flip. This is slower than the results I reported in http://neilwebber.com/notes/2018/08/17/random-python-performance-posting/ but those experiments were run on a faster machine (my laptop, lol) versus this long-running experiment was run on a slower box I had sitting around and set up explicitly to run this long-term experiment.

    This pretty much beats the coin-flip topic to death… on to something else for future nerd postings!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.