**The Problem**I've seen it argued, repeatedly, that a single spin of 1,024 shares (1,024-in-1,024 chance) is more likely to produce a gem than 1,024 separate one-share spins (1-in-1,024 chance each, 1,024 times). I've repeatedly pointed out that the

law of large numbers, more commonly called the law of averages, states that as the number of identically distributed, randomly generated variables increases, their sample mean (average) approaches their theoretical mean.

In other words, when you roll a standard six-sided die once, you get a number between and including one and six. If you averaged the numbers on the faces of that die, they average to 3.5. If you roll that die enough times and keep averaging the total result, it will over time approach and then become 3.5. That’s the law of large numbers at work.

So when I say that 1,024 one share spins are,

**on average**, as likely to produce a gem as one 1,024 share spin... I'm talking about the law of large numbers.

For my trouble, I've been insulted, accused of incompetence, had someone try to convince me that I believe in the gambler's fallacy (that after you lose a bunch you will soon win). Most insultingly of all I was accused of not being willing to admit when I'm wrong. Me! The guy who obsesses about intellectual honesty. Of all people. Frankly... I'm pissed. And I'm dangerous when I'm pissed.

**The Solution**So, rather than argue theory endlessly, I wrote a program. I simulated both a) over one billion (1,024,000,000) one-share rolls and b) one million (1,000,000) 1,024-share rolls.

It took days to fine tune the app so it wouldn't eat every bit of RAM my system has (16GB) in under a minute. The simulations took approximately 12 hours for the 1-in-1,024 x1,024,000,000 simulation, and ~3.5 hours for the 1,024-in-1,024 x 1,000,000 rolls.

Guess what?

*I was right*. <insert two middle fingers here>

**But Don't Take My Word For It**Here are the results of my test:

1-in-1024 x1024000000.txt1024-in-1024 x1000000.txtAnd again...I did the test repeated 1,024,000,000 times for the first and 1,000,000 times for the second based on the fact that both would have an expected outcome of 1 million wins. Apples to apples.

Don't believe the app works as advertised?

Try it yourself. There's a little setup involved, but there's a lot of techies in this community too. It should run on Windows and Linux (and possibly BSD and Mac as well). Think I did something funny with the code?

The source is on github too for the whole world to see. I've got nothing to hide.

The tests above were done with 1.0.0-rc4

, the gold version unless you guys find a bunch of bugs.

*1.0.0 is now available and is essentially the same as rc4.* It's actually a really simple program, considering, so I don't expect bugs to be an issue. For the more taxing tests (like the 1-in-1,024 x over a billion test) you will need at least 25GB of disk space and at least 2GB of free RAM. Fewer "iterations" mean less disk space required and smaller "chunks" mean less RAM is required. Note that smaller chunks tend to be slower, however.

**The Analysis**The 1,024-in-1,024 rolls all produce exactly 1,000,000 wins each (every simulation was a win, as expected). Even after repeating the simulation a number of times, the 1-in-1,024 chance based rolls never deviated more than 953 wins from the predicted average value, and most were within 100. Now, if 953 wins seems like a lot, remember we're talking about 1,000,953 vs 1,000,000 (less than a 1% difference of the observed versus the expected). It's worth pointing out that my +953 win outlier was in the positive... as in more gems than the average. Sure, you could get 953 gems fewer than the average... but you can also get 953 more than the average.

Let's bring this back to something relevant: none of us are going to spin a billion times. At a max of 24 spins a day (for those of using our home gaming machines and presuming you’re only mining ETH and not the altcoins alongside) it would take 114 years to accumulate that many spins. Assuming Erfworld keeps the mining option with spins as it is for another 10 years, we produce

*an average* of 20 shares every single hour, and we continue rolling for gems for those 10 years, we're all looking at about 1668.75 gems

*on average*. Now, considering the deviation above, that means 1668.75 gems plus or minus 1.5853125 gems. That’s a difference of fewer than two gems over ten years of 24/7 spin accumulation. Two freaking gems! In ten years! And again, that's based on the largest outlier I observed (the worst case in my repeated tests).

**The Exception**One of the people I debated this with who was not a douchebag pointed out that there is an exception. They pointed out that the law of large numbers can be shown 100% accurate if you allow for an infinite number of attempts on the random roll. The observed average will become the expected average in that case. The fewer rolls, the less likely the observed and expected average are to converge. As we only have so many spins a month, the odds are not 100% identical. They might be, but they don’t have to be, just like my simulation didn’t show the exact predicted number but one that was very close. Apparently, this exception happens when you reach "an end." The end can be stopping Mine4Erf altogether or it can be the end of that month's contest.

I remain dubious of this. Dubious in the same way I am dubious of the Monty Hall Paradox. And I accept the Monty Hall Paradox as correct... changing your answer increases your chance of winning. It's just proof human minds suck at understanding the world from a statistical perspective. That goes for this mess here too. It makes no sense to me. But I've seen the proof. And, though my sanity tries to slip every time I give it serious thought, I refuse to deny the evidence.

But here's the thing. It basically affects only one spin in the whole month. One. Out of ~720 (for those of us mining ETH non-stop). And the effect it has on that one spin? A fraction of a fraction of a percent change in likelihood. Your last spin is still _very_ (almost indistinguishable) close to a [number of shares]-in-1,024 chance of producing a gem.

How this could be considered statistically meaningful is another conversation I need to have. ‘Cause it really doesn't seem meaningful to me, but statistics are weird like that.

**Conclusion**In conclusion, the law of large numbers holds up to empirical testing. Suprise!

One must remember that these are averages and probabilities we’re talking about. Yes, it's technically possible to spin one million times at 1,02

**3**-in-1,024 and never get a single gem. Yes, it's also possible to spin 1024 million times at 1-in-1,024 and get 1024 million gems. However, it is ridonkulously unlikely (that's ridiculous squared... for those who don't know). More than likely you would get very close to 999,023 gems in the first case, and very close to 1,000,000 gems in the second...

*on average...* because that's how probability and averages work.

And for those who decided to be insulting assholes: How's yer crow? Tasty? No? Good.