Simulation parameters
Original distribution
Histogram of the base distribution with theoretical density curve
Sampling distribution of the mean
Histogram of the sample means with theoretical normal curve N(μ, σ²/n)
What does the central limit theorem state?
The central limit theorem (CLT) is one of the fundamental results of mathematical statistics. It states that, under general conditions, the distribution of the sum (or the mean) of a large number of independent and identically distributed (i.i.d.) random variables tends to the normal distribution, regardless of the original distribution of the variables.
Formally, let \(X_1, X_2, \ldots, X_n\) be i.i.d. random variables with mean \(\mu\) and finite variance \(\sigma^2 < \infty\). Then the sample mean \(\bar{X}_n = \frac{1}{n}\sum_{i=1}^{n} X_i\) satisfies:
Equivalently, \(\bar{X}_n \approx \mathcal{N}\!\left(\mu,\, \frac{\sigma^2}{n}\right)\) for \(n\) sufficiently large. The speed of convergence depends on the skewness of the original distribution: the more symmetric and "well-behaved" the distribution is, the faster the sample mean converges to normal. The Berry-Esseen theorem quantifies this speed with a uniform bound on the approximation error:
where \(\rho = \mathbb{E}[|X-\mu|^3]\) is the third absolute centered moment and \(C \approx 0.4748\). This implies that distributions with greater skewness require larger samples for the normal approximation to be accurate.
What sample size n does the CLT need?
There is no single threshold: the speed of convergence depends on the underlying distribution. As a practical guide:
- Symmetric distributions (Normal, Uniform): with \(n = 2\) to \(5\) the distribution of the mean is already practically normal. The Normal is, trivially, exact for any \(n\).
- Moderately skewed distributions (Exponential, Poisson): the usual rule of thumb of \(n \geq 30\) is typically enough. With the exponential (skewness coefficient \(= 2\)) the approximation is already very good at \(n = 30\).
- Bounded discrete distributions (Bernoulli): with probabilities close to 0 or 1 the skewness is high, but because the variable is bounded, convergence is relatively fast. At \(n = 30\) the approximation is excellent.
- Heavy-tailed distributions (Chi-square with few degrees of freedom): the skewness is more pronounced and \(n \geq 50\) may be needed for a satisfactory approximation.
- Distributions without finite variance (Cauchy): the CLT does not apply in its standard form, since the variance does not exist. In these cases the law of large numbers does not converge either.
The practical rule \(n \geq 30\) found in many textbooks is a conservative heuristic that is valid for the distributions commonly encountered in applied sciences. However, for highly skewed distributions or distributions with very heavy tails, it may be insufficient.
Practical implications of the CLT
The CLT has far-reaching consequences in applied statistics:
- Justifies the use of z and t tests: mean tests (z-test, t-test) assume that the sample mean follows a normal distribution. Thanks to the CLT, this holds even when the individual data are not normal, provided \(n\) is sufficiently large.
- Confidence intervals: the construction of confidence intervals for the population mean relies directly on the CLT, making \(\bar{X} \pm z_{\alpha/2}\,\sigma/\sqrt{n}\) a valid approximation regardless of the original distribution.
- Ubiquity of the normal distribution: many natural and social phenomena result from the accumulation of many small independent effects (measurement errors, genetic variation, economic fluctuations…), which explains why the normal distribution appears so frequently in nature.
- Extension to sums: since \(S_n = n\bar{X}_n\), the CLT applies equally to the sum of i.i.d. variables: \((S_n - n\mu)/(\sigma\sqrt{n}) \xrightarrow{d} \mathcal{N}(0,1)\). This is the basis of the normal approximation to the binomial.
- Experimental design and resampling: the CLT underpins techniques such as the bootstrap and power analysis, by guaranteeing that statistics based on means have asymptotically normal distributions.
Frequently asked questions
Does the CLT say that individual data points are normally distributed?
No. The CLT states that the sample mean \(\bar{X}_n\) converges to a normal distribution when \(n \to \infty\). The individual data \(X_i\) can follow any distribution with finite mean and variance: exponential, Bernoulli, Poisson, etc. Confusing the distribution of the data with the distribution of the statistic is one of the most common mistakes when interpreting the CLT.
Why does the Bernoulli distribution with n=30 look so normal?
The Bernoulli distribution with \(p = 0.3\) has finite positive skewness (\(\gamma_1 = (1-2p)/\sqrt{p(1-p)} \approx 0.873\)). Although it is not symmetric, because it is a variable bounded between 0 and 1, all of its moments exist and are finite. This makes convergence in the CLT relatively fast. The averaging effect over \(n = 30\) independent variables is strong enough that the histogram of the means looks practically normal. With a more extreme \(p\) (close to 0 or 1), larger values of \(n\) would be needed.
What happens with very heavy-tailed distributions?
If the variance of the distribution is infinite, the standard CLT does not apply. The best-known example is the Cauchy distribution, whose density function is \(f(x) = 1/[\pi(1+x^2)]\). The Cauchy has no finite mean or variance, and the sample mean of \(n\) independent Cauchy observations has exactly the same Cauchy distribution as a single observation: it does not converge to the normal for any \(n\). For these distributions there is a generalized version of the CLT based on \(\alpha\)-stable distributions (Lévy), but it is beyond the scope of everyday statistical use.
Do the variables need to be identically distributed?
The classical version of the CLT requires i.i.d. (independent and identically distributed) variables. However, more general extensions exist: the Lindeberg-Lévy theorem relaxes the requirement of identical distribution and only requires that no single variable dominate the sum (Lindeberg's condition). This extension is key in econometrics and time series analysis.
How does sample size affect the variance of the sample mean?
The variance of the sample mean is exactly \(\text{Var}(\bar{X}_n) = \sigma^2/n\), so the standard deviation (\(= \sigma/\sqrt{n}\), also called the standard error) shrinks with the square root of the sample size. Doubling the sample size reduces the standard error by a factor of \(\sqrt{2} \approx 1.41\). To halve the standard error, you need to quadruple the sample size. This relationship is visible in the simulator's histograms: as \(n\) grows, the bell curve of the sample mean becomes narrower.