Skip to content
Tactiverge

School/✦ Research Engineer/Week 10

The central limit theorem by simulation

A reading that is either 0 or 10 looks nothing like a bell curve. Average 30 of them and, astonishingly, a bell curve appears. Why?

About 40 min · 3 goals · Checked by automated tests

1.Why should I care?

Kalman filters and least squares assume Gaussian noise. Real noise comes from many small causes: vibration, thermal jitter, quantisation. The central limit theorem is the reason that assumption is so often good enough, and the simulator shows you exactly when it is not.

  • ◇ State the central limit theorem and its conditions.
  • ◇ Show by seeded simulation that sample means have spread σ/√n.
  • ◇ Explain why the CLT justifies Gaussian noise models in estimators.

2.Discover

Pick the skewed 0/10 population with n = 1: no bell. Step n through 2, 5, 10, 30. Record the observed spread each time and compare with σ/√n. Then try the exponential population and press 'draw' a few times to see run-to-run variation.

Loading the interactive…

Can't use the interactive? Read a description instead

The simulator draws 1,000 sample means as a histogram with the predicted normal curve over it. The readout states the observed mean and spread beside σ/√n, so the result can be read entirely as numbers.

3.Checkpoint: guided practice

Check what you just discovered before going on. Hints appear after a wrong answer.

Practice 1

Readings have σ = 4 mm. How many must be averaged to get a standard error of 0.5 mm?

4.Predict

You average n = 25 independent readings, each with σ = 5. What is the σ of the average?

Guess first. Being wrong here is how the surprise works.

5.Understand

The theorem

If X₁, …, Xₙ are independent with the same mean μ and finite variance σ², then the sample mean X̄ has mean μ and standard deviation σ/√n, and as n grows its distribution approaches Normal(μ, σ²/n) whatever the shape of the Xᵢ.

How big must n be?

For symmetric populations (uniform, a die) n ≈ 5 already looks normal. Skewed or lumpy populations need more: the 0/10 population still looks lopsided at n = 10 and is close to normal by n = 30–100. Heavy-tailed noise with infinite variance never obeys the theorem.

Standard error

σ/√n is the standard error of the mean. It is what makes averaging a powerful but slow tool: 100 readings give 10× precision, 10,000 give 100×. It only shrinks random error; a bias shared by every reading survives any amount of averaging.

Explain it another way

Each reading pushes the average up or down a little. With many readings, big pushes in one direction are usually cancelled by pushes the other way, so extreme averages become rare and the middle fills up into a bell.

Worked example 1

A gyro sample has σ = 0.8 °/s. How many samples must be averaged for SE = 0.1 °/s?

σ/√n = 0.1 ⇒ √n = 8 ⇒ n = 64.

Common mix-ups

  • The CLT says the data become normal if you collect enough.
    ✓ The data keep their shape. It is the distribution of the sample MEAN that becomes normal.
  • Averaging fixes all errors.
    ✓ It shrinks independent random error like 1/√n and does nothing to a shared bias.

6.Watch

→ Notice the instructor starts from a strange-looking distribution on purpose: the theorem does not care about the starting shape.

Takes a deliberately strange distribution and shows sample means piling up into a normal shape, the same experiment as our CLT simulator.

Length: see YouTube · captions on YouTube · source

Nothing loads from YouTube until you press play.

The video is optional: everything you need is also in the lesson text and the interactive.

7.Practice on your own

Practice, not a test. Wrong answers get a hint and another try.

Practice 2 · a fresh version every time

A star tracker's single attitude measurement has σ = 1 arcseconds. You average n = 64 independent measurements. What is the standard error of the average, in arcseconds?

arcsec

Practice 3

Every reading from a range sensor is 3 cm too long because of a mounting offset, plus random noise σ = 2 cm. After averaging 400 readings, the error of the mean is about…

Practice 4

Which condition is essential for the CLT as stated in this lesson?

8.Apply it

Use the simulator to find the smallest n for which the skewed population's sample means look normal to you. Write down your criterion before you look (for example, no bin more than twice the curve's height). Compare with a classmate's criterion: do you agree on n?

9.Reflect

10.Go further

Research mode: limits and open questions

When you report a mean ± SE from repeated simulation runs (as in this term's project), you are relying on the CLT. With only 3–5 runs and skewed errors, a bootstrap or a t-interval is more honest.

    Concepts: Probability distributions · Repeated trials and sample size