Skip to content
BIASED

The law of large numbers

Block 1 of 7~2 min

Where the average sits

The topic Inequalities and concentration bounded how far an average can stray from its mean. For the sample mean, Chebyshev's inequality gave

P(∣Xˉn−μ∣≥ε)≤σ2nε2,P(|\bar X_n - \mu| \ge \varepsilon) \le \frac{\sigma^2}{n\varepsilon^2},

and Hoeffding's inequality gave a far smaller bound for bounded variables. Each bound is about one fixed nn. What is still missing is the limit: what happens to the average itself as the data keep coming. That is the law of large numbers.

The setup for the whole topic: X1,X2,…X_1, X_2, \dots are i.i.d. with mean μ\mu and, where needed, variance σ2\sigma^2. The sample mean is

Xˉn=X1+⋯+Xnn.\bar X_n = \frac{X_1 + \dots + X_n}{n}.

Two facts from earlier topics say where it sits and how widely it spreads. By linearity, E[Xˉn]=μ\mathbb E[\bar X_n] = \mu. Variances of independent variables add (Joint distributions and independence), and the factor 1/n1/n comes out of a variance squared, so

Var⁡(Xˉn)=nσ2n2=σ2n.\operatorname{Var}(\bar X_n) = \frac{n\sigma^2}{n^2} = \frac{\sigma^2}{n}.

The centre stays put while the variance shrinks like 1/n1/n, and the standard deviation like σ/n\sigma/\sqrt n.

The running example is a classifier that errs on each test example independently with probability pp. Let Xi=1X_i = 1 if example ii is misclassified and 00 otherwise. Then Xˉn\bar X_n is the error rate measured on a test set of size nn, with μ=p\mu = p and σ2=p(1−p)\sigma^2 = p(1-p).

Answers are saved on the server and tied to this browser until you sign in.