Algorithm Search⌘K

Theoremcore

Glivenko-Cantelli theorem

Also called fundamental theorem of statistics.

The empirical distribution function converges to the true distribution function uniformly in x, almost surely, as the sample size grows.

The Glivenko-Cantelli theorem says that the empirical distribution function FnF_n of an independent sample converges to the true distribution function FF uniformly over the whole real line, with probability 1. The law of large numbers gives Fn(t)→F(t)F_n(t) \to F(t) at each single point tt; the theorem adds that the convergence is uniform in tt, for every FF, with no condition of continuity or moments. So the whole distribution, and with it every quantity that depends continuously on the distribution function, can be learned from data. The DKW inequality gives the rate, and the Kolmogorov-Smirnov test uses the limit law of the uniform distance.

Statement

Let X1,X2,…X_1, X_2, \ldots be independent random variables with the same distribution function FF, and let Fn(t)=1n#{i≤n:Xi≤t}F_n(t) = \frac{1}{n} \#\{i \le n : X_i \le t\}. Put

Dn=sup⁡t∈R∣Fn(t)−F(t)∣.D_n = \sup_{t \in \mathbb{R}} \lvert F_n(t) - F(t) \rvert.

Theorem (Glivenko, Cantelli). For every distribution function FF, Dn→0D_n \to 0 almost surely as n→∞n \to \infty.

Fn−FF_n - F is right-continuous, so the sup equals the sup over the rational numbers and DnD_n is a random variable. Glivenko proved the theorem for continuous FF, and Cantelli for every FF.

In plain words

Draw a sample and plot the share of the sample below each value. As the sample grows, this staircase comes close to the true curve, and it comes close everywhere at the same time, not only at one point that you chose in advance.

This holds for every distribution of real numbers: smooth or with jumps, with heavy tails or without. Nothing about the shape of the distribution must be known. So a large enough sample tells you the whole distribution, up to a small error everywhere.

Proof

Fix an integer k≥2k \ge 2. For j=1,…,k−1j = 1, \ldots, k - 1 let qj=inf⁡{t:F(t)≥j/k}q_j = \inf\{t : F(t) \ge j/k\}, and let q0=−∞q_0 = -\infty and qk=+∞q_k = +\infty, with F(−∞)=Fn(−∞)=0F(-\infty) = F_n(-\infty) = 0 and F(+∞−)=Fn(+∞−)=1F(+\infty-) = F_n(+\infty-) = 1. Write G(t−)G(t-) for the limit from the left.

Step 1: the grid controls the jumps of FF. By right-continuity, F(qj)≥j/kF(q_j) \ge j/k. For t<qjt < q_j, F(t)<j/kF(t) < j/k, so F(qj−)≤j/kF(q_j-) \le j/k. Hence F(qj−)−F(qj−1)≤j/k−(j−1)/k=1/kF(q_j-) - F(q_{j-1}) \le j/k - (j-1)/k = 1/k for j=1,…,kj = 1, \ldots, k.

Step 2: the error between grid points. Let t∈[qj−1,qj)t \in [q_{j-1}, q_j). Both FnF_n and FF are nondecreasing, so

Fn(t)−F(t)≤Fn(qj−)−F(qj−1)=(Fn(qj−)−F(qj−))+(F(qj−)−F(qj−1)),F_n(t) - F(t) \le F_n(q_j-) - F(q_{j-1}) = \left(F_n(q_j-) - F(q_j-)\right) + \left(F(q_j-) - F(q_{j-1})\right),
F(t)−Fn(t)≤F(qj−)−Fn(qj−1)=(F(qj−1)−Fn(qj−1))+(F(qj−)−F(qj−1)).F(t) - F_n(t) \le F(q_j-) - F_n(q_{j-1}) = \left(F(q_{j-1}) - F_n(q_{j-1})\right) + \left(F(q_j-) - F(q_{j-1})\right).

The intervals [qj−1,qj)[q_{j-1}, q_j) for j=1,…,kj = 1, \ldots, k cover R\mathbb{R}; some can be empty when FF has a jump that covers several levels j/kj/k. With Step 1,

Dn≤max⁡1≤j≤k−1max⁡(∣Fn(qj−)−F(qj−)∣,∣Fn(qj)−F(qj)∣)+1k=:Mn,k+1k,D_n \le \max_{1 \le j \le k - 1} \max\left(\lvert F_n(q_j-) - F(q_j-) \rvert, \lvert F_n(q_j) - F(q_j) \rvert\right) + \frac{1}{k} =: M_{n,k} + \frac{1}{k},

because the terms with q0=−∞q_0 = -\infty and qk=+∞q_k = +\infty are 0.

Step 3: finitely many points. Fn(qj)=1n∑i≤n1{Xi≤qj}F_n(q_j) = \frac{1}{n}\sum_{i \le n} \mathbf{1}\{X_i \le q_j\} is an average of independent Bernoulli variables with mean F(qj)F(q_j), and Fn(qj−)=1n∑i≤n1{Xi<qj}F_n(q_j-) = \frac{1}{n}\sum_{i \le n} \mathbf{1}\{X_i < q_j\} is an average of independent Bernoulli variables with mean F(qj−)F(q_j-). By the strong law of large numbers each of these 2(k−1)2(k - 1) averages converges to its mean almost surely. A finite intersection of events of probability 1 has probability 1, so Mn,k→0M_{n,k} \to 0 almost surely, and lim sup⁡nDn≤1/k\limsup_n D_n \le 1/k almost surely.

