Foundations to Frontier
Tests
A. Mathematical Foundations › A4 Probability Theory › Theory

The Central Limit Theorem

Why the bell curve is everywhere. Standardized sums of many independent pieces with finite variance become normal, whatever the pieces look like. You will prove it with characteristic functions, quantify the error with Berry–Esseen, use it for confidence intervals, sample sizes and the normal approximation, extend it to vectors and smooth functions (the delta method), and learn when it fails: skewed or heavy-tailed data, small samples, and rare events in the tails.

Level 0: Foundation

★☆☆☆☆ Introductory⏱ 5 minGeneral audience. No mathematics required.

Why heights look like a bell

Your height comes from thousands of small, independent influences: many genes, food, sleep, and so on. Each one pushes a little up or down. Add up lots of small independent pushes and the total almost always makes a bell-shaped curve, whatever each push looks like on its own.

That’s the central limit theorem. Roll one die and every number is equally likely, which is flat. Add 10 dice and the totals pile up in the middle in a bell shape.

Add up anything and you get a bell curve: the central limit theorem
KS distance to N(0,1): 0.059 (Berry–Esseen guarantee ≤ 0.513; with 5000 samples, noise alone is about 0.01) · inside ±1.96: 95.7% (normal: 95%) · skewness 0.81
Blue: histogram of 5000 standardized sums (Sₙ − nμ)/(σ√n). Orange: the N(0,1) density. Symmetric summands look normal by n ≈ 5. Skewed ones (exponential, rare Bernoulli) need much larger n: skewness falls only like 1/√n, which is exactly what Berry–Esseen's ρ/σ³ term measures. Discrete summands give a comb at small n.
Why engineers care

Sensor noise is the sum of many tiny electronic effects, so it’s nearly Gaussian. That’s why Kalman filters assume Gaussian noise. Error bars on any averaged measurement (“37.2 ± 0.4 Wh”) come from the CLT. So does the number of test flights you need to certify a success rate.

📝 Quick check (Level 0)
0/3 answered
  1. 1. Adding many small independent effects gives…
  2. 2. One die is flat. The total of 10 dice is…
  3. 3. Sensor noise is often Gaussian because…

Level 1: Beginner

★★☆☆☆ Basic⏱ 20 minSecondary-school mathematics: arithmetic and elementary algebra.

Statement (Lindeberg–Lévy)

Let X1,X2,…X_1, X_2, \dots be iid with mean μ\mu and finite variance σ2>0\sigma^2 > 0. Then

Zn=Sn−nμσn=n(Xˉn−μ)σ →d N(0,1)Z_n = \frac{S_n - n\mu}{\sigma\sqrt n} = \frac{\sqrt n(\bar X_n - \mu)}{\sigma}\ \xrightarrow{d}\ \mathcal N(0, 1)

meaning P(Zn≤z)→Φ(z)P(Z_n\le z)\to\Phi(z) for every zz. Informally, Xˉn≈N(μ,σ2/n)\bar X_n\approx\mathcal N(\mu, \sigma^2/n) and Sn≈N(nμ,nσ2)S_n\approx\mathcal N(n\mu, n\sigma^2).

The LLN said Xˉn→μ\bar X_n\to\mu. The CLT says how the error is distributed: Gaussian, with width σ/n\sigma/\sqrt n.

Using it

  • Confidence interval: Xˉ±1.96 s/n\bar X\pm1.96\,s/\sqrt n covers μ\mu about 95% of the time.
  • Sample size: n=(zσ/ε)2n = (z\sigma/\varepsilon)^2. A ±3% poll at 95% needs n=1068n = 1068, versus 5556 from Chebyshev (A4.3-4).
  • Normal approximation to the binomial: P(S≤k)≈Φ(k+0.5−npnp(1−p))P(S\le k)\approx\Phi\big(\frac{k + 0.5 - np}{\sqrt{np(1-p)}}\big). The +0.5+0.5 is the continuity correction.
📝 Quick check (Level 1)
0/3 answered
  1. 1. For large n, X̄ₙ is approximately…
  2. 2. The CLT needs the summands to have…
  3. 3. A 95% CLT interval is X̄ ± …

Level 2: Intermediate

★★★☆☆ Intermediate⏱ 45 minUndergraduate students and practising engineers.

How good is the approximation?

The Berry–Esseen theorem bounds the worst-case CDF error:

sup⁡z∣P(Zn≤z)−Φ(z)∣≤Cρσ3n,ρ=E∣X−μ∣3,C≤0.4748\sup_z\lvert P(Z_n\le z) - \Phi(z)\rvert\le\frac{C\rho}{\sigma^3\sqrt n}, \quad \rho = \mathbb E\lvert X - \mu\rvert^3, \quad C\le0.4748

