Math for CS and ML · 12 min

The central limit theorem: why averages make bells

Average samples from lopsided or two-humped populations and watch a bell appear, with a spread of σ/√n.

01Why it matters

Why bell curves are everywhere

Heights, measurement errors, exam averages and polling results all tend to follow the same bell-shaped curve, even though the things being added up look nothing like a bell. A single die roll is flat; the average of many dice is a bell.

The central limit theorem says this is no coincidence: average enough independent samples of almost anything and the averages pile up into a normal distribution, with a spread you can predict exactly.

02Key parts

The pieces you will see

population
Where the samples come from, with mean μ\mu and standard deviation σ\sigma. It can have any shape.
sample of size n
nn independent draws from the population.
sample mean x̄
The average of one sample. Draw many samples and you get many means.
standard error
How spread out the means are: σ/n\sigma / \sqrt{n}.

03See it work

Pile up the averages

Each sample of 5 is drawn from a lopsided population and averaged; the averages pile up in the bottom histogram.

The population is lopsided, but the averages are not: big and small draws partly cancel, so averages land near μ\mu more often than far from it, and they fall away symmetrically on both sides.

04Predict

Your turn: what will pile up?

Make 3 predictions: step forward and answer each question before the next step plays.

0 of 3 made

05Try it

Change the sample size

Use the slider to change nn and the buttons to change the population.

  • n = 1: each "average" is a single draw, so the histogram just copies the population. The theorem needs averaging.
  • n = 2 to 5 on the skewed population: watch the lopsidedness fade.
  • Coin flips: the averages can only be k/nk/n, so the histogram is spiky, but the spikes still trace a bell.

06Check yourself

Check yourself

  1. Question 1 of 4

    A population has σ = 12. What is the spread (standard error) of means of samples of size 9?

    Your answer comes back in Review in a few days, so it sticks.

  2. Question 2 of 4

    To halve the spread of the sample means, how should n change?

  3. Question 3 of 4

    With n = 1, what does the histogram of sample means look like?

  4. Question 4 of 4

    You collect 10,000 incomes from a right-skewed income distribution. What does a histogram of those 10,000 incomes look like?

07Explain it back

Say it in your own words

Why do the averages of samples from a lopsided population pile up into a bell, and how does their spread depend on the sample size?

08Recap

What to remember

  • The means of samples of size nn cluster around μ\mu with spread σ/n\sigma/\sqrt{n}.
  • For moderate nn their distribution is close to normal, whatever the population looks like.
  • This is why confidence intervals, A/B tests and polls can use the normal curve, and why averaging more data helps only like n\sqrt{n}.
Back to path