Central Limit Theorem
The magic theorem of statistics that guarantees sample means tend toward a Gaussian distribution regardless of original population shape.
What the CLT states
Let X_1, X_2, ..., X_N be N i.i.d. random variables with mean μ and finite variance σ².
As sample size N → ∞, the sum S_N = ∑ X_i and the sample mean X̄_N = 1/N ∑ X_i converge in distribution to a Normal distribution:
X̄_N ~ N( μ, σ² / N )
Standardizing the sample mean gives the standard Normal variable Z:
Z = ( X̄_N - μ ) / ( σ / √N ) ~ N( 0, 1 )
Notice the key insight: The original variables X_i can follow any distribution (Uniform, Exponential, Bernoulli, Poisson). Their sample mean X̄ will still form a bell curve for large N.
Rule of 30 & standard error shrink
- Rule of Thumb:
N ≥ 30is traditionally considered large enough for smooth bell-curve convergence on moderately skewed distributions, though heavy skew requiresN > 1,000. - Standard Error:
SE = σ / √N. To halve your uncertainty (margin of error), you must quadruple your sample sizeN.
Population (Exponential / Skewed) ──► Take Sample Means (N=50) ──► Distribution of X̄ (Gaussian)
║ ░░▒▒▓▓██▓▓▒▒░░
╚═══════════════════════════════════════════════════════════════════════════════════════╝
CLT in ML & Experimentation
- A/B Testing: Conversion rates are binary (0/1). By CLT, sample conversion rate
p̂ = X / Nis asymptoticallyN(p, p(1-p)/N), enabling Z-tests. - Confidence Intervals: 95% Confidence Interval for mean
μisX̄ ± 1.96 · (σ / √N). - Linear Regression: Standard errors and p-values of OLS weights
βrely on CLT for asymptotic normality when residuals are non-Gaussian in large samples.
Say this out loud
"The Central Limit Theorem guarantees that the sample mean of independent random variables approaches a Normal distribution N(μ, σ²/N) as sample size grows, regardless of the population's original shape. In A/B testing and ML, CLT lets us construct valid confidence intervals and run Z-tests on non-Gaussian user logs because sample averages of binary or skewed events converge to a bell curve."
Follow-ups to expect
- What distributions violate the Central Limit Theorem? Heavy-tailed distributions with infinite variance (e.g. Cauchy distribution, Pareto with α ≤ 2).
- What is the difference between Law of Large Numbers (LLN) and CLT? LLN states where the sample mean goes (it converges to population mean μ). CLT states how it gets there (the distribution of errors around μ forms a Gaussian bell curve).
- How does sample size N impact statistical power in A/B tests? Larger N shrinks standard error SE = σ/√N, narrowing confidence intervals and making it easier to detect small treatment effects (higher power).
Check yourself
Why is the Central Limit Theorem critical for evaluating A/B test sample metrics like Click-Through Rate (CTR)?