(Shevtsova, 2011). Skewed summands (large ρ/σ3\rho/\sigma^3) converge slowly. For a rare-event Bernoulli with p=0.02p = 0.02, even n=100n = 100 gives a poor approximation. The rule of thumb np(1−p)≥10np(1-p)\ge10 comes from this.

The tails are the weak spot

The CLT controls P(Zn≤z)P(Z_n\le z) additively, with an error of order 1/n1/\sqrt n. But a tail probability like 10−910^{-9} is far smaller than that error, so the CLT says nothing reliable about it. For rare events, use exact computation, Chernoff bounds and large deviations (A4.3-3), or importance sampling (A4.3-1).

Multivariate CLT and the delta method

For iid vectors with covariance Σ\Sigma, n(Xˉn−μ)→dN(0,Σ)\sqrt n(\bar{\mathbf X}_n - \boldsymbol\mu)\xrightarrow{d}\mathcal N(0, \Sigma). For a smooth function gg, the delta method gives

n(g(Xˉn)−g(μ))→dN(0,∇g⊤Σ∇g)\sqrt n\big(g(\bar{\mathbf X}_n) - g(\boldsymbol\mu)\big)\xrightarrow{d}\mathcal N\big(0, \nabla g^\top\Sigma\nabla g\big)

This is how you put error bars on a heading computed from averaged magnetometer readings, a ratio of means, or any estimate that is a smooth function of averages. It’s also first-order uncertainty propagation, the EKF’s covariance update (A4.3-2).

🐍 Exercise 1: watching sums become normal
Standardize sums of Exp(1) variables and measure their KS distance to N(0,1) at n = 1, 4, 16, 64 (roughly a 1/√n rate). Check the 95% band for uniform sums, and find where 95% CLT intervals are honest (n = 200) and where they under-cover (n = 5, skewed data).
📝 Quick check (Level 2)
0/3 answered
  1. 1. Berry–Esseen's error bound shrinks like…
  2. 2. Can the CLT be trusted for P(Zₙ > 6)?
  3. 3. The delta method's asymptotic variance is…

Level 3: Advanced

★★★★☆ Advanced⏱ 45 minGraduate level, with full derivations and proofs.

Proof via characteristic functions

Assume μ=0\mu = 0 and σ=1\sigma = 1. Let φ\varphi be the characteristic function of XX.

  1. Taylor expansion. Since EX2<∞\mathbb EX^2<\infty, φ\varphi is twice differentiable with φ(0)=1\varphi(0) = 1, φ′(0)=0\varphi'(0) = 0 and φ′′(0)=−1\varphi''(0) = -1. So φ(s)=1−s22+o(s2)\varphi(s) = 1 - \frac{s^2}2 + o(s^2) as s→0s\to0.
  2. Characteristic function of the sum. By independence, φZn(t)=φ(t/n)n=(1−t22n+o(1/n))n\varphi_{Z_n}(t) = \varphi(t/\sqrt n)^n = \big(1 - \frac{t^2}{2n} + o(1/n)\big)^n.
  3. Take the limit. (1+an/n)n→ea(1 + a_n/n)^n\to e^a when an→aa_n\to a, so φZn(t)→e−t2/2\varphi_{Z_n}(t)\to e^{-t^2/2}, the N(0,1) characteristic function.
  4. Conclude. Lévy’s continuity theorem (A4.3-3) turns convergence of characteristic functions into convergence in distribution. ∎

Beyond identical distributions: Lindeberg

For independent, non-identical summands with sn2=∑σi2s_n^2 = \sum\sigma_i^2, the CLT holds if no single term dominates. Formally, Lindeberg’s condition 1sn2∑iE[(Xi−μi)21{∣Xi−μi∣>εsn}]→0\frac1{s_n^2}\sum_i\mathbb E\big[(X_i - \mu_i)^2\mathbf 1\{\lvert X_i - \mu_i\rvert > \varepsilon s_n\}\big]\to0. This is why aggregate noise is Gaussian even when its sources differ, and why one dominant error source spoils it.

When it fails

  • Infinite variance: sums of Pareto(α<2\alpha<2) or Cauchy variables converge to stable distributions, with heavy tails and scaling n1/αn^{1/\alpha} instead of n\sqrt n.
  • Strong dependence: long-memory processes can change the rate.
  • Dominant term: one large component in an otherwise small sum.
Exercise 3.1: Why does the third cumulant control the speed?

