The shape of a sum
Lesson 5.7.2 gave the centre and the spread of the sample mean of i.i.d. draws: mean , standard error . The central limit theorem gives its shape. For large it is close to a normal, whatever the distribution of one draw.
To see the shape, remove the centre and the spread. Standardising (lesson 5.3.2) gives a variable with mean 0 and variance 1 for every . With the sum,
Rule: Central limit theorem
For i.i.d. draws with mean and a finite variance . is the standard normal distribution function. For large , the mean and the sum are approximately normal, with the mean and variance of lesson 5.7.2.
Without the standardising there is nothing to see: collapses onto (lesson 5.7.2), and spreads out without limit. The theorem describes the shape at the scale .
For normal draws is exactly standard normal at every (lesson 5.6.3). The theorem says that other distributions get there too, as grows.
Dice: from a triangle to a bell
Lesson 5.6.3 built the pmf of the sum of two dice by convolution: a triangle. Convolve in more dice and the triangle rounds into a bell.
Take 10 dice. The sum has mean and standard deviation . By the exact pmf, ; the normal gives .
Whole numbers: the half-step
The sum of dice takes whole values, and the normal spreads the probability of each value over the interval from to . So "" is best read as "". This continuity correction gives , much closer to 0.2050.
With 100 dice the mean is 350 and the standard deviation about 17.0783. Exactly, . The normal gives 0.0395 from 380 and 0.0421 from the half-step at 379.5.
A coin works the same way. The number of heads in 100 tosses has mean 50 and standard deviation 5. Exactly, ; the normal gives 0.1587 from 45 and 0.1841 from 45.5.
Try it
The loop convolves in one die at a time, 100 times (lesson 5.6.3), and stops to check 10 dice on the way. Each line prints the standard deviation, the exact probability, the normal, and the normal with the half-step.
The last line is the coin, with binom.cdf for the exact answer.
Three starting distributions
The theorem does not care where the draws come from. Three very different starts:
- Uniform on : flat and symmetric, with and .
- Exponential with mean 1 (lesson 5.4.2): skewed, with a long right tail, and .
- A fair coin, 0 or 1: only two values, and .
The standardised mean of 10 draws from each start. The uniform's is already almost normal, and the coin's follows the curve in steps. The exponential's is still skewed, so its upper tail holds more than the normal's 0.025.
A simulation shows all three at once. For each start and each , draw 20,000 samples of size and standardise their means.
Then count the share within , 95% for a normal, and the share above 1.96, 2.5% for a normal. In one seeded run:
| start | |||
|---|---|---|---|
| uniform, share within | 1 | 0.9514 | 0.9508 |
| exponential, within | 0.9466 | 0.957 | 0.9526 |
| exponential, above 1.96 | 0.0534 | 0.0427 | 0.0338 |
| coin, within | 1 | 0.9386 | 0.9556 |
A single uniform draw never strays 1.96 standard deviations, and a single coin is always exactly one away. By the uniform is already close to 95%. The exponential's total is near 95% even at , but lopsided: too much above 1.96, too little below .
Try it
Each start is a function that draws an array of a given shape. Each row of draw((20_000, n)) is one sample, and .mean(axis=1) averages each row.
The columns are the start, , the share within , the share above 1.96, and the skewness of the 20,000 means (lesson 5.3.3).
How fast: the skewness fades like
The skewness of a mean of draws is the skewness of one draw divided by (stated here). The uniform and the coin have skewness 0, so only their flatness or gaps must fade.
The exponential starts at 2, and its mean is still visibly skewed long after. The simulation above found 2.01, 0.87 and 0.34 at = 1, 5 and 30, against = 2, 0.8944 and 0.3651.
The exponential's sum is a gamma distribution (lesson 5.6.3 met the case ), so its tails are known exactly:
| 1 | 5 | 10 | 30 | 100 | |
|---|---|---|---|---|---|
| 0.0518 | 0.0433 | 0.0393 | 0.034 | 0.0302 | |
| 0 | 0.0004 | 0.0058 | 0.014 | 0.0192 | |
| skewness | 2 | 0.8944 | 0.6325 | 0.3651 | 0.2 |
Even at the upper tail holds 3.02%, not 2.5%. The more skewed the draws, the larger must be.
Try it
gamma.sf(x, n) is the probability that a gamma sum with shape exceeds . means , since .
Each line prints , the two tails and the skewness .
Set the explorer to : the histogram is the exponential itself. Step through , 5, 30 and 100. The histogram narrows like and its skew fades.
The share within in the readout stays near 95% throughout; the histogram shows how lopsided it is for small .
Explore
Each bar counts how many of 2,000 samples had their mean in that range. Raise the sample size n: the histogram narrows like 1/√n and takes the shape of the normal curve, even from a skewed start.
- True mean and standard deviation
- μ = 1, σ = 1
- The 2000 sample means
- average 1.0092, standard deviation 0.4566 against σ/√n = 0.4472
- Within 1.96 σ/√n of μ
- 95.3% of the means (the normal curve says 95%)
The scale of the error
By the theorem, about 95% of sample means land within of : the 1.96 is the normal's quantile from lesson 5.4.3. That band has half-width proportional to .
Rule: Error scale of a mean
The second line is the number of draws for a 95% half-width . Ten times the draws narrow the band times. One more correct digit, a band ten times narrower, needs a hundred times the draws.
For a die the 95% half-width is 0.3347 after 100 rolls, 0.1059 after 1,000 and 0.0335 after 10,000. To get within 0.1 with 95% probability takes , about 1,121 rolls. Chebyshev's inequality, which must cover every distribution, asked for 5,834 (lesson 5.7.2).
Case study 3.7.4's band
Case study 3.7.4 estimated a correlation 400 times at each sample size. The middle 90% of the estimates ran from 0.363 to 0.604 with 100 draws, 0.462 to 0.537 with 1,000, and 0.487 to 0.513 with 10,000.
The widths are 0.241, 0.075 and 0.026. Each tenfold step narrowed the band 3.21 and then 2.88 times: about , as the rule says.
An estimated correlation is not a plain mean, but it is built from means of products and squares of the draws. For large samples its error behaves like a mean's error: close to normal, with a spread proportional to .
Case study 4.7.5's standard errors
Case study 4.7.5 found each simulated probability within two standard errors of the truth. The theorem says how often that happens.
The share is a mean of indicators (lesson 5.7.2), so it is close to normal. A miss within 1.96 standard errors then has probability about 0.95.
Repeat case study 4.7.5's simulation with draws 100,000 times, with a seed. The miss was within 1.96 estimated standard errors 94.67% of the time, and within 2 of them 95.39%. A simulated number with its standard error is a statement of this kind.
Try it
The first lines are the die's 95% half-widths, , and the rolls needed for a half-width of 0.1.
Then case study 3.7.4's band widths and their ratios. The last lines repeat case study 4.7.5's estimate 100,000 times. rng.binomial counts the corner years among draws directly, and the line checks how often the miss is within 1.96 and 2 standard errors.
Where the theorem fails
Far in the tails. The theorem is about the middle of the distribution. Even where the middle is close, a tail probability can be off many times over.
For the exponential at , , against the normal's 0.000032: 12.2 times as large. At it is still 5.1 times.
No finite variance. A Student t with has neither a variance nor a mean (lesson 5.4.4). The mean of such draws has the same distribution as one draw (stated here), so averaging narrows nothing.
In a seeded simulation the middle 90% of such means had widths 13.6, 13.86, 14.42 and 11.79 for = 1, 10, 100 and 1,000. One draw's exact width is 12.63.
Dependence. The theorem needs independent draws, or nearly so. Copies of one draw, or strongly correlated draws, do not average out at the rate .
Try it
The loop prints the exponential's exact , the normal's, and their ratio.
Then t draws with : for each , the width of the middle 90% of 2,000 seeded sample means. The last line is the exact width for one draw, from t.ppf.
Case study 5.7.5 uses the theorem to put a 95% interval around a simulated option price.
Common mistakes
- The theorem is about sums and means, not about the draws. A thousand exponential draws are still skewed; their mean is close to normal.
- Standardise with the standard error , not with of one draw.
- is not a magic number. For the exponential at the upper tail beyond 1.96 holds 0.034, not 0.025.
- Whole-number counts need the half-step. For heads in 100 tosses, uses 45.5: 0.1841, not 0.1587.
- Ten times the draws narrow a band times, not 10.
- No finite variance, no theorem. Means of t draws with never narrow.
- Do not trust the normal far in the tails. The middle can be close while a 4-sigma probability is off by a factor of 12.
The central limit theorem
0 of 11 correct
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
- 7.
- 8.
- 9.
- 10.
- 11.
How to type answers
- Powers with
^:x^7,2^(1/3),a^-2. - Multiply with
*or by writing side by side:3x^2,2(x+1). ln(x)is the natural log,log(x, 2)is log base 2,eis Euler's number,sqrt(x)is a square root.sin(x),cos(x)andtan(x)take radians; writepifor π andsin(x)^2for sin²x.- Your first answer to each question is saved: it counts towards your score and brings the question back for review.
- Exact answers like
ln(20)/ln(3)are best. Decimals need about 4 significant figures.
Summary card
- Central limit theorem: for i.i.d. draws with finite variance, has . So and , whatever the start.
- Whole-number sums: use the half-step, .
- About 95% of means lie within of ; a half-width needs . Ten times the draws narrow the band times; one more digit costs 100 times the draws.
- Skewness fades like , so skewed draws need larger ; far tails can stay wrong many times over.
- No finite variance (t with ) or strong dependence: no theorem.