Exercise 3 solution import random def dominant_fraction(n, seed): rng = random.Random(seed) dom = sum(1 for _ in range(n) if "A" in rng.choice("Aa") + rng.choice("Aa")) return dom / n for n in (8, 80, 800, 8000, 80000): fr = [dominant_fraction(n, s) for s in range(5)] worst = max(abs(f - 0.75) for f in fr) print(n, [round(f, 3) for f in fr], "worst miss", round(worst, 3)) Output (seeds 0 to 4, so it is repeatable; a different seed gives different decimals but the same pattern): 8 [0.625, 0.625, 0.75, 0.625, 1.0] worst miss 0.25 80 [0.8, 0.762, 0.738, 0.725, 0.775] worst miss 0.05 800 [0.757, 0.738, 0.749, 0.741, 0.748] worst miss 0.012 8000 [0.755, 0.751, 0.748, 0.741, 0.746] worst miss 0.009 80000 [0.75, 0.751, 0.747, 0.749, 0.751] worst miss 0.003 Reading it: with 8 offspring the fraction swings from 0.625 to 1.0, so a single small family tells you little. By 80,000 every run is within 0.003 of 0.75. Chance never disappears; it just matters less as the sample grows. This is why Mendel's large counts mattered.