Skip to content
All apps

Distribution explorer & central limit theorem

About this app

Seven starting distributions from Bernoulli to Cauchy: the exact distribution of the sum or mean turns into a bell as n grows (σ/√n). With the normal approximation and continuity correction, the Berry–Esseen bound and animated samples; Cauchy shows where the theorem fails.

The statistics

The central limit theorem says that the sum Sₙ = X₁ + … + Xₙ of many independent, identically distributed random variables with finite variance is approximately normal, whatever the shape of the individual X. The sum has expected value nμ and standard deviation σ√n; the mean X̄ₙ has expected value μ and standard error σ/√n. It is the distribution of the sum and the mean that becomes normal, not the individual values. The Berry–Esseen theorem bounds how fast this happens. Without a mean and variance, as with the Cauchy distribution, the theorem fails.

What you see

At the top is the distribution of a random variable X, discrete as bars, continuous as a density. You can choose Bernoulli, die, Poisson, uniform, exponential, a bimodal distribution and Cauchy. Below is the exactly computed distribution of the sum Sₙ, optionally as the mean X̄ₙ or standardised, with the matching normal curve. A panel rates the quality of the approximation by the largest gap between the distribution functions and shows the Berry–Esseen bound. Animated samples can be drawn one at a time or by the hundred.

Things to try

Pick the die and raise n from 1 to 2, 5 and 30: the flat uniform shape turns into a triangle and then a bell. Then take the skewed exponential distribution and notice that the bell arrives more slowly, because skewness only falls like 1/√n. With the bimodal distribution the mean sits where hardly any single value lies. Finally switch to Cauchy: however large n gets, the mean stays as widely spread as a single value.

Frequently asked questions

What does the central limit theorem state?
The sum or mean of many independent, identically distributed random variables with finite variance is approximately normally distributed for large n, regardless of the original distribution. That is why the normal distribution appears so often in practice. The theorem underpins many confidence intervals and tests.
How large does n need to be for the central limit theorem?
There is no fixed threshold; the common rule of thumb n ≥ 30 is only a rough guide. For symmetric distributions a small n often suffices, while strongly skewed ones need much more. The Berry–Esseen theorem gives an upper bound on the error of the normal approximation.
Why does the central limit theorem fail for the Cauchy distribution?
The Cauchy distribution has no mean and no finite variance, so one of the theorem’s conditions is missing. The mean of n Cauchy values is again exactly Cauchy distributed. It therefore spreads as widely as a single value, however large n is.
Which distributions can I pick in the distribution explorer?
You can choose Bernoulli, die, Poisson, uniform, exponential, a bimodal distribution and Cauchy. You set the number n of summands, display the sum, the mean or the standardised value and draw samples; the app compares the exact distribution with the normal approximation.

Subject: Statistics

More from Statistics

A VisuApp by heyprof: interactive, free in your browser, no sign-up. What is a VisuApp? · All apps