Learning LabExplorable explanations
← All artifacts
Statistics

The Central Limit Theorem

Start from a lopsided source, a hard skew or a U-shape, draw samples and average each batch, then watch the histogram of those averages climb into a bell no matter how lumpy the source was.

central-limit-theoremsamplinggaussianprobability
LiveInteractive · drag, toggle, run it
Statistics · Why Averages Go Gaussian

The Central Limit Theorem

Pick a source that looks nothing like a bell: a hard right skew, a U-shape, a die. Then draw a sample of n values from it, take their average, and drop that one average into a histogram. Repeat thousands of times. The histogram of averages climbs into a bell anyway, and the bigger n gets the tighter and more Gaussian it becomes, no matter how lumpy the source you started from.

The three words you need
Population. The source itself, the thing you draw from. It can be any shape with a finite spread.
A sample. n values drawn from the population. Its average is one number, written x̄.
Sampling distribution of the mean. The histogram you build by collecting many of those averages. The claim of the central limit theorem is that this third thing approaches a normal curve as n grows, no matter what the population looked like.

1. Choose a deliberately non-normal source

A long tail to the right, the classic awkward case. Most draws are small, a few are large. The averages still go Gaussian, the skew just takes a bigger n to wash out.

0.000.250.500.751.00
Population mean μ
0.231
Population sd σ
0.209
Variance σ²
0.043

2. Set the sample size n

n is how many draws go into each average. At n = 1 the average is just a single draw, so the histogram of means is literally the source itself, the honest base case with no bell in sight. As n climbs, each average pools more draws and the histogram tightens.

Predicted center
0.231
same as μ
Predicted spread (SE)
0.0660
σ / √n = 0.209 / 3.16

3. Sample for real and watch it build

x-axis: the value of one sample mean

Each draw of "many" experiments takes thousands of fresh samples, averages each, and stacks the result. The green curve is the central limit theorem's prediction: a normal centered at μ with standard deviation σ / √n. Watch the blue histogram chase that curve.

0.000.250.500.751.00
histogram of sample meansCLT normal N(μ, σ²/n)true mean μ
No experiments yet. Draw some sample means to start building the histogram.
Live readouts: prediction vs reality

Does the histogram actually match σ / √n?

The empirical numbers come straight from the means you collected. If the central limit theorem holds, the empirical mean lands on μ, the empirical spread lands on σ / √n, and the skew of the collected means falls toward zero as n grows.

Experiments
0
Empirical mean
predicted 0.2313
Empirical spread
predicted SE 0.0660
Spread ÷ predicted SE
should approach 1.000
Skew of the means
0 = symmetric bell
Verdict
collecting
n = 10
What you just watched, and the fine print

The source shape stops mattering. Skew, U-shape, dice: it makes no difference. Averaging mixes many independent draws, and the lumps in any one draw cancel against the lumps in the others. What survives is the smooth, symmetric pile in the middle. That is the bell.

Bigger n means narrower and more Gaussian. The spread of the means is σ / √n, so going from n = 1 to n = 100 cuts it tenfold. It shrinks like 1 / √n rather than 1 / n because variances add when you sum independent draws: summing n of them multiplies the variance by n, dividing by n to average divides it by n², and √(σ² / n) = σ / √n. That square root is why quadrupling the sample only halves the error.

The limit is N(μ, σ² / n), not just any bell. It is centered exactly on the population mean and its width is fixed by the population spread. The green curve was drawn from μ and σ alone, never from the histogram, yet the histogram converges onto it.

The caveat is real. The theorem needs the population to have finite variance, and n = 30 is only a rule of thumb. Switch to the strong right skew and you can see it: at small n the histogram is still visibly lopsided and its skew readout stays well above zero, taking a larger n to settle than the tidy uniform does. Heavier skew, slower convergence. Infinite-variance sources like a Cauchy never converge at all, which is exactly why the finite-variance condition is not optional.

Seeded mulberry32 draws · analytic μ and σ per source · empirical moments from the collected means · N(μ, σ²/n) overlay