Statistics Central Limit Theorem

The Central Limit Theorem explains why the average of many random samples tends to follow a normal (bell-shaped) distribution, even when the original data does not.

What the Central Limit Theorem Says

The Central Limit Theorem (CLT) says that if you repeatedly draw random samples of a reasonable size from almost any population and calculate each sample's average, those averages will cluster into a bell-shaped (normal) distribution - even if the original population itself is lopsided, skewed, or oddly shaped.

  • The individual observations in each sample are drawn independently of one another
  • The sample size is reasonably large (a common rule of thumb is n >= 30, though heavily skewed data may need more)
  • The population has a finite variance (its spread isn't infinite or undefined)

Seeing It in Action

Imagine a population of monthly bonus payouts that is heavily skewed: most employees get a small bonus, but a few get a huge one. A single employee's bonus tells you almost nothing about the group. But if you repeatedly draw random samples of 30 employees and average each sample, those sample averages behave far more predictably than any single bonus does - and their distribution starts to look normal.

Example

import random

# A population that is clearly NOT normal: a skewed set of values
population = [1, 1, 1, 2, 2, 3, 10, 15, 20, 50]

# Draw many samples of size 30 (with replacement) and record their means
sample_means = []
for _ in range(1000):
    sample = [random.choice(population) for _ in range(30)]
    sample_means.append(sum(sample) / len(sample))

avg_of_means = sum(sample_means) / len(sample_means)
print("Average of the 1000 sample means:", round(avg_of_means, 3))
Note: The remarkable part of the CLT is that it doesn't care what the original population looks like - skewed, bimodal, or uniform. As long as the samples are large enough and independent, the distribution of sample means still trends toward normal.

Standard Error of the Mean

The spread of that distribution of sample means is called the standard error, and it shrinks as your sample size grows: standard error = population standard deviation / sqrt(n). This is why averaging over more data points gives a more stable, less noisy estimate - though the normal approximation from the CLT is weaker for very small samples or heavily skewed data, which is why n >= 30 is treated as a rough guideline rather than a strict cutoff.

Example

import math

def standard_error(pop_std, n):
    return pop_std / math.sqrt(n)

pop_std = 12.5
for n in [10, 30, 100, 400]:
    print(n, round(standard_error(pop_std, n), 3))
Sample Size (n)Standard Error
103.953
302.282
1001.250
4000.625
  1. Identify the population and confirm you can treat observations as independent
  2. Decide on a sample size, leaning larger if the underlying data looks skewed
  3. Compute the sample mean from your data
  4. Estimate the standard error using the population (or sample) standard deviation divided by sqrt(n)
  5. Use the normal distribution to make probability statements about the sample mean

Exercise: Statistics Sampling

What is simple random sampling?