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 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 the histogram is flat, nothing like a bell. Raise 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?
About 0.3%: the Gaussian's tails fall off very fast. Within ±1σ is about 68% of the time, ±2σ about 95%, and ±3σ about 99.7%. But "rarely" isn't "never": at a million samples a second, a 3σ spike happens thousands of times each second, and even 6σ events happen eventually. That tail is exactly what sets a digital link's error rate (lesson 41).
Name it
The Gaussian distribution
The density. A Gaussian (or normal) variable with mean μ and standard deviation σ has
Every Gaussian is the same curve, shifted and stretched. Subtracting the mean and dividing by σ gives the standard normal, , with mean 0 and σ = 1.
How much is where:
| Range | Fraction inside | Fraction outside |
|---|---|---|
| ±1σ | 68.3% | 31.7% |
| ±2σ | 95.4% | 4.6% |
| ±3σ | 99.73% | 0.27% |
The tail. The chance of landing more than standard deviations above the mean is the Q function:
It has no simple formula, but tables and calculators give it: , , , . Two tails together are .
The central limit theorem. Add up independent random variables, each with its own mean and variance, none dominating. As grows, the sum's distribution approaches a Gaussian, with mean and variance , 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
- Convert to standard deviations. ±1% is ±10 Ω, which is ±2σ.
- Fraction inside. 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 and subtracts 6. What distribution does it approximate, and how often does it exceed 2?
Show the solution
- One uniform. Each has mean and variance .
- 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.
- Central limit theorem. It's close to a standard Gaussian, so
- 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
- Beyond 3σ. about 1 sample in 370.
- Beyond 6σ. about 1 in 500 million.
- 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 ().
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 and standard deviation .
Step 1
How many standard deviations is the value 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°.
Step 2
What fraction exceeds ?
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?
To get an extreme total, nearly every effect has to land near its own extreme in the same direction, and there are very few ways for that to happen. Totals near the middle can be made in an enormous number of ways, with highs and lows canceling. As more effects are added, the count of ways piles up in the middle and thins out smoothly toward the edges, and that pile-up has the Gaussian shape whatever the shape of the individual pieces. Each piece only contributes its mean and variance to the result.
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.