5/32
Part 2 of 6 · ChanceLearn and do
The test asks how often chance alone makes a gap this big
With no real difference, the gap still moves from run to run. This code shows how far.
import random
from statistics import pstdev
rng = random.Random(1)
n, rate = 2000, 0.1125
gaps = [rng.binomialvariate(n, rate) - rng.binomialvariate(n, rate)
for _ in range(100_000)]
share = sum(abs(g) >= 50 for g in gaps) / len(gaps)
print(f"spread of the gap: {pstdev(gaps) / n:.4f}")
print(f"gaps of 50 users or more: {share:.2%}")
Both pages convert at 11.25%, with 2,000 users each. How often does chance alone make a gap of 2.5 points or more?
Pick one to see what it prints.
Pick an answer above to see the rest