Learning outcomes
By the end of this lesson you should be able to: distinguish the population, a sample and a sampling distribution; state the Central Limit Theorem and its conditions; compute the standard error of a sample mean as sigma over root n; and explain why the normal curve can describe a sample mean even when the population is skewed.
Prerequisites
Lesson 6 (Distributions: binomial & normal). You need the normal distribution and z-scores, because the sampling distribution of the mean will be read through them for the rest of the course.
The big idea
The CLT is the hinge of the course. It says that averaging destroys shape: whatever the population looks like — skewed, lumpy, two-peaked — the average of many independent observations is drawn toward a normal distribution. That single fact licenses every normal-based method from lesson 8 onward, because it means you do not need the population to be normal in order to reason about the mean you measured.
Why averaging pulls a distribution toward normality
A single draw from a right-skewed population is often small and occasionally enormous, so its distribution has a long tail. An average of n draws cannot be so extreme: for the average to be huge, most of the n draws must be huge at once, which a skewed population rarely produces. Large low values and large high values both become less likely as n grows, the middle swells, and the tails thin — the shape of a normal curve.
The precision gain is the second half of the theorem, and it is slower than intuition expects. The standard error falls as 1 over root n, not 1 over n. To halve the uncertainty in a sample mean you must quadruple the sample size; to cut it to a tenth you need a hundred times the data. This root-n law is why studies of rare effects are expensive, and why 'we collected twice as much data' does not halve a confidence interval.
| Sample size n | SE multiplier 1/sqrt(n) | If n = 4 gives an SE of 100, the SE here is |
|---|---|---|
| 4 | 0.500 | 100 |
| 16 | 0.250 | 50 |
| 64 | 0.125 | 25 |
| 256 | 0.0625 | 12.5 |
| 1024 | 0.03125 | 6.25 |
Worked example 1: the standard error, computed exactly
A strongly right-skewed population: ten small values and two very large ones. Compute its mean and standard deviation, then the standard error of the mean for samples of 50 and of 500.
import math
pop = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 300, 1000]
mu = sum(pop) / len(pop)
sigma = math.sqrt(sum((x - mu) ** 2 for x in pop) / len(pop))
print("population mean:", round(mu, 2))
print("population SD:", round(sigma, 2))
print("SE of the sample mean, n = 50:", round(sigma / math.sqrt(50), 4))
print("SE of the sample mean, n = 500:", round(sigma / math.sqrt(500), 4))
print("SE at n = 500 as a share of SE at n = 50:", round((sigma / math.sqrt(500)) / (sigma / math.sqrt(50)), 4))population mean: 154.17
population SD: 265.09
SE of the sample mean, n = 50: 37.4898
SE of the sample mean, n = 500: 11.8553
SE at n = 500 as a share of SE at n = 50: 0.3162Method: the twelve values sum to 1850, so mu = 1850 / 12 = 154.17. The squared deviations from that mean are dominated by the 1000, whose deviation of 845.83 has a square of 715,429, and the average of all twelve squared deviations is 843,291.67 / 12 = 70,274.31, giving sigma = 265.09. Then SE = sigma / root n: with n = 50 it is 265.09 / 7.0711 = 37.4898, and with n = 500 it is 265.09 / 22.3607 = 11.8553. The ratio 11.8553 / 37.4898 = 0.3162 is exactly the square root of one tenth — the root-n law in one number.
Worked example 2: watching the CLT happen
Draw 5000 samples of 50 from the same skewed population and examine the distribution of the sample means. Their average should recover the population mean and their spread should match the standard error.
import random
import math
pop = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 300, 1000]
mu = sum(pop) / len(pop)
sigma = math.sqrt(sum((x - mu) ** 2 for x in pop) / len(pop))
random.seed(42)
means = []
for _ in range(5000):
sample = random.choices(pop, k=50)
means.append(sum(sample) / len(sample))
mean_of_means = sum(means) / len(means)
sd_of_means = math.sqrt(sum((m - mean_of_means) ** 2 for m in means) / (len(means) - 1))
se = sigma / math.sqrt(50)
print("population mean:", round(mu, 2))
print("mean of 5000 sample means:", round(mean_of_means, 2))
print("SD of 5000 sample means:", round(sd_of_means, 2))
print("sigma / sqrt(50):", round(se, 2))
print("share of sample means within 1 SE of the population mean:", round(sum(1 for m in means if abs(m - mu) <= se) / len(means), 4))
print("share of sample means within 2 SE of the population mean:", round(sum(1 for m in means if abs(m - mu) <= 2 * se) / len(means), 4))population mean: 154.17
mean of 5000 sample means: 154.5
SD of 5000 sample means: 38.0
sigma / sqrt(50): 37.49
share of sample means within 1 SE of the population mean: 0.6788
share of sample means within 2 SE of the population mean: 0.9526Method: each of the 5000 draws takes 50 values with replacement from the population and records their mean. The average of the 5000 means is 154.5, within 0.33 of the population mean of 154.17 — a simulation discrepancy that shrinks if more samples are drawn. Their standard deviation is 38.0, matching the predicted SE of 37.49 to within simulation error. And 67.88% of the means fall within one SE of the population mean, with 95.26% within two, which is the 68-95-99.7 rule of lesson 6 appearing in data drawn from a population that is nothing like a bell curve. The individual sample means ranged only from 61.2 to 323.2 even though the population itself reaches 1000, because an average of 50 draws cannot be extreme unless most draws are extreme together.
NoteNote what the CLT does not claim. The population did not become normal: ten of its twelve values are small and two are huge, forever. Only the sampling distribution of the mean took on a normal shape. This distinction is the one most often confused in examinations and in practice alike.
Worked example 3: how large must n be?
The quality of the approximation depends on n, and heavily skewed populations need larger samples than moderate ones. The table shows the same simulation at four sample sizes, so the trend is visible rather than asserted.
| n per sample | mean of 2000 sample means | SD of those means | sigma / sqrt(n) |
|---|---|---|---|
| 5 | 154.82 | 120.61 | 118.55 |
| 20 | 153.80 | 59.15 | 59.28 |
| 50 | 153.94 | 37.74 | 37.49 |
| 200 | 154.19 | 19.12 | 18.74 |
Method: 2000 samples were drawn at each size with the seed fixed at 7 for reproducibility, and the same two statistics were computed. At n = 5 the sampling distribution is still visibly skewed and its spread of 120.61 sits 2.06 above the target of 118.55, while the average of the 2000 means wobbles to 154.82 against a population mean of 154.17 — evidence that the approximation is not yet trustworthy. By n = 20 the spread has fallen to 59.15 against a target of 59.28, and by n = 200 it is 19.12 against 18.74, tracking sigma over root n to within 2%. The practical rule of thumb — n around 25 to 30 is often enough for a fairly symmetric population, and more is safer for a skewed one — comes from exactly this behaviour.
Common mistakes
Watch outBelieving the CLT says the population becomes normal. Only the sampling distribution of the mean does. If you need a normal population, you must check the population, not appeal to the theorem.
Watch outSubstituting the sample SD and then still calling the result sigma over root n. The formula needs the population SD; when it is estimated from the sample, the standard error is itself estimated, which is why a t-distribution is used later for means.
Watch outAssuming precision improves as fast as sample size. It improves as root n: quadruple n to halve the standard error. Plans that promise otherwise are mis-costed.
Watch outApplying the CLT to dependent observations. The theorem needs independent draws; clustered or repeated measurements from the same person violate it and need different methods.
Check your understanding
A population has mean 50 and standard deviation 40. What are the mean and standard error of the sample mean for samples of n = 100?
Why does averaging n observations shrink the standard deviation by root n rather than by n?
A population is extremely skewed. With n = 5 the sample means are still skewed; with n = 200 they look normal. What changed, and what did not?
Multiple choice
A population has mean 200 and SD 60. For samples of size n = 36, what is the standard error of the sample mean?
What does the Central Limit Theorem say about the sampling distribution of the sample mean?
To halve the standard error of a sample mean, what must happen to the sample size?
In the 5000-sample simulation above, why did the sample means spread only from 61.2 to 323.2 when the population itself reaches 1000?
Which statement uses the term 'standard error' correctly?
Summary and next
The sampling distribution is the spread of a statistic across all possible samples of a given size. The Central Limit Theorem says that for independent draws with finite mean mu and SD sigma, the sample mean's distribution is approximately normal with mean mu and standard error sigma over root n. That error falls as root n, so quadrupling the sample halves it, and the normality claim — 67.88% of simulated means within one SE, 95.26% within two — holds even when the population itself is strongly skewed.
Next: confidence intervals. With the sampling distribution known, the sample mean can be turned into an interval that reports the precision of the estimate: a point value plus and minus a margin of error built from the standard error and a z level, with an interpretation more subtle than it first looks.