4 ms·
Each voter picking at random will get you almost exactly 50/50 every time, because the sample size is so large. The expected variance goes with the square root
by mikeash 10y ago
Each voter picking at random will get you almost exactly 50/50 every time, because the sample size is so large. The expected variance goes with the square root of the sample size, so with 100 million voters, you'd expect the outcome of each voter choosing randomly to be about 10,000 off from exactly 50/50.
Here's a quick Python snippet to test it empirically:
print sum(random.randint(0, 1) for x in xrange(0, 100000000))
(I strongly recommend using pypy to run it. CPython takes forever to complete.)
With 8 runs, I got these results:
49995906
50003341
50009287
49996048
49996424
49993962
49989590
50002171
All of which require at least two decimal places in the percentage to be distinguishable from 50% each way.
- foota 10y agoParent is saying if we randomly chose the outcome, not the votes.
- AnimalMuppet 10y agoSure. But why should we expect random percentages to have any relationship to reality? (I would argue that random votes isn't related to reality either...)
- mikeash 10y agoHuh? "than if every voter was picking at random" Sounds like what I showed to me.
- ryanmonroe 10y agoPretty amazing. If the outcome is determined by 100 million independent coin flips, the probability of a margin greater than one tenth of a percent is 1.5e-23. In R n <- 100000000 diff <- 0.1/100 a_wins <- n*(1-diff)/2 b_wins <- n*(1+diff)/2 p1 <- pbinom(a_wins, size = n, prob = 0.5) p2 <- pbinom(b_wins, size = n, prob = 0.5, lower.tail = F) p1 + p2 # = 1.523959e-23