University

Econometrics basics · convergence

The Law of
Large Numbers

Free study notes from Econometrics basics (first-year foundations).

The sample mean is an estimate of the population mean, and it varies from sample to sample. Under random sampling with a finite variance, the probability that it lies within any chosen distance of the population mean approaches 1 as the sample size grows. This is the law of large numbers; it makes the sample mean a consistent estimator.

The law of large numbers and the central limit theorem are both results about the sample mean in large samples.

What it saysWhat it needsWhat it is used for
Law of large numbersThe sample mean is within any chosen distance of the population mean \(\mu\) with probability approaching 1 as n grows.Random sampling and a finite variance (a finite mean is enough, with a longer proof).Consistency of the sample mean, and of estimators built from sample means such as the OLS slope.
Central limit theoremIn large samples the sample mean is approximately normal, with mean \(\mu\) and standard deviation \(\sigma/\sqrt{n}\).Random sampling and a finite variance.The 1.96 in a 95% confidence interval, and tests on means and regression coefficients.

What the law says

The law states how likely the sample mean is to be far from the population mean when the sample is large.

The weak law of large numbers

Suppose \(X_1, \dots, X_n\) are drawn independently from the same population (random sampling), and the population has mean \(\mu\) and a finite variance \(\sigma^2\). Take any distance \(\varepsilon > 0\), however small. Then the probability that the sample mean \(\bar X_n\) is more than \(\varepsilon\) from \(\mu\) approaches zero as n grows:

$$ P\big(|\bar X_n-\mu|>\varepsilon\big) \to 0 \quad\text{as } n\to\infty . $$

Remarks. In words: take any margin around \(\mu\), however narrow; as the sample grows, the share of samples whose mean falls outside it approaches zero. The law is about the sample mean. Single observations stay as variable as ever. (A finite mean is enough for the law itself; the finite variance is what the short proof below uses.)

Here n is the number of observations in one sample. The capital letter in \(\bar X_n\) marks the sample mean as a random variable, which differs from sample to sample; \(\bar x_n\) is its value in the sample in hand. Books use other letters, and the choice is cosmetic. Lesson 4 introduces the law step by step.

What students say

“Nicky is an excellent econometrics tutor. He explains complex concepts clearly and makes them much easier to understand.”
Charles GardnerGoogle review
“I was completely lost in my economics class, and then I started working Nicky and he totally saved me. He was excellent at explaining the material and extremely accommodating to meet with me many times despite us being in different time zones! Highly recommend working with Nicky!”
Claire ChouGoogle review
“Nicky is a very good and thorough teacher. He has excellent knowledge of econometrics and takes the time to work through your questions. Highly recommended!”
ChrisEconometrics · 22/08
“Really great tutor! Encouraging, knowledgeable, friendly”
JedEconometrics · 09/02
“Very good lesson, Nicky is very helpful.”
ChrisEconometrics · 19/08
“Very helpful and clear.”
ClaireEconometrics · 22/01
“I gather it was very useful, thank you!”
ClaireEconometrics · 12/01
“Fantastic!”
JedEconometrics · 11/02

See it: a running mean, observation by observation

The animation follows one simulated series as it grows from 1 observation to 240. It plots the running mean: the mean of the first n observations, for each n.

123μ = 2150100150200240sample size n
n = 1

The running mean of one simulated autoregressive series (coefficient 0.5; its population mean, 2, is the dashed line): 2.305 at n = 1, 1.434 at n = 10, 1.912 at n = 100 and 1.912 at n = 240. Each value depends partly on the one before, so these are not independent draws. Press play, or drag the slider.

The running mean starts at 2.30 for n = 1, drops to 1.43 at n = 10, and from n = 100 onwards stays between 1.85 and 1.96, ending at 1.91, a little under the true mean of 2.

Figure 1. The running mean ends at 1.91, close to the population mean of 2 but not on it. The animation's 240 running means, with the population mean of 2 dashed. The running mean is below 2 at 172 of the 240 sample sizes and stays between 1.85 and 1.96 from n = 100 on. Source: the series stored in the animation on this page.

The table gives the running mean at four sample sizes and how far each lies above or below the population mean.

Observations n110100240
Running mean2.3051.4341.9121.912
Minus the population mean, 20.305-0.566-0.088-0.088

The nth observation enters the running mean with a weight of 1/n, so early observations move it a long way and later ones little. The series is dependent over time, so it is not a random sample and the box above does not cover it. A version of the law for dependent series does. Like the box, it promises only that the probability of a gap larger than any fixed distance approaches zero as n grows, not a mean of 2 at n = 240. Inferred from the series and its stored coefficient, the standard deviation of the mean of 240 observations is about 0.12, so a gap of 0.088 is an ordinary one.

