The central limit theorem
Why the average of many independent variables is nearly normal, where the $\sqrt n$ scale comes from, error bars, the normal approximation to the binomial with the continuity correction, the rate of convergence, and when the theorem fails.
What the law left out
The topic The law of large numbers showed where an average goes: . It also told us how far off the average typically is. For i.i.d. terms with variance the variances add, so
and usually misses by something of the order of . This number is the standard error.
What the law does not tell us is the shape of the misses. Chebyshev's inequality only promises that a miss of two standard errors or more has probability at most . In practice such a miss happens about once in twenty runs. To turn "about " into honest probabilities, we need the whole distribution of , not just its mean and variance.
Dice show what that distribution looks like. One fair die is flat: each face has probability . The sum of two dice is a triangle with its peak at 7, because the distribution of a sum of independent variables is the convolution of theirs (see the topic Joint distributions and independence). Three dice already give a rounded hump, and ten dice give something very close to a bell. Coins, waiting times and per-example losses do the same. This topic explains why, how fast, and when it breaks.
The theorem
Let be i.i.d. with mean and finite variance . Write for the sum and for the average. Subtract the mean of the average and divide by its standard error:
This standardized average has mean and variance for every , so only its shape can still change. Let be the CDF of . The central limit theorem (CLT) says that for every
Undoing the standardization gives the working form. For large
The assumptions are independence, identical distribution and a finite variance. Nothing is assumed about the shape: the terms may be discrete or continuous, symmetric or skewed. A single waiting time is strongly skewed. Yet the largest gap between the CDF of and is for one term, for two, for five and for thirty.
This is why the normal distribution is everywhere in ML. The error rate of a classifier on a test set, an average validation loss, a click count in an A/B test: each is a sum of many independent pieces, so each is nearly normal whatever the pieces look like.
Convergence in distribution
The CLT says nothing about the values of , only about its CDF. This kind of convergence has its own name. A sequence converges in distribution to if
at every point where the CDF of is continuous. (The exception matters only for jumps: the constants converge to , yet for every , while .)
The topic The law of large numbers met two stronger kinds: convergence in probability and almost surely. Each of them implies convergence in distribution, and not the other way round. Convergence in distribution is the weakest because it never compares the variables themselves. Take and for every . By symmetry each has exactly the distribution of , so in distribution. But never shrinks.
The standardized averages behave the same way. does not settle on any particular value as data arrives: the correlation of and is for every . What settles is the histogram of the values could take.
Why root n, and why the bell
Why divide by ? The centred sum has mean and variance . Divide it by , and the variance becomes
With we get , whose variance goes to : the law of large numbers, everything collapses to a point. With the spread grows without bound. Only keeps the spread fixed, and that is the only scale on which a shape can be seen.
Why the bell? Split terms into two halves of . Each half gives its own standardized average, and , and they are independent. A short computation shows
So if the shape of settles down, the limit must survive "add two independent copies and divide by ". The normal does: for independent the sum is normal with variance (see the topic The multivariate Gaussian), and is again. Among distributions with a finite variance it is the only one. A full proof uses characteristic functions and is beyond this course.
Every doubling also dilutes whatever made the terms special. The skewness of a sum of terms is the skewness of one term divided by : for it falls from to at . Discreteness and bounded support fade the same way. Only and survive, because the standardization uses them.
Error bars
The CLT turns the standard error into probabilities. For , . Since ,
The interval is the usual 95% error bar. Chebyshev's inequality would need standard errors for the same guarantee, a bar times wider. Chebyshev holds for every ; the CLT is an approximation, but a much sharper one.
An accuracy is an average of / indicators, so . The true is unknown, and we plug in the observed accuracy; the topic Confidence intervals and the bootstrap will justify this. A classifier that scores on independent test examples has the error bar
An A/B test compares two averages. Say the conversion rates are and , with users in each group. The groups are independent, so the variances add, and the difference has standard error
The observed difference is standard errors from zero. Whether that is convincing is the subject of the topic Hypothesis tests and A/B testing.
The binomial as a normal
A binomial count is a sum of independent indicators, so the CLT applies to it directly:
This is the de Moivre–Laplace theorem from the 18th century, the first version of the CLT.
Take flips of a fair coin and the event " heads or more". The mean is and the standard deviation . The exact probability is . The plain approximation is noticeably off. The reason is that a count lives on integers: the value is a bar of width that covers . Starting from the left edge of that bar,
which almost removes the error. This shift by half a unit is the continuity correction, standard for counts.
The approximation needs the count to be far from its walls at and . A common rule of thumb asks for and of at least about . For the mean is , , and the corrected normal gives . For rare events the Poisson approximation from the topic Discrete distributions is the right tool.
How fast
The theorem is a limit, and is always finite. How wrong is the normal at a given ? The Berry–Esseen theorem bounds the worst gap between the CDFs:
In words: the error falls like , and its size is set by one number that grows with asymmetry and heavy tails. For a fair coin that number is . For it is about , and for a rare event with it is almost .
The exponential sums from the first block follow this law closely. Their gaps , , , at are all close to .
The tails converge slowest. For a sum of exponentials , while the normal says : a 40% relative error, although the bell near the centre already looks perfect. So the popular " is enough" is not a theorem. How large must be depends on the distribution of the terms and on which probability you need.
When the theorem fails
The theorem has conditions, and each of them can fail in practice.
Infinite variance. The Cauchy distribution with density has tails so heavy that neither its mean nor its variance exists. The average of standard Cauchy variables is again standard Cauchy: averaging does not help at all. Tails like with have a finite mean but an infinite variance. Their sums do settle after centring, but the scale is instead of , and the limit is a heavy-tailed stable distribution, not the normal.
One term dominates. For independent terms that are not identically distributed, the CLT still holds as long as no single term carries a noticeable share of the total variance (the Lindeberg condition). A sum of one huge measurement error and many small ones has the shape of the huge one.
Dependence. Several test examples from the same user, several pages from the same document: such data are clustered. The effective number of independent observations is smaller than , and the real standard error is larger than . Weakly dependent sequences, such as the Markov chains later in the course, still obey a CLT, but with a larger variance.
Not a sum. The theorem is about sums and averages. The maximum of variables, for example, tends to an extreme-value distribution, not to the normal.
This closes the probability half of the course. So far the distribution was known, and we asked how averages of its samples behave. Statistics turns the question around: given the data, what can we say about the unknown distribution? The average is already our first estimator of , and the CLT describes its error. The next topic, Estimators: bias and variance, asks what makes an estimator good in general, and measures it with bias, variance and mean squared error.
Check your understanding
The same questions as in Pulse. Answers are shared between modes.
Go deeper — optional
Code and labs do not count toward the main percentage or the certificate.
- CLT histogram of sample meansoptional
Sample means of size n; match std to σ/√n and a Normal shape.
~20 min · easier on a computer · The matching course topic has been read.
Self-check in the notebook — not part of mastery or the certificate.
Answers are saved on the server and tied to this browser until you sign in.