log⁡φZn(t)=−t22+κ3(it)36σ3n+O(1/n)\log\varphi_{Z_n}(t) = -\frac{t^2}2 + \frac{\kappa_3(it)^3}{6\sigma^3\sqrt n} + O(1/n). The first correction to the Gaussian is proportional to the skewness κ3/σ3\kappa_3/\sigma^3 divided by n\sqrt n. That’s the Edgeworth expansion. Symmetric summands have κ3=0\kappa_3 = 0, so their error is O(1/n)O(1/n) (Practice Code 4).

📝 Quick check (Level 3)
0/3 answered
  1. 1. The CF proof uses φ(t/√n)ⁿ → …
  2. 2. Lindeberg's condition says…
  3. 3. Sums of Cauchy variables converge (after scaling) to…

Level 4: Expert

★★★★★ Expert⏱ 45 minResearchers: original papers and open problems.

Error bars on a magnetometer heading

A robot estimates its heading from 50 averaged magnetometer readings, θ^=atan2⁡(mˉy,mˉx)\hat\theta = \operatorname{atan2}(\bar m_y, \bar m_x). The readings have correlated noise Σ\Sigma. The multivariate CLT plus the delta method give Var⁡θ^≈∇θ⊤Σ∇θ/n\operatorname{Var}\hat\theta\approx\nabla\theta^\top\Sigma\nabla\theta/n, with ∇atan2⁡=(−my,mx)/∥m∥2\nabla\operatorname{atan2} = (-m_y, m_x)/\lVert m\rVert^2. The resulting 95% interval has the right coverage. The same calculation gives error bars for any sensor-derived quantity: range from time of flight, ratios of power readings, or a calibration fit.

🐍 Exercise 2 (research): delta-method error bars and Berry–Esseen
Simulate 6000 robots, each averaging 50 correlated 2-D magnetometer readings to estimate heading. Check that the delta-method variance ∇θᵀΣ∇θ/n matches simulation, that the 95% interval covers, and that Cov(mean) = Σ/n. Then verify the Berry–Esseen bound against the exact binomial CDF for skewed Bernoulli(0.1) sums.

The CLT in AI, robotics and aerospace

  • Gaussian noise models. Kalman filters, least squares and Gaussian processes assume Gaussian errors. The CLT is the physical justification: thermal noise, quantization and many small disturbances add up. Where one effect dominates (multipath, outliers), robust models are needed (A4.2-6).
  • SGD noise. A minibatch gradient is an average, so its noise is approximately Gaussian with covariance Σ/B\Sigma/B. This underlies SDE models of SGD and the link between learning rate, batch size and generalization (Mandt, Hoffman and Blei, 2017). Heavy-tailed gradient noise has been observed too (Şimşekli et al., 2019), a reminder of the CLT’s conditions.
  • A/B tests and policy comparison. Confidence intervals for success rates and returns come from the CLT, with the bootstrap as a check (Efron, 1979).
  • Wide neural networks. At initialization, a wide layer’s pre-activations are sums of many independent terms, so a network becomes a Gaussian process as its width grows (Neal, 1996; Lee et al., 2018).
  • Monte Carlo dispersion analysis for spacecraft entry and landing reports mean ± k·sd footprints. Those are CLT statements about the averages. The tails of the footprint itself need far more runs or rare-event methods.

References

  1. R. Durrett (2019). Probability: Theory and Examples, 5th ed., Ch. 3. Cambridge University Press.
  2. P. Billingsley (1995). Probability and Measure, 3rd ed., Sec. 27. Wiley.
  3. J. W. Lindeberg (1922). “Eine neue Herleitung des Exponentialgesetzes in der Wahrscheinlichkeitsrechnung.” Mathematische Zeitschrift, 15.
  4. A. C. Berry (1941). “The accuracy of the Gaussian approximation to the sum of independent variates.” Transactions of the AMS, 49(1); C.-G. Esseen (1942), Arkiv för Matematik, 28A.
  5. I. Shevtsova (2011). “On the absolute constants in the Berry–Esseen type inequalities for identically distributed summands.” arXiv:1111.6554.
  6. A. van der Vaart (1998). Asymptotic Statistics, Ch. 2–3 (the delta method). Cambridge University Press.
  7. S. Mandt, M. Hoffman, D. Blei (2017). “Stochastic gradient descent as approximate Bayesian inference.” JMLR, 18.
  8. U. Şimşekli, L. Sagun, M. Gürbüzbalaban (2019). “A tail-index analysis of stochastic gradient noise in deep neural networks.” ICML.
  9. R. Neal (1996). Bayesian Learning for Neural Networks. Springer; J. Lee et al. (2018), “Deep neural networks as Gaussian processes,” ICLR.
  10. B. Efron (1979). “Bootstrap methods: another look at the jackknife.” Annals of Statistics, 7(1).