Definition
The central limit theorem (CLT) is a theorem of probability theory about averages. Take independent observations that all follow one probability distribution with a finite, positive variance §11.14, the average squared distance from the mean. As their number grows, the distribution of their average, centered on the true mean and divided by its standard error §11.15 (the standard deviation of the average), approaches the standard normal distribution: the symmetric bell curve with mean 0 and standard deviation 1. The theorem describes a limit; it does not say how many observations are enough.
The idea
Single response times §9.32 are usually skewed: most are short, and a few are very long. Yet the average of 1000 response times, recomputed on fresh data many times, varies in a narrow, nearly symmetric, bell-shaped way. That is why the recipe ‘mean plus or minus 1.96 standard errors’ gives an approximate 95% confidence interval §11.18 for a large sample even when the data themselves are far from bell-shaped.
Dice show the mechanism. One die gives each value from 1 to 6 with probability : a flat distribution. The sum of two dice is no longer flat. A sum of 7 arises in 6 of the 36 equally likely ways, and 2 and 12 in one way each. With more dice, the middle sums arise in far more ways than the extreme ones, because an extreme sum needs every die to be extreme in the same direction, while a middle sum lets high and low values offset each other. The shape of the sum becomes a bell. The CLT says that this happens for sums of independent observations from any distribution with a finite, positive variance, and that the limiting bell is always the same normal curve once the sum is centered and scaled.
How it works
Write for observations and for their sample mean §11.12.
Assume a model. The basic theorem assumes that the observations are independent and identically distributed §11.5 (IID): learning any subset of the readings leaves the joint probabilities for the remaining readings unchanged, and each reading follows the same distribution with mean and standard deviation , where .
Exact facts for every . With these assumptions, the sample mean has mean and standard deviation , its standard error. These two facts need no limit.
Standardize. Subtract the mean and divide by the standard error: . For every , has mean 0 and standard deviation 1.
Take the limit. The CLT states that the shape of the distribution of approaches the standard normal shape as grows.
Use it as an approximation. At a finite , one acts as if were exactly standard normal. A standard normal value lies between and with probability 0.95, which gives the interval ; in practice is replaced by the sample standard deviation. How good the approximation is at the actual is a separate question, which the limit does not answer.
Other versions of the theorem allow observations with different distributions, provided that no single observation dominates the sum (the Lindeberg condition), or allow weak dependence between observations. Each version states its own conditions, and with dependence the variance of the mean also depends on how the observations vary together.
Worked example
An observation, in milliseconds, is 0 with probability 0.99 and 100 with probability 0.01, like a response time that is usually negligible but occasionally hits a long stall, a burst. Its mean is ms. Its variance is , where is the probability-weighted average of the squared value. So ms, which is finite and positive: the CLT applies as grows.
Take observations, a size often quoted as large enough. The standard error is ms. The sample mean depends only on the number of bursts in the sample: . No burst has probability ; exactly one burst has probability ; exactly two, about 0.033. So the sample mean is exactly 0 ms in about 74% of samples, 3.33 ms in about 22% and 6.67 ms in about 3%. The normal approximation instead describes a smooth, symmetric spread around 1 ms. Let be the probability that a standard normal value is at most . The approximation puts the sample mean at or below 0 with probability . The true probability is 0.74.
Because the sample mean is a fixed multiple of the burst count, the normal shape appears only as the expected number of bursts per sample, , grows: it is 0.3 at and 10 at . Rarer bursts push the requirement further. With burst probability 0.0001, a sample of contains no burst at all with probability .
Stated precisely
Lindeberg–Lévy central limit theorem. Let be independent random variables, numerical outcomes of a random experiment, with one common distribution, mean and variance , where . Let be the mean of the first , let , and let be the probability that a standard normal random variable is at most . Then for every real number , This kind of convergence, of the probabilities , is called convergence in distribution.
The Berry–Esseen theorem bounds the error at a finite when, in addition, is finite: for every , where is a constant, the same for all distributions, proved to be less than 0.48. The bound shrinks like , but it grows with , which measures how lopsided and heavy-tailed the distribution is. For the burst example, and , so . At the guaranteed error is only below , which guarantees nothing useful.
No sample size works for every distribution with finite variance. For any fixed , choose the burst probability so small that a sample contains no burst with probability close to 1. The sample mean is then almost always 0, far from a normal shape, although the variance is finite.
Limits and common mistakes
The CLT is about the average, not the data. The individual observations stay exactly as skewed as they were; a large sample shows their skew more clearly, not less.
Infinite variance breaks the basic theorem. For the Cauchy distribution, a bell-shaped distribution with tails so heavy that it has no mean, the average of independent observations has exactly the same distribution as one observation, for every . Other distributions whose variance is infinite need a different scaling, and their averages in general approach limits that are not normal.
Suppose each of the observations has variance . The variance of their mean is Covariance §15.44 measures whether two observations tend to move together or in opposite directions. Suppose the first reading is equally likely to be 1 or -1. If the second repeats it, their mean still has variance 1. If the second is its opposite, their mean is always 0. Treating the readings as independent would give variance in both examples. Repeated trials on one board can estimate variation within that board. Counting them as independently sampled boards is pseudoreplication §11.6: they give no direct evidence of variation across boards. When conditions change, the expected sample mean averages the means of the sampled conditions. Those means may agree even when the distributions differ.
The CLT leaves bias untouched. It centers the average on the mean of what is measured, so an instrument that adds a constant offset produces a bell centered on the wrong value. The law of large numbers §15.46 entry treats this.
The Berry–Esseen error is an absolute error, so it can exceed a small tail probability itself. An absolute error bound of 0.01 is about 3.3 percent of a probability of 0.3, but ten times a probability of 0.001. The latter bound cannot establish even the order of magnitude of the tail probability.
The theorem concerns means and sums. The median §11.13 and high percentiles §11.16 have their own large-sample rules. The rule of thumb ‘30 observations are enough’ is not a theorem. Methods such as the bootstrap, which resamples the observed data, avoid assuming a normal shape, but they also need samples that represent the tail.
Questions answered
Why is there no universal sample size that makes every skewed measurement normal enough?
There is no universal sample size because how fast the average approaches the normal bell curve depends on the shape of the distribution being averaged and on the accuracy needed, and the shape can be made as unfavorable as one likes. The central limit theorem (CLT) only states a limit as the sample size grows. The Berry–Esseen theorem bounds the error at a given sample size by a constant times , where is the standard deviation and the average cubed distance from the mean; the ratio is large for lopsided, heavy-tailed data and has no upper limit.
A rare burst shows it. An observation that is 0 with probability 0.99 and 100 with probability 0.01 has finite variance, yet a sample of 30 contains no burst with probability , so its mean is exactly 0 in 74% of samples, nothing like a bell curve. For any fixed , a small enough burst probability makes almost every sample burst-free. Dependence between observations and changing conditions make matters worse. So check whether the observations are really independent, look at the tail, and choose an uncertainty method that fits the process instead of a fixed count.
Related entries: Independent and identically distributed samples (§11.5), Pseudoreplication (§11.6), Standard error (§11.15), Confidence interval (§11.18), Law of large numbers (§15.46), Bootstrap (§11.19), Latency distribution and tail (§11.36).