10 The Central Limit Theorem
Presents the CLT honestly — as a theorem with conditions, not a law of nature:
def sum_of_n(sample_fn, n):
return sum(sample_fn() for _ in range(n))
def clt_experiment(sample_fn, n, trials=5000):
return [sum_of_n(sample_fn, n) for _ in range(trials)]Run with a Gaussian generator, the histogram of sums looks Gaussian, as expected. Run with a Pareto generator at alpha < 2, the histogram of sums converges to something with heavier tails than a Gaussian — a stable distribution, the CLT’s less-famous generalization. The chapter frames the Generalized CLT not as an advanced footnote but as the natural, expected answer once you’ve accepted that variance doesn’t always exist.