White RoomNEW

Where The CLT Stops

Each family below is sampled 300 times at two sample sizes, and the script prints the standard deviation of those 300 sample means multiplied by n\sqrt{n}. When the CLT applies, that product estimates the family's own standard deviation, so it should settle down as nn grows.

import math, random, statistics

def cauchy():    return math.tan(math.pi * (random.random() - 0.5))
def pareto():    return random.paretovariate(3.0)
def lognormal(): return math.exp(random.gauss(0.0, 1.0))
def rare():      return 1.0 if random.random() < 0.01 else 0.0

for name, draw in [("cauchy", cauchy), ("pareto", pareto),
                   ("lognormal", lognormal), ("rare", rare)]:
    for n in (100, 10_000):
        means = [sum(draw() for _ in range(n)) / n for _ in range(300)]
        print(name, n, round(statistics.pstdev(means) * math.sqrt(n), 2))

One run printed:

cauchy 100 1131.24
cauchy 10000 2294.34
pareto 100 0.88
pareto 10000 0.87
lognormal 100 2.11
lognormal 10000 1.94
rare 100 0.11
rare 10000 0.1

For exactly one of these families the sample mean never becomes approximately normal, however large nn gets. Which one?

Answer format: type the function name exactly as it appears in the code.