Statistics ยท medium

Explain the Central Limit Theorem and why it matters.

Asked in Data Scientist interviews, in the Statistics round.

Short answer

Sample means approach normality as n grows, enabling inference regardless of population shape.

The distribution of the sample mean becomes normal as n grows One skewed population Take means Distribution of the sample mean n = 2 n = 10 n = 30
The population stays skewed. The distribution of its mean does not.

How to answer it

Definition

The average of many independent draws is approximately normally distributed, whatever the shape of the population it came from, once the sample is large enough. The mean of that bell curve is the population mean, and its standard deviation is the standard error.

The subtle part, and the part interviewers listen for, is what the theorem is about. It is not a claim that data becomes normal. It is a claim about the distribution of a statistic computed from the data.

Formula

mean(sample mean) = mu                   the population mean
sd(sample mean)   = sigma / sqrt(n)      the standard error

The sqrt(n) is the practical headline: to halve your uncertainty you need four times the data, not twice. That single fact drives most sample-size conversations.

Example

import numpy as np
rng = np.random.default_rng(0)

pop = rng.exponential(scale=50, size=1_000_000)          # heavily skewed
means = [rng.choice(pop, 200).mean() for _ in range(5_000)]

print(round(np.mean(means), 2), round(np.std(means), 2))

Output

50.02 3.53          # centred on the population mean of 50, and
                    # 50 / sqrt(200) = 3.54, exactly as predicted

The population here is exponential, which looks nothing like a bell. The 5,000 sample means do.

Why it matters

This is the licence to use normal-theory tools on data that is not normal. A confidence interval, a t-test, a z-score and the standard error behind every A/B test all assume the estimate is normally distributed, not that the raw values are. The theorem is what makes that assumption safe.

Revenue per user is the example worth having ready. It is wildly skewed: most users spend nothing and a few spend enormously. You still compare average revenue per user between two groups with a t-test, and it is valid, because the average across thousands of users is close to normal even though no individual user is.

When it does not save you

Key points

FAQ

The 30-second answer

The central limit theorem says the average of a large enough sample is approximately normally distributed, whatever the underlying data looks like. Its mean is the population mean, and its spread is the standard error, sigma over root n.
Why it matters is that it is what lets me put a confidence interval on a mean, or run a t-test, without knowing the population's distribution. Revenue per user is the example I would give: it is heavily skewed, most users spend nothing, but the average across ten thousand users is close to normal, so a t-test on that average is valid.
The two caveats I would flag are that thirty observations is far too few for something that skewed, and that it assumes independent draws, which repeated measurements of the same user break.

In the interview

Practice this for real