Step 4: all kk. The event {lim sup⁡nDn≤1/k for all k≥2}\{\limsup_n D_n \le 1/k \text{ for all } k \ge 2\} is a countable intersection of events of probability 1, so it has probability 1, and on it Dn→0D_n \to 0. ■\blacksquare

The proof uses only independence for the strong law at each grid point, so the same argument works for any sequence for which the strong law holds at each fixed tt, for example a stationary ergodic sequence.

Consequences

Consistency of plug-in estimators. If a functional TT is continuous at FF for the sup distance, then T(Fn)→T(F)T(F_n) \to T(F) almost surely. The pp-quantile Fn−1(p)F_n^{-1}(p) converges to F−1(p)F^{-1}(p) when FF is strictly increasing at F−1(p)F^{-1}(p), so sample medians and sample quantiles are consistent.

Consistency of the Kolmogorov-Smirnov test. If the true FF differs from the hypothesized F0F_0, then sup⁡t∣Fn−F0∣→sup⁡t∣F−F0∣>0\sup_t \lvert F_n - F_0 \rvert \to \sup_t \lvert F - F_0 \rvert > 0, while the critical value tends to 0. So the test rejects with probability tending to 1 against every fixed alternative.

The bootstrap. The bootstrap draws from FnF_n in place of FF. The theorem says that FnF_n is uniformly close to FF for large nn, which is the first step of every proof that the bootstrap works.

Learning theory. Half-lines (−∞,t](-\infty, t] form a class of sets of VC dimension 1. The theorem is the simplest case of the uniform law of large numbers over a class of finite VC dimension, which makes empirical risk minimization consistent.

The rate. The DKW inequality, P(Dn>ε)≤2e−2nε2P(D_n > \varepsilon) \le 2e^{-2n\varepsilon^2}, gives the rate 1/n1/\sqrt{n} and, by the Borel-Cantelli lemma, a second proof of the theorem. In a Monte Carlo run with uniform data, r=200r = 200 samples for each nn and seed 2026, the mean of DnD_n was 0.25920.2592, 0.087320.08732, 0.028140.02814 and 0.0089910.008991 for n=10n = 10, 100100, 10001000 and 1000010000. Times n\sqrt{n} these are 0.8200.820, 0.8730.873, 0.8900.890 and 0.8990.899, near the mean π/2ln⁡2=0.8687\sqrt{\pi/2} \ln 2 = 0.8687 of the Kolmogorov limit law.

Tightness

Not over all sets. For continuous FF, sup⁡A∣Pn(A)−P(A)∣=1\sup_A \lvert P_n(A) - P(A) \rvert = 1 for every nn when the sup runs over all Borel sets AA: the finite set A={X1,…,Xn}A = \{X_1, \ldots, X_n\} has Pn(A)=1P_n(A) = 1 and P(A)=0P(A) = 0. The uniform convergence needs a small class of sets, such as the half-lines.

Not without independence or ergodicity. If Xi=X1X_i = X_1 for all ii and FF is continuous, FnF_n is the single step at X1X_1, and Dn=max⁡(F(X1),1−F(X1))≥1/2D_n = \max(F(X_1), 1 - F(X_1)) \ge 1/2 for every nn. Each XiX_i still has the distribution function FF.

No faster than 1/(2n)1/(2n). For continuous FF, FnF_n jumps by 1/n1/n at x(i)x_{(i)} while FF does not jump, so Fn−FF_n - F changes by 1/n1/n there and Dn≥1/(2n)D_n \ge 1/(2n) for every sample. The typical size is 1/n1/\sqrt{n}, by the Monte Carlo run above.

History

Valery Glivenko (1933) proved the uniform convergence for continuous FF, and Francesco Paolo Cantelli (1933) gave the result for every FF; both papers appeared in volume 4 of the Giornale dell'Istituto Italiano degli Attuari, after Kolmogorov's paper on the limit law of nDn\sqrt{n} D_n in the same volume. Dvoretzky, Kiefer and Wolfowitz (1956) gave an exponential bound for P(Dn>ε)P(D_n > \varepsilon), and the theory of empirical processes later extended the theorem from half-lines to classes of sets and functions.

References

  1. V. Glivenko, Sulla determinazione empirica delle leggi di probabilità, Giornale dell'Istituto Italiano degli Attuari 4, 1933, pages 92 to 99, the uniform convergence of the empirical distribution function to a continuous distribution function
  2. F. P. Cantelli, Sulla determinazione empirica delle leggi di probabilità, Giornale dell'Istituto Italiano degli Attuari 4, 1933, pages 421 to 424, the extension of the uniform convergence to every distribution function
  3. A. W. van der Vaart, Asymptotic Statistics, Cambridge University Press, 1998, Chapter 19 (empirical processes), Section 19.1 (the empirical distribution function and the proof of the Glivenko-Cantelli theorem with a finite grid)
  4. A. Dvoretzky, J. Kiefer and J. Wolfowitz, Asymptotic minimax character of the sample distribution function and of the classical multinomial estimator, Annals of Mathematical Statistics 27(3), 1956, pp. 642 to 669 (the exponential bound on the uniform distance, which gives the rate)

Where this leads

About this page

The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.

LadderLevelWhat the next level needs
Human proofH0 no proof
  • add a proof in proofs/ (06.5)
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW4 complete
  • a review of the text: no review record reviews/TMG7CE/text.yaml