Central Limit Theorem Explorer

watch sample means become bell-shaped

Loading interactive simulation...

Why means become normal even from weird sources 🖖

Means go normal because averaging is repeated convolution, up to a rescaling, and convolving a distribution with itself enough times smooths out its quirks. Once the width is scaled away, the lean and the humps keep shrinking while the spread does not, so what is left looks more and more Gaussian whatever you started from. The only real requirement is a finite variance. A uniform, an exponential and a two-humped bimodal source all get pulled toward the same bell curve, just at different speeds, which is why n = 30 became statistics' informal rule of thumb rather than an exact threshold.

The square-root law behind the shrink 🖖

As you keep drawing, notice the histogram of means gets narrower, not just smoother. Its spread is the standard error σ/√n, so precision improves only with the square root of the sample size — to halve the width you must quadruple n. That is the practical heart of the theorem: bigger samples pin down an average more tightly, but with steadily diminishing returns.

The distribution that breaks the theorem 🖖

The theorem quietly assumes a finite variance, and one famous outlaw violates it: the Cauchy distribution, the ratio of two standard normals. Average a million Cauchy draws and the result follows the exact same Cauchy curve as a single draw — the bell never forms and extra data buys nothing. Its tails are so heavy that one monstrous value can dominate any average, however large.

Problem solved in full

  1. The n = 30 rule for a uniform source on [0, 1] 5 steps

    What is the n = 30 rule actually a rule about? This is the default state: a Uniform source on [0, 1] with sample size n = 30.

    1. The uniform source is flat on [0, 1], so its mean sits at the midpoint and its variance is the second moment minus the square of that. Every number below comes out of this one.

    2. The standard error follows from the variance and nothing else. It does not need the source to be symmetric, or bell-shaped, or n to be large — the formula is exact at n = 1 and at n = 30 alike, and the only fact it uses is that variances of independent quantities add.

    3. So the width was never the theorem's business. Shape is, and the standard measure of a lean is skewness. Third central moments add for independent draws exactly as variances do, and skewness is built to survive a rescaling of the axis, so putting the two together leaves the lean of the mean falling as 1/√n.

    4. The tool's sources start from very different leans. A uniform source has none to lose, so its sample mean is symmetric at every n, n = 1 included; an exponential source starts at skewness 2 and is still leaning right at n = 30.

    5. Run the same relation backwards for a lean small enough to ignore.

    Answer

    The table prints a source mean of 0.5 and a standard error of 0.052705, and reproducing that took only the variance 1/12. The last three steps are there to say that this row was never the theorem's doing: the standard error is exact for any n and any source with a finite variance, while what n buys is shape.

    The uniform source is already symmetric, so raising n to 30 improves nothing about its lean — the rule of thumb is doing no work on this page's default. An exponential source at n = 30 still carries a skewness of 0.365, and pushing that under 0.1 takes n = 400.

    The bimodal source, which looks the least normal of the three, converges about as fast as the uniform: it is symmetric too, so its skewness is 0 at every n, and its excess kurtosis of −1.28 falls as 1/n to −0.043 at n = 30, against the uniform's −0.040. None of those three numbers has a row in the table, which is why the histogram is the only place the convergence can be seen at all.

Learning path

From counts to curves

Leads to Z-score the reason that curve keeps turning up when nothing is binomial.

References (1)
  • Insight block 3 — why averaging Cauchy draws returns the same Cauchy curve: W. Feller, An Introduction to Probability Theory and Its Applications, Volume 2, 2nd ed., ch. VI and XVII. Wiley, 1971. ISBN 978-0-471-25709-7 — stable laws, and the finite-variance condition the central limit theorem actually needs.

Example problems

  • uniform, n=5 - A flat source on [0, 1] has a standard deviation of 0.2887, so five draws average to a standard error of 0.129. The histogram is already symmetric, because a uniform source has no lean to lose — what is missing at n = 5 is narrowness, not shape.
  • uniform, n=30 - Six times the sample size buys √6 in precision and nothing else: the standard error falls from 0.129 to 0.0527. Shape was never the problem for a flat source, which makes this the preset where the n = 30 rule of thumb does no work at all.
  • exponential, n=30 - This source leans hard right, with a skewness of 2. Thirty draws divide that by √30 and leave 0.365, which is still visibly leaning in the histogram. Getting it under 0.1 would take a sample of 400.
  • bimodal, n=30 - Two humps, and it converges about as fast as the flat source — being symmetric, its skewness is zero at every n. What it has to lose is excess kurtosis of −1.28, and that falls as 1/n rather than 1/√n, reaching −0.043 by thirty draws.