Explore the Central Limit Theorem

Sampling Distribution Simulator

Try a comparison:

1Parent population

Drag on the chart to draw your own population.

2Sample data

The latest sample for distribution 1.

3Distribution 1

4Distribution 2

How to use this simulator

What you see. Panel 1 is the population. Each time you draw, a random sample of N values is taken from it (panel 2 shows the latest one), the chosen statistic is computed, and that one number is added to the histogram in panel 3. Panel 4 does the same with its own statistic and N, so you can compare two settings side by side.

Try the Central Limit Theorem. Pick Skewed right or Exponential. Set distribution 1 to Mean, N = 2 and distribution 2 to Mean, N = 25, then click 10,000 and tick Fit normal and Theory. Both distributions are centred on μ, the spread shrinks to σ/√N, and with the larger N the shape becomes normal even though the population is not.

Other things to try.

  • Compare Variance (n) with Variance (n−1): only the n−1 version is centred on σ² — that is why we divide by n−1.
  • Compare the mean and the median with the same N: for a normal population the median varies more.
  • Draw a strange population yourself and see whether the mean still ends up normal.
  • Bernoulli turns the mean into a sample proportion.

Colours. Red ochre is the population, tin grey is the sample drawn from it, dark blue is distribution 1 and dark green is distribution 2. In panels 3 and 4 the solid dark line is a normal curve fitted to the simulation and the dashed line is theory — for the mean, the normal curve with mean μ and SE = σ/√N; for variances, the expected value.