A1116 of 55
0 XP
  1. Hook
  2. Play
  3. Predict
  4. Name it
  5. Check
  6. Explain

A11 · Lesson 16 · The Gaussian and the central limit theorem

Why so much randomness has the same bell shape

The noise voltage across a resistor is the combined effect of countless electrons jiggling independently. Nobody knows what any one of them does, and it doesn't matter: add up enough small independent effects, of almost any kind, and the total follows the same bell-shaped curve. That's the central limit theorem, and it's why the Gaussian distribution describes thermal noise, measurement scatter and manufacturing spread so well.

Play

  • Each draw is the sum of k independent uniform random numbers, shifted and scaled to have mean 0 and standard deviation 1. The curve is the Gaussian with the same mean and spread.
  • With k=1 the histogram is flat, nothing like a bell. Raise k to 2, then 3, then 12. How quickly does it take the Gaussian's shape?
  • The readout counts the fraction of draws within ±1 of the mean. What does it settle near?

Predict

A Gaussian noise voltage has standard deviation 1 mV. Roughly what fraction of the time is it more than 3 mV from zero?

Name it

The Gaussian distribution

The density. A Gaussian (or normal) variable with mean μ and standard deviation σ has

p(x)=1σ2πe−(x−μ)2/2σ2

Every Gaussian is the same curve, shifted and stretched. Subtracting the mean and dividing by σ gives the standard normal, z=(x−μ)/σ, with mean 0 and σ = 1.

How much is where:

RangeFraction insideFraction outside
±1σ68.3%31.7%
±2σ95.4%4.6%
±3σ99.73%0.27%

The tail. The chance of landing more than z standard deviations above the mean is the Q function:

Q(z)=P(Z>z)=12π∫z∞e−u2/2du

It has no simple formula, but tables and calculators give it: Q(1)=0.159, Q(2)=0.0228, Q(3)=0.00135, Q(6)≈10−9. Two tails together are 2Q(z).

The central limit theorem. Add up n independent random variables, each with its own mean and variance, none dominating. As n grows, the sum's distribution approaches a Gaussian, with mean ∑μi and variance ∑σi2, whatever the shapes of the pieces. Adding twelve uniform numbers already gives a good bell, which is an old trick for making Gaussian noise. It explains why:

  • thermal noise is Gaussian: it's the sum of the motions of enormous numbers of electrons;
  • measurement scatter is often Gaussian: many small independent disturbances add;
  • manufacturing spread is often Gaussian: many small process variations combine.

It also warns you when not to expect a Gaussian: when one cause dominates (a single bad batch, a power-line spike), or when effects multiply instead of add.

Worked example

Resistors are Gaussian with mean 1000 Ω and σ = 5 Ω. What fraction is within ±1%?

Show the solution
  1. Convert to standard deviations. ±1% is ±10 Ω, which is ±2σ.
  2. Fraction inside. 1−2Q(2)=0.954 so 4.6% fall outside.

Answer 95.4% of the resistors are within ±1%.

Worked example

A simple generator adds 12 independent uniform numbers on [0,1) and subtracts 6. What distribution does it approximate, and how often does it exceed 2?

Show the solution
  1. One uniform. Each has mean 12 and variance 112.
  2. The sum minus 6. Twelve of them add to mean 6 and variance 1, so the sum minus 6 has mean 0 and variance 1.
  3. Central limit theorem. It's close to a standard Gaussian, so P(>2)≈Q(2)=0.023
  4. Its limit. It can never exceed 6, unlike a true Gaussian, but that's far out in the tail.

Answer it approximates a standard Gaussian, and exceeds 2 with chance about 0.023.

Worked example

How often does Gaussian noise exceed 3σ, and 6σ, in either direction?

Show the solution
  1. Beyond 3σ. P(|X−μ|>3σ)=2Q(3)=0.0027 about 1 sample in 370.
  2. Beyond 6σ. P(|X−μ|>6σ)=2Q(6)=2.0×10−9 about 1 in 500 million.
  3. Six sigma in industry. A "six sigma" process, even with its mean allowed to drift by 1.5σ, still makes only 3.4 defects per million.

Answer Gaussian noise exceeds 3σ in about 1 sample in 370 (0.0027), and 6σ in about 1 in 500 million (2.0×10−9).

Check

What percentage of a Gaussian's values lie within ±1.5σ of its mean?

Check

A resistor's value is Gaussian with mean 1000 Ω and σ = 5 Ω. What is the chance one is above 1015 Ω?

Check

A supply's output is Gaussian with mean 3 V and σ = 0.1 V. How many standard deviations from the mean is 6 V? (Give z with its sign.)

Check

Resistors are made with mean 1000 Ω and σ = 5 Ω. What percentage fall outside ±1% of 1000 Ω?

Check

A noise voltage is the sum of the effects of many independent electrons. What distribution should you expect it to have?

Check

Gaussian noise, in standard deviations.

(a)

What fraction exceeds 2σ in either direction?

Check

Resistors are Gaussian with mean m and standard deviation s.

Step 1

How many standard deviations is the value x from the mean?

Type it the way you would write it, like 3sin(2πft) or 3*sin(2*pi*f*t). Angles can be in radians or carry a degree sign, like 45°.

Check

Write within(t, s) returning the fraction of Gaussian resistors (mean 1000 Ω, standard deviation s Ω) within ±t percent, using math.erf. Set f1 = within(1, 5) and f2 = within(1, 10).

Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.

Explain why

Why does adding many independent random effects produce a bell-shaped distribution, even if each effect on its own is flat?

Practice

Keep practicing

8 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.