Figure 2 shows independent draws, for which the conditions in the box hold: simulated exam grades, normal with mean 65 and standard deviation 10 marks. Under random sampling the mean of n such grades is then normal, with mean 65 and standard deviation \(10/\sqrt{n}\). A normal variable lies within 1.96 standard deviations of its mean with probability 95%. Hence at each n the running mean lies inside the band \(65 \pm 1.96 \times 10/\sqrt{n}\) with probability 95%.

Path 1 starts at 57.1 for n = 1, is 63.8 at n = 10 and 65.2 at n = 1,000, and ends at 64.98 at n = 10,000; the other two paths also close in on 65. A shaded band narrows from 65 ± 19.6 at n = 1 to 65 ± 0.20 at n = 10,000.

Figure 2. With independent draws the running mean closes in on 65, and the band that holds it with probability 95% at each n narrows like 1/√n. Three paths of 10,000 simulated grades (normal, mean 65, standard deviation 10), n on a log scale, with the band 65 ± 1.96 × 10/√n shaded. Path 1 (blue) is 57.07 at n = 1, 63.79 at n = 10, 65.45 at n = 100, 65.21 at n = 1,000 and 64.98 at n = 10,000. The band's half-width at the same n is 19.60, 6.20, 1.96, 0.62 and 0.20 marks. Simulation: numpy default_rng(2026), then rng.normal(65, 10, size=(3, 10000)), one row per path.

Why it holds

Three steps give the law: where the sample mean is centred, how far it spreads, and an inequality that turns a small spread into a small probability.

The centre. Each \(X_i\) is drawn from the population, so its expectation is \(\mu\). The expectation of a sum is the sum of the expectations. Hence \(E[\bar X_n] = n\mu/n = \mu\), at every n. Lesson 4 takes this step slowly.

The spread. We measure how far \(\bar X_n\) strays from \(\mu\) by the variance of the sample mean, \(E[(\bar X_n-\mu)^2]\). It is the average squared distance between the sample mean and the population mean, over all the samples that could be drawn. Under random sampling (the observations independent, each with the population's variance \(\sigma^2\)) it is

$$ \operatorname{Var}(\bar X_n) = \frac{\sigma^2}{n} . $$

In words: the variance of the sample mean is the variance of one observation divided by the number of observations.

Intuitively, the larger the sample, the more closely it resembles the population it was drawn from, so the less one sample's mean can differ from another's by chance. High and low values offset each other more fully. For the grades, \(\sigma^2 = 100\) marks squared, so the variance of the mean is 1 mark squared at n = 100 and 0.01 at n = 10,000. A variance is in squared units; the square roots, 1 and 0.1, are back in marks and give the typical distance between the sample mean and 65. Lesson 4 derives the formula step by step.

From a small spread to a small probability. Chebyshev's inequality states that, for any random variable with a finite variance, the probability of lying more than a distance \(\varepsilon\) from its mean is at most its variance divided by \(\varepsilon^2\). For a random variable Y with mean m:

$$ P\big(|Y-m|>\varepsilon\big) \le \frac{\operatorname{Var}(Y)}{\varepsilon^2} . $$

The variance and \(\varepsilon^2\) are both in squared units, so the bound is a pure number, as a probability must be.

Show why Chebyshev's inequality holds
  1. Start from the variance. \(\operatorname{Var}(Y) = E[(Y-m)^2]\) adds up the squared distance from m of every value Y can take, each weighted by its probability.
  2. Leave out the values near m. Every term in that sum is zero or positive, so leaving out the terms for values within \(\varepsilon\) of m cannot raise the total.
  3. Bound what is left. Each remaining value is more than \(\varepsilon\) from m, so its squared distance exceeds \(\varepsilon^2\), and the remaining weights add up to \(P(|Y-m|>\varepsilon)\). Hence \(\operatorname{Var}(Y) \ge \varepsilon^2\,P(|Y-m|>\varepsilon)\).
  4. Divide both sides by \(\varepsilon^2\).

Only the mean and the variance of Y are used, not the shape of its distribution.

Putting the steps together. Apply the inequality to the sample mean, whose variance under random sampling is \(\sigma^2/n\):

$$ P\big(|\bar X_n-\mu|>\varepsilon\big) \le \frac{\sigma^2}{n\,\varepsilon^2} . $$

For any fixed \(\varepsilon\) the bound falls to zero as n grows, and the probability, which cannot be negative, falls with it. That is the law. For the grades, with a margin of \(\varepsilon = 1\) mark, the bound is 100/n. At n = 100 it is 1, which says nothing, since every probability is at most 1; at n = 1,000 it is 0.1, and at n = 10,000 it is 0.01.

The bound is crude. The mean of normal grades is itself normal, with standard deviation \(10/\sqrt{1000} = 0.3162\) marks at n = 1,000. A margin of 1 mark is \(\sqrt{1000}/10 = 3.162\) of those standard deviations, and for a standard normal Z, \(P(|Z|>3.162) = 0.00157\): about 64 times below the bound. But the inequality needs only a finite variance, nothing about the shape of the distribution, so one argument covers every such population.

What the law does not say

The law is about the sample mean, not single observations. The 10,000th grade on a path is as variable as the first: normal, with mean 65 and standard deviation 10 marks.

Nor does a run get repaid. Path 3 in Figure 2 starts high: its first ten grades average 66.04, which is 1.04 marks above 65. In the running mean after 1,000 grades those ten carry a weight of 10/1,000 = 0.01:

$$ \begin{aligned} \bar x_{1000} &= 0.01 \times 66.038 + 0.99 \times 65.025 \\ &= 65.035 . \end{aligned} $$

Grades 11 to 1,000 did not fall below 65 to compensate: they averaged 65.025. The early excess has been diluted, not repaid: it now moves the running mean by \(0.01 \times 1.04 = 0.0104\) marks.

Draws from real data behave in the same way: in lesson 4, matches drawn at random, with replacement, from five Premier League seasons, in which the home side won a share of 0.441, give 7 home wins in the first 10 draws and a share of 0.4425 after 10,000.

With independent draws, the next draw has the same distribution whatever came before: after seven home wins in ten draws, the eleventh is a home win with probability 0.441, as the first was. Hence nothing makes an opposite run more likely, and expecting one is the gambler's fallacy.

Why it matters: consistency

An estimate is computed from one sample, so we want an assurance that, with enough data, it is close to the population value it estimates. An estimator is consistent if the probability that it misses the population value by more than any fixed distance approaches zero as n grows. The weak law says this of the sample mean, so under random sampling with a finite variance the sample mean is a consistent estimator of \(\mu\).

Other estimators are built from sample means, so the argument reaches them too. When the pairs \((X_i, Y_i)\) are drawn at random, a sample covariance with divisor n is the mean of the products \(x_iy_i\) minus the product of the two means (dividing by n - 1 instead makes no difference as n grows). By the law, each of those means closes in on its population value, and the same holds for a sample variance. The OLS slope, a sample covariance divided by a sample variance, therefore closes in on \(\operatorname{Cov}(X,Y)/\operatorname{Var}(X)\), provided \(\operatorname{Var}(X)\) is not zero. That ratio is the population slope when, in the population, \(Y\) is a straight line in \(X\) plus an error uncorrelated with \(X\).

Consistent is not the same as unbiased (centred on the population value at every n): lesson 4 has an estimator with each property and not the other.

Does it need independent data? (optional on a first reading)

No. A version of the law holds for a time series that is stationary (its mean, variance and correlations do not change over time) and whose correlations die away with distance. The animation's series, written \(Y_1, \dots, Y_n\), is of this kind if, as the coefficient of 0.5 stored with it suggests, it is a stationary first-order autoregression: each value's deviation from the mean is 0.5 times the previous value's deviation, plus an independent shock. Only the coefficient is recorded with the animation, so the numbers below rest on this reading. Values k periods apart then have correlation \(\rho(k) = 0.5^k\): 0.5 for neighbours, 0.25 two apart and 0.125 three apart.

Neighbouring values repeat part of the same information, so the mean of n of them varies more than the mean of n independent values. For a series with these correlations the variance of the sample mean is about three times \(\sigma^2/n\), where \(\sigma^2\) is the variance of one value. It still falls like 1/n, but 240 observations carry about as much information about the mean as 80 independent ones.

Show where the factor of three comes from
  1. The variance of a sum, with covariances. The variance of a sum is the sum of the variances plus twice the covariances of every pair (lesson 3). Independence removed the covariances and gave \(\sigma^2/n\); here they stay.
  2. Use stationarity. Each \(Y_t\) has variance \(\sigma^2\), and values k periods apart have covariance \(\sigma^2\rho(k)\). A series of n values has n - k such pairs, so the variance of their mean, \(\bar Y_n\), is $$ \begin{aligned} &\operatorname{Var}(\bar Y_n) \\ &\quad = \frac{\sigma^2}{n}\Big[1 + 2\sum_{k=1}^{n-1}\Big(1-\frac{k}{n}\Big)\rho(k)\Big] . \end{aligned} $$
  3. Put in the correlations. With \(\rho(k) = 0.5^k\) the bracket approaches \(1 + 2(0.5 + 0.25 + 0.125 + \dots) = 3\) as n grows; at n = 240 it is 2.98.
  4. Compare. \(\operatorname{Var}(\bar Y_{240}) \approx 3\sigma^2/240 = \sigma^2/80\), the variance of the mean of 80 independent observations.
  5. Put in the numbers. The 240 values behind the animation, recovered from its running means, have a standard deviation of about 1.08. Had they been independent, their mean would have a standard deviation of \(1.08/\sqrt{240} = 0.070\). On the reading above it is about \(1.08\times\sqrt{3/240} = 0.121\), and the final gap of 0.088 is 0.73 of that.

If the correlations did not die away, the bracket could grow without limit, and the variance of the mean need not fall to zero. That is why some condition of this kind is needed.

The page on estimating the mean of a time series continues from here.

Check your understanding

Does the law say that the 10,000th grade on a path is more likely to be close to 65 than the first?

No. Every grade comes from the same population, normal with mean 65 and standard deviation 10, so each lies more than 10 marks from 65 with probability 0.32, first or last. It is the mean that settles: the mean of 10,000 grades has standard deviation \(10/\sqrt{10000} = 0.1\) marks.

To halve the standard deviation of the sample mean, by what factor must the sample size grow?

Four. The standard deviation is \(\sigma/\sqrt{n}\), so halving it needs \(\sqrt{n}\) to double, which needs n to be four times as large: \(10/\sqrt{100} = 1\) mark, \(10/\sqrt{400} = 0.5\). Lesson 5 applies the same rule to the standard error.

State the law of large numbers and the central limit theorem in one sentence each.

Under random sampling with a finite variance: the law of large numbers says the sample mean is within any chosen distance of \(\mu\) with probability approaching 1 as n grows; the central limit theorem says that in large samples it is approximately normal, with mean \(\mu\) and standard deviation \(\sigma/\sqrt{n}\). The first says where the mean ends up, the second the shape of its distribution around \(\mu\).

The first grade on path 3 is 72.69, 7.69 marks above the population mean. What do we now expect the second grade to be, and the running mean after 1,000 grades?

The second grade: 65. The draws are independent, so the second has the same distribution whatever the first was. The running mean after 1,000 grades: on average \((72.69 + 999 \times 65)/1000 = 65.008\), since the first grade's excess of 7.69 marks is divided by 1,000, not cancelled by later low grades. On path 3 itself it came out at 65.035: grades 2 to 1,000 happened to average 65.028.

Four questions about the law of large numbers

What is the law of large numbers in simple terms?

It says that the mean of a large random sample is very likely to be close to the population mean, provided the variance is finite. Under random sampling the variance of the sample mean is σ²/n, which shrinks as n grows: for grades with standard deviation 10 marks, the mean of 100 grades has standard deviation 1 mark.

What is the difference between the law of large numbers and the central limit theorem?

Under random sampling with a finite variance, the law of large numbers says where the sample mean ends up: within any chosen distance of the population mean, with probability approaching 1 as n grows. The central limit theorem describes its distribution in large samples: approximately normal, with standard deviation σ/√n, 1 mark for a mean of 100 grades.

Does the law of large numbers mean a streak must reverse?

No. With independent draws the next draw has the same distribution whatever came before, so a streak has no tendency to reverse: it is diluted. In one simulation the first ten grades averaged 66.04, 1.04 marks above the population mean of 65, and after 1,000 grades they moved the running mean by 0.0104. Expecting a reversal is the gambler's fallacy.

What is the difference between the weak and the strong law of large numbers?

The weak law: as n grows, the probability that the sample mean misses the population mean by more than a fixed margin approaches zero (at most 0.1 for 1,000 grades and a 1-mark margin). The strong law: with probability 1, the running mean of a single endless sequence converges to the population mean. Consistency needs only the weak law.

Data and simulations. Animation and Figure 1: the 240 running means stored in the animation, from one simulated autoregressive series (coefficient 0.5, mean 2). The code and seed that generated it are not published with it, so the series is given as data; the values behind it are recovered as \(x_t = t\,\bar x_t - (t-1)\,\bar x_{t-1}\). Grades: numpy default_rng(2026), then rng.normal(65, 10, size=(3, 10000)); row 1 is path 1, row 3 is path 3, and the running mean at n is the mean of a row's first n values. Home wins: the 1,900 Premier League matches of 2019/20 to 2023/24 from openfootball/england (CC0), a home win being more home goals than away goals; a second, fresh default_rng(2026), then rng.choice(home_win, size=10000, replace=True). The animation reproduces a simulation from my lectures for Time Series Econometrics (ECON30401) at the University of Manchester.

Learning this for a
course or exam?

I tutor statistics and econometrics from first principles through to postgraduate level, with worked examples at your pace. The first consultation is free and lasts 30 minutes.

Book a consultation How sessions work & pricing
Free 30-min consultationNo obligation · reply within one business day
Book now