Module contents
Lesson 16 of 24Core 100 min

Modes of convergence of random variables

Convergence has at least four meanings in probability: almost surely, in probability, in Lᵖ and in distribution. Study their relationships and counterexamples, the Borel–Cantelli lemmas, uniform integrability, Lévy's continuity theorem, Slutsky's lemma and continuous mapping: the language of limit theorems and convergence results for stochastic algorithms.

After this lesson you can

  • Define the four modes of convergence and prove the implications between them.
  • Construct counterexamples for every implication that does not hold.
  • Apply the Borel–Cantelli lemmas to decide whether an event occurs infinitely often.
  • Use uniform integrability to pass from convergence in probability to convergence of expectations.
  • Apply Slutsky's lemma, continuous mapping and Lévy's continuity theorem.

Before you start

Motivation: “converges” in what sense?

You train a model by stochastic gradient descent and write “the algorithm converges” in the report. In probability, this says nothing until you specify what convergence means, because the iterates θt\theta_t are random variables and the phrase can mean at least four distinct, nonequivalent things:

  • Every run stabilizes. If you repeat training with different seeds, each curve eventually stays close to θ⋆\theta^\star. This is almost sure convergence.
  • At any given time, being far away is unlikely. For a fixed large tt, the probability that θt\theta_t is more than ε\varepsilon from θ⋆\theta^\star is small. A particular run may still jump occasionally. This is convergence in probability.
  • The average error vanishes. E∥θt−θ⋆∥2→0\E\norm{\theta_t - \theta^\star}^2 \to 0. This is convergence in L2L^2 (generally, in LpL^p).
  • The law of θt\theta_t approaches a limiting distribution. With a constant step, SGD iterates often form a Markov chain that stabilizes in distribution: it keeps moving, with variance on the order of the step, and the distribution converges, not the point. This is convergence in distribution.

With decreasing steps and Robbins–Monro conditions one typically proves the first; with a constant step, only the last. An article saying “converges” without specifying which of the four completely changes what you have learned. The same holds for a Monte Carlo estimator (does its error vanish in every run or is it merely unlikely to be large?), a statistical estimator (“consistent” usually means in probability), and the limit theorems in the coming lessons: the weak law of large numbers is in probability, the strong law is almost sure, and the central limit theorem is in distribution. This lesson is the dictionary.

To see all four modes at once, the next figure draws many trajectories n↦Xn(ω)n \mapsto X_n(\omega) of sequences that approach 00 in very different ways, and measures in three panels the probability P(∣Xn∣>ε)\Pr(\abs{X_n} > \varepsilon), the moment E∣Xn∣p\E\abs{X_n}^p and the fraction of trajectories that will never again leave the band. The lesson uses them to build all the counterexamples.

InteractiveZoo of convergence modes
Paths n↦Xn(ω)n \mapsto X_n(\omega) (logarithmic nn axis)
banda |x| ≤ ε
P(∣Xn∣>ε)\Pr(|X_n| > \varepsilon)
E∣Xn∣1\E|X_n|^{1} (log-log: slope is the exponent)
fraction of stabilized paths
  • already stabilized path · estimate from 10001000 paths
  • path that will still jump
  • theoretical value
  • band ∣x∣≤ε\abs{x} \le \varepsilon
1.00
1.00
LpL^p norm
0.25
n = 512
converges almost surelyyes
converges in probabilityyes
converges in L1L^{1}no
converges in distribution to 00yes
P^(∣Xn∣>ε)\hat{\Pr}(|X_n| > \varepsilon) at n=512n = 5120.001
E^∣Xn∣1\hat{\E}|X_n|^{1} at n=512n = 5120.512
stabilized paths99.9 %
Almost surely: yes. Reason: a single UU: U>0U > 0 almost surely, so U≥n−sU \ge n^{-s} eventually and the path ends at 00. In order 1 mean: no. Reason: E∣Xn∣p=nap−s=n0.00\E|X_n|^p = n^{ap - s} = n^{0.00} is constant =1= 1.
We simulate 1000 trajectories n↦Xn(ω)n \mapsto X_n(\omega) up to n=2048n = 2048 and show up to n=512n = 512 (logarithmic axis; large positive values are drawn on a log⁡10(1+x)\log_{10}(1 + x) scale). Top panel: 2626 trajectories; the green band is ∣x∣≤ε\abs{x} \le \varepsilon. Blue indicates those that will never again leave the band over the remaining horizon; orange indicates those with a jump still ahead. Below, left to right: P(∣Xn∣>ε)\Pr(\abs{X_n} > \varepsilon) (convergence in probability), E∣Xn∣p\E\abs{X_n}^p on a log-log scale (the slope is the exponent: convergence in LpL^p), and the fraction of stabilized trajectories (almost sure convergence: over an infinite horizon it would tend to 11). The dashed line is the theoretical value. Try the spike with one UU (almost surely, in probability, but not in L1L^1: its expectation is always 11), independent spikes with probability 1/n1/n (in probability but not almost surely: the stabilized fraction remains low) and with 1/n21/n^2 (almost surely and in L1L^1, but not in L2L^2), and the typewriter (in LpL^p for every pp, but no trajectory stabilizes). With the aa and ss sliders, na 1{Un<n−s}n^a\,\ind\{U_n < n^{-s}\} converges in LpL^p if and only if ap<sap < s. Moving ε\varepsilon changes little for spikes and much for the normal mean.

Before formalizing, three observations the figure reveals and the lesson will prove.

  1. Almost sure and LpL^p convergence do not imply one another. The spike with one UU converges almost surely but not in L1L^1; the typewriter converges in every LpL^p but not almost surely.
  2. Both are stronger than convergence in probability. In both cases the probability of being outside the band tends to 00. But that probability looks at one time nn at a time; almost sure convergence looks at the entire tail {k≥n}\{k \ge n\} at once, reflected in the fraction of stabilized trajectories.
  3. The sum of probabilities decides. With independent spikes of probability 1/n1/n, which do not converge almost surely, and of probability 1/n21/n^2, which do, the only change is whether ∑nP(An)\sum_n \Pr(A_n) converges. This is the Borel–Cantelli lemma, proved in one line.

The four modes of convergence

All variables in this section live on the same probability space (Ω,F,P)(\Omega, \mathcal{F}, \Pr): X1,X2,…X_1, X_2, \dots and XX are real random variables on it. (Convergence in distribution is the exception, as we will see.)

Two clarifications about the last definition. First, it depends only on the distributions: XnX_n and XX can live on different probability spaces, and Xn→dXX_n \xrightarrow{d} X is a statement about the sequence of laws PXn\Pr_{X_n}, also written PXn⇒PX\Pr_{X_n} \Rightarrow \Pr_X or Fn⇒FF_n \Rightarrow F. Second, the restriction to continuity points is necessary: Xn=1/nX_n = 1/n converges to X=0X = 0 in any reasonable sense, but Fn(0)=0F_n(0) = 0 for every nn and F(0)=1F(0) = 1; equality fails only at the jump of FF.

A useful characterization of almost sure convergence

The existence of a set of probability one cannot be seen in a simulation. Almost sure convergence can be handled using two reformulations involving only probabilities of events of the form “ever after nn.”

Proof

(1 ⇔\Leftrightarrow 2) A real sequence aka_k fails to converge to 00 if and only if there is an m∈Nm \in \N with ∣ak∣>1/m\abs{a_k} > 1/m for infinitely many kk. Hence {Xn↛X}=⋃m≥1{∣Xk−X∣>1/m i.o.}\{X_n \not\to X\} = \bigcup_{m \ge 1} \{\abs{X_k - X} > 1/m \text{ i.o.}\}. A countable union of null sets is null, and each is contained in {Xn↛X}\{X_n \not\to X\}: the union is null if and only if every term is.

(2 ⇔\Leftrightarrow 3) Let Bn=⋃k≥n{∣Xk−X∣>ε}={sup⁡k≥n∣Xk−X∣>ε}B_n = \bigcup_{k \ge n}\{\abs{X_k - X} > \varepsilon\} = \{\sup_{k \ge n}\abs{X_k - X} > \varepsilon\}. This is a decreasing sequence of events whose intersection is {∣Xk−X∣>ε i.o.}\{\abs{X_k - X} > \varepsilon \text{ i.o.}\}. By continuity of probability from above (the measure is finite), P(Bn)↓P(⋂nBn)\Pr(B_n) \downarrow \Pr(\bigcap_n B_n). Thus this limit is 00 if and only if P(Bn)→0\Pr(B_n) \to 0.

∎

Condition 3 says sup⁡k≥n∣Xk−X∣→0\sup_{k \ge n}\abs{X_k - X} \to 0 in probability. Almost sure convergence is therefore convergence in probability of the whole tail at once. The first implication follows immediately.

Basic implications

Proof

(1) {∣Xn−X∣>ε}⊂{sup⁡k≥n∣Xk−X∣>ε}\{\abs{X_n - X} > \varepsilon\} \subset \{\sup_{k \ge n}\abs{X_k - X} > \varepsilon\} and the probability of the second tends to 00 by the tail criterion.

(2) By Markov’s inequality applied to ∣Xn−X∣p\abs{X_n - X}^p: P(∣Xn−X∣>ε)≤E∣Xn−X∣p/εp→0\Pr(\abs{X_n - X} > \varepsilon) \le \E\abs{X_n - X}^p/\varepsilon^p \to 0. For q≤pq \le p, Jensen’s inequality (with concave function t↦tq/pt \mapsto t^{q/p}) gives E∣Y∣q≤(E∣Y∣p)q/p\E\abs{Y}^q \le (\E\abs{Y}^p)^{q/p}; with Y=Xn−XY = X_n - X the right-hand side tends to 00.

(3) Let xx be a continuity point of FF and ε>0\varepsilon > 0. Since {X≤x−ε}⊂{Xn≤x}∪{∣Xn−X∣>ε}\{X \le x - \varepsilon\} \subset \{X_n \le x\} \cup \{\abs{X_n - X} > \varepsilon\} and {Xn≤x}⊂{X≤x+ε}∪{∣Xn−X∣>ε}\{X_n \le x\} \subset \{X \le x + \varepsilon\} \cup \{\abs{X_n - X} > \varepsilon\},

F(x−ε)−P(∣Xn−X∣>ε)≤Fn(x)≤F(x+ε)+P(∣Xn−X∣>ε).F(x - \varepsilon) - \Pr(\abs{X_n - X} > \varepsilon) \le F_n(x) \le F(x + \varepsilon) + \Pr(\abs{X_n - X} > \varepsilon).

Taking n→∞n \to \infty, F(x−ε)≤lim inf⁡Fn(x)≤lim sup⁡Fn(x)≤F(x+ε)F(x - \varepsilon) \le \liminf F_n(x) \le \limsup F_n(x) \le F(x + \varepsilon), and then taking ε→0\varepsilon \to 0 with FF continuous at xx, gives Fn(x)→F(x)F_n(x) \to F(x).

∎

This gives the hierarchy “almost surely ⇒\Rightarrow in probability ⇒\Rightarrow in distribution” and “Lp⇒L^p \Rightarrow in probability”, with no other arrows. All others are false in general, and two questions organize the rest of the lesson: which counterexamples show this? and which extra assumption restores each arrow? The first is answered by the Borel–Cantelli lemmas and concrete sequences; the second by subsequences, uniform integrability and domination.

The Borel–Cantelli lemmas

Everything distinguishing “almost surely” from “in probability” is a question of how many times an event in an infinite list occurs. Given events A1,A2,…A_1, A_2, \dots, the event “AnA_n occurs infinitely often” is

{An i.o.}=lim sup⁡nAn=⋂n≥1⋃k≥nAk\{A_n \text{ i.o.}\} = \limsup_n A_n = \bigcap_{n \ge 1}\bigcup_{k \ge n} A_k

(i.o. means infinitely often): “for every nn there is a k≥nk \ge n with AkA_k”. Its probability, seemingly difficult, is determined in two extreme cases by a series of numbers: the sum of probabilities.

The key is the counter N=∑n1AnN = \sum_n \ind_{A_n}, the number of events that occur. By monotone convergence, E[N]=∑nP(An)\E[N] = \sum_n \Pr(A_n). If the sum is finite, NN is integrable and hence finite almost surely. That is the first half. The second says that if the sum diverges and events do not “clump together” (they are independent), NN is infinite almost surely.

Proof

(I) For each nn, {Ak i.o.}⊂⋃k≥nAk\{A_k \text{ i.o.}\} \subset \bigcup_{k \ge n} A_k, so P(Ak i.o.)≤∑k≥nP(Ak)\Pr(A_k \text{ i.o.}) \le \sum_{k \ge n}\Pr(A_k). The right-hand side is the tail of a convergent series, and hence tends to 00 as n→∞n \to \infty.

(II) It suffices to show that, for every nn, P(⋃k≥nAk)=1\Pr(\bigcup_{k \ge n}A_k) = 1: a countable intersection of probability-one events has probability one. Its complement is ⋂k≥nAkc\bigcap_{k \ge n}A_k^c and, by independence and the inequality 1−x≤e−x1 - x \le e^{-x}, for m≥nm \ge n:

P(⋂k=nmAkc)=∏k=nm(1−P(Ak))≤exp⁡(−∑k=nmP(Ak))→m→∞0,\Pr\Big(\bigcap_{k=n}^m A_k^c\Big) = \prod_{k=n}^m \big(1 - \Pr(A_k)\big) \le \exp\Big(-\sum_{k=n}^m \Pr(A_k)\Big) \xrightarrow[m \to \infty]{} 0,

because the series diverges. The infinite intersection is their decreasing limit, and its probability is 00.

∎

This is a “zero-one law”: for independent events there are only two possibilities, and the sum of probabilities says which. The figure shows this with P(An)=n−p\Pr(A_n) = n^{-p}: the sum converges if and only if p>1p > 1, and the threshold p=1p = 1 is that of the harmonic series.

InteractiveFinitely or infinitely often?
Where AnA_n occurs in each realization (logarithmic nn axis; orange: n≥1000n \ge 1000)
Fraction of rows with an event in each decade
Mean number of events up to nn versus ∑k≤nP(Ak)\sum_{k \le n} \Pr(A_k)
  • occurrence of AnA_n (n<1000n < 1000)
  • occurrence with n≥1000n \ge 1000
  • observed mean
  • theoretical value per decade
  • sum of probabilities
1.00
∑n≤104P(An)\sum_{n \le 10^4} \Pr(A_n)9.788
ζ(p)=∑n≥1n−p\zeta(p) = \sum_{n \ge 1} n^{-p}∞
mean events per row (observed)10.67
rows with at least one event at n≥1000n \ge 100045 of 48
∑nn−p=∞\sum_n n^{-p} = \infty with independent events: by Borel–Cantelli II, almost surely infinitely many occur (on average about ln⁡10≈2.3\ln 10 \approx 2.3 per decade).
Each row is a realization of independent events An={Un<n−p}A_n = \{U_n < n^{-p}\}, n=1,…,104n = 1, \dots, 10^4, and each point marks an nn where AnA_n occurs (logarithmic axis). Orange points occur for n≥1000n \ge 1000. With p≤1p \le 1 they keep appearing in every decade, and with p>1p > 1 they stop: this is the Borel–Cantelli partition. The first lower panel counts, in each decade, the fraction of rows with at least one event (bars: observed across 4848 rows; horizontal segments: theoretical value 1−∏(1−n−p)1 - \prod(1 - n^{-p})); with p=1p = 1 it is near 0.90.9 in every decade (in the first it is 11, since A1A_1 always occurs), and with p=2p = 2 it falls to 0.0010.001 in the last. The second compares the observed mean event count up to nn with ∑k≤nP(Ak)\sum_{k \le n}\Pr(A_k), its exact expected value. Turn off independence: with a single UU per row the events are nested (occurring exactly for n<U−1/pn < U^{-1/p}), and although ∑P(An)\sum\Pr(A_n) diverges for p≤1p \le 1, only finitely many occur. Without independence, (II) fails.

Two consequences for convergence

The tail criterion suggests looking at An={∣Xn−X∣>ε}A_n = \{\abs{X_n - X} > \varepsilon\}: Xn→XX_n \to X almost surely means P(An i.o.)=0\Pr(A_n \text{ i.o.}) = 0 for each ε\varepsilon. By (I), that probability is zero whenever P(An)\Pr(A_n) are summable, even when the AnA_n are strongly correlated.

This is the rule behind every “sufficient speed implies almost surely.” By Markov, for example, ∑nE∣Xn−X∣p<∞\sum_n \E\abs{X_n - X}^p < \infty suffices. Figure 1 shows it: with probability n−sn^{-s} and s>1s > 1, the sum converges, and the sequence converges almost surely even with independent spikes.

A second consequence repairs the failure of “in probability ⇒\Rightarrow almost surely” at the cost of a subsequence.

Proof

(⇒\Rightarrow) Given a subsequence, since it converges in probability we can choose indices k1<k2<⋯k_1 < k_2 < \cdots with P(∣Xnkj−X∣>2−j)<2−j\Pr(\abs{X_{n_{k_j}} - X} > 2^{-j}) < 2^{-j}. These probabilities are summable, and by (I), almost surely ∣Xnkj−X∣≤2−j\abs{X_{n_{k_j}} - X} \le 2^{-j} for all sufficiently large jj: the further subsequence converges almost surely.

(⇐\Leftarrow) If Xn̸→PXX_n \not\xrightarrow{\Pr} X, there are ε,δ>0\varepsilon, \delta > 0 and a subsequence with P(∣Xnk−X∣>ε)≥δ\Pr(\abs{X_{n_k} - X} > \varepsilon) \ge \delta for every kk. A further subsequence converging almost surely would converge in probability, contradicting that inequality.

∎

This criterion has a conceptual corollary. In any topological space, if every subsequence of (xn)(x_n) has a further subsequence converging to xx, then xn→xx_n \to x (otherwise a neighborhood of xx would exclude infinitely many xnx_n, and that subsequence would have no further subsequence converging to xx). Convergence in LpL^p and convergence in probability (which is metrizable) obey this. But the typewriter in the next section converges to 00 in probability, so every subsequence has a further subsequence converging to 00 almost surely; yet the whole sequence does not converge almost surely: almost sure convergence is not convergence in any topology. That is why so many proofs use the tail criterion instead of distances.

Counterexamples: the typewriter and escaping mass

The two sequences explaining almost all the failed arrows live on Ω=(0,1)\Omega = (0, 1) with Lebesgue measure; UU is the identity function (uniform) and 1A\ind_A the indicator.

The typewriter. For n=2k+jn = 2^k + j with 0≤j<2k0 \le j < 2^k, let In=[j/2k,(j+1)/2k)I_n = [j/2^k, (j+1)/2^k) and

Xn=1In(U).X_n = \ind_{I_n}(U).

The intervals traverse [0,1)[0, 1) left to right in ever finer levels, like a typewriter carriage. We have P(Xn≠0)=∣In∣=2−k→0\Pr(X_n \ne 0) = \abs{I_n} = 2^{-k} \to 0 and E∣Xn∣p=2−k\E\abs{X_n}^p = 2^{-k} for every pp: Xn→0X_n \to 0 in LpL^p for every pp and in probability. But at every level kk some jj satisfies U(ω)∈I2k+jU(\omega) \in I_{2^k + j}, that is, Xn(ω)=1X_n(\omega) = 1 for at least one nn per level: Xn(ω)=1X_n(\omega) = 1 infinitely often for every ω\omega. The sequence Xn(ω)X_n(\omega) converges nowhere. Thus Lp⇏L^p \not\Rightarrow almost surely, and P⇏\Pr \not\Rightarrow almost surely.

The escaping spike. Let

Xn=n 1{U<1/n}.X_n = n\,\ind\{U < 1/n\}.

It is a rectangle of height nn and width 1/n1/n that grows thinner and taller, with area 11 always. For every ω\omega with U(ω)>0U(\omega) > 0 (probability one), Xn(ω)=0X_n(\omega) = 0 once n>1/U(ω)n > 1/U(\omega): Xn→0X_n \to 0 almost surely, and hence in probability. But EXn=n⋅1n=1\E X_n = n \cdot \tfrac1n = 1 for every nn, so it does not converge to 00 in L1L^1, or in LpL^p, p≥1p \ge 1 (EXnp=np−1\E X_n^p = n^{p-1}). This is “escaping” mass: expectation lives on a set of vanishing probability, invisible to almost sure pointwise convergence. Thus almost surely ⇏L1\not\Rightarrow L^1 and in probability ⇏L1\not\Rightarrow L^1.

The table summarizes these and three more, drawn by the Figure 1 zoo’s sequence menu.

Sequence (Xn→0X_n \to 0?)a.s.in probabilityL1L^1L2L^2
Typewriternoyesyesyes
n 1{U<1/n}n\,\ind\{U < 1/n\}, one UUyesyesno (E=1\E = 1)no
n 1{Un<1/n}n\,\ind\{U_n < 1/n\}, independent UnU_nnoyesno (E=1\E = 1)no
n 1{Un<1/n2}n\,\ind\{U_n < 1/n^2\}, independent UnU_nyesyesyes (E=1/n\E = 1/n)no (EXn2=1\E X_n^2 = 1)
Mean of nn standard normals Zˉn\bar Z_nyesyesyesyes

The third row contrasts instructively with the second: the same P(Xn≠0)=1/n\Pr(X_n \neq 0) = 1/n, but with independent UnU_n instead of one UU. Events An={Un<1/n}A_n = \{U_n < 1/n\} are independent and ∑1/n=∞\sum 1/n = \infty: by (II), infinitely many occur almost surely, and the sequence does not converge almost surely, although it converges in probability. Each XnX_n has the same marginal probability as before, yet convergence changes completely because almost sure convergence depends on how the XnX_n relate to one another; the other modes (probability, LpL^p, distribution), when the limit is constant, look only at each XnX_n‘s law separately and cannot tell. The fourth row is the opposite: with s=2>1s = 2 > 1, Borel–Cantelli I gives almost sure convergence; it is in L1L^1 (E=1/n\E = 1/n) and not L2L^2 (EXn2=n2/n2=1\E X_n^2 = n^2/n^2 = 1), showing also that L1L^1 does not imply L2L^2: the implication Lp⇒LqL^p \Rightarrow L^q only goes downward. Generally, for na1{Un<n−s}n^a \ind\{U_n < n^{-s}\}, E∣Xn∣p=nap−s\E\abs{X_n}^p = n^{ap - s} tends to 00 if and only if ap<sap < s: the axis of Figure 1’s sliders.

The last counterexample concerns convergence in distribution. Let Z∼N(0,1)Z \sim \Normal(0, 1) and Xn=(−1)nZX_n = (-1)^n Z. Each XnX_n has law N(0,1)\Normal(0, 1), so Xn→dZX_n \xrightarrow{d} Z trivially. But ∣Xn−Z∣=2∣Z∣\abs{X_n - Z} = 2\abs{Z} for odd nn: it does not converge in probability to ZZ (or any other variable). Convergence in distribution compares the laws of XnX_n and XX, not the variables themselves. One exception works when the limit is constant: Xn→dcX_n \xrightarrow{d} c implies Xn→PcX_n \xrightarrow{\Pr} c, because P(∣Xn−c∣>ε)≤1−Fn(c+ε/2)+Fn(c−ε/2)→1−1+0\Pr(\abs{X_n - c} > \varepsilon) \le 1 - F_n(c + \varepsilon/2) + F_n(c - \varepsilon/2) \to 1 - 1 + 0, since FF is the step at cc and c±ε/2c \pm \varepsilon/2 are continuity points.

Uniform integrability: the bridge between probability and L1L^1

The escaping spike warns when limits and expectations cannot be exchanged after convergence in probability: Xn→0X_n \to 0 in probability and EXn=1↛0=E[lim⁡Xn]\E X_n = 1 \not\to 0 = \E[\lim X_n]. In real applications, such as the expected value of a loss converging in probability, an importance estimator with enormous weights or a martingale, the crucial question is: what stops mass from escaping to infinity? The answer has a name.

In words, the part of the expectation living in large values can be made small simultaneously for the whole family, by choosing sufficiently large KK. Any single integrable variable satisfies this (dominated convergence); “uniform” adds that KK does not depend on the family member. The escaping spike violates this plainly: E[Xn1{Xn>K}]=1\E[X_n \ind\{X_n > K\}] = 1 for every n>Kn > K.

Proof

(2) E[∣Xi∣1{∣Xi∣>K}]≤E[Y1{Y>K}]\E[\abs{X_i}\ind\{\abs{X_i} > K\}] \le \E[Y\ind\{Y > K\}], which tends to 00 by dominated convergence with dominator YY. (3) On {∣Xi∣>K}\{\abs{X_i} > K\}, ∣Xi∣≤∣Xi∣1+δ/Kδ\abs{X_i} \le \abs{X_i}^{1+\delta}/K^\delta, so E[∣Xi∣1{∣Xi∣>K}]≤K−δsup⁡iE∣Xi∣1+δ→0\E[\abs{X_i}\ind\{\abs{X_i} > K\}] \le K^{-\delta}\sup_i\E\abs{X_i}^{1+\delta} \to 0. (4) E∣Xi∣≤K+E[∣Xi∣1{∣Xi∣>K}]\E\abs{X_i} \le K + \E[\abs{X_i}\ind\{\abs{X_i} > K\}] and choose KK so the last term is ≤1\le 1. (1) is a finite union of single-element families.

∎

Criterion (3) is used in practice: “the second moments are bounded, so the family is UI.” It saves na1{U<1/n}n^{a}\ind\{U < 1/n\} with a<1a < 1 (bounded in L1/aL^{1/a}) from the counterexample, and fails when a=1a = 1. Now for the theorem justifying the name “bridge.”

Proof

(1 ⇒\Rightarrow 2) By (4), C=sup⁡nE∣Xn∣<∞C = \sup_n\E\abs{X_n} < \infty. Since Xn→XX_n \to X in probability, a subsequence converges almost surely and Fatou’s lemma gives E∣X∣≤lim inf⁡E∣Xnk∣≤C\E\abs{X} \le \liminf \E\abs{X_{n_k}} \le C: X∈L1X \in L^1. Fix ε>0\varepsilon > 0 and let Bn={∣Xn−X∣>ε}B_n = \{\abs{X_n - X} > \varepsilon\}, with P(Bn)→0\Pr(B_n) \to 0. Then

E∣Xn−X∣≤ε+E[∣Xn∣1Bn]+E[∣X∣1Bn].\E\abs{X_n - X} \le \varepsilon + \E\big[\abs{X_n}\ind_{B_n}\big] + \E\big[\abs{X}\ind_{B_n}\big].

Given η>0\eta > 0, choose KK with sup⁡nE[∣Xn∣1{∣Xn∣>K}]<η\sup_n\E[\abs{X_n}\ind\{\abs{X_n} > K\}] < \eta. Then E[∣Xn∣1Bn]≤KP(Bn)+η\E[\abs{X_n}\ind_{B_n}] \le K\Pr(B_n) + \eta. Also E[∣X∣1Bn]→0\E[\abs{X}\ind_{B_n}] \to 0, because XX is integrable and P(Bn)→0\Pr(B_n) \to 0 (absolute continuity of the integral: E[∣X∣1B]\E[\abs{X}\ind_B] is small if P(B)\Pr(B) is, by dominated convergence). Thus lim sup⁡E∣Xn−X∣≤ε+η\limsup\E\abs{X_n - X} \le \varepsilon + \eta, and ε,η\varepsilon, \eta are arbitrary.

(2 ⇒\Rightarrow 1) Since ∣Xn∣≤∣Xn−X∣+∣X∣\abs{X_n} \le \abs{X_n - X} + \abs{X}, for any BB we have E[∣Xn∣1B]≤E∣Xn−X∣+E[∣X∣1B]\E[\abs{X_n}\ind_B] \le \E\abs{X_n - X} + \E[\abs{X}\ind_B]. Given η>0\eta > 0, choose n0n_0 with E∣Xn−X∣<η\E\abs{X_n - X} < \eta for n≥n0n \ge n_0, and δ>0\delta > 0 with E[∣X∣1B]<η\E[\abs{X}\ind_B] < \eta if P(B)<δ\Pr(B) < \delta. With B={∣Xn∣>K}B = \{\abs{X_n} > K\}, Markov gives P(B)≤E∣Xn∣/K≤C/K<δ\Pr(B) \le \E\abs{X_n}/K \le C/K < \delta for large KK (C=sup⁡E∣Xn∣<∞C = \sup\E\abs{X_n} < \infty because it converges in L1L^1). Then E[∣Xn∣1{∣Xn∣>K}]<2η\E[\abs{X_n}\ind\{\abs{X_n} > K\}] < 2\eta for n≥n0n \ge n_0, and the finitely many variables n<n0n < n_0 are handled by criterion 1 above.

The LpL^p statement reduces to this one. If (∣Xn∣p)(\abs{X_n}^p) is UI, it is bounded in L1L^1 and Fatou, as above, gives X∈LpX \in L^p; since ∣Xn−X∣p≤2p−1(∣Xn∣p+∣X∣p)\abs{X_n - X}^p \le 2^{p-1}(\abs{X_n}^p + \abs{X}^p), the family (∣Xn−X∣p)(\abs{X_n - X}^p) is also UI (a sum of two UI families is UI), and converges to 00 in probability; applying the p=1p = 1 case gives E∣Xn−X∣p→0\E\abs{X_n - X}^p \to 0. The converse is analogous, with ∣Xn∣p≤2p−1(∣Xn−X∣p+∣X∣p)\abs{X_n}^p \le 2^{p-1}(\abs{X_n - X}^p + \abs{X}^p).

∎

Uniform integrability is exactly the required condition: not a superfluous technical assumption but a characterization. It also governs martingales (a martingale converges in L1L^1 if and only if it is UI) and convergence of expectations of importance-weighted estimators. The next table lists ways to fix a broken arrow and the tool behind each assumption.

FailureSufficient additionWhy
in probability ⇒\Rightarrow almost surelypass to a subsequence, or summable rate ∑P(∣Xn−X∣>ε)<∞\sum\Pr(\abs{X_n - X} > \varepsilon) < \inftyBorel–Cantelli I
in probability ⇒\Rightarrow LpL^p(∣Xn∣p)(\abs{X_n}^p) UIVitali
almost surely ⇒\Rightarrow LpL^pdomination ∣Xn∣≤Y∈Lp\abs{X_n} \le Y \in L^pdominated convergence (a special case of Vitali)
Lp⇒L^p \Rightarrow almost surely∑E∣Xn−X∣p<∞\sum\E\abs{X_n - X}^p < \inftyMarkov and Borel–Cantelli I
in distribution ⇒\Rightarrow in probabilitythe limit is constantthe FnF_n concentrate at cc

Convergence in distribution

Convergence in distribution is the least intuitive and most widely used, because it appears in the central limit theorem and generative models. It has several equivalent formulations (the Portmanteau theorem). To prove them, the key tool reduces convergence in distribution to almost sure convergence by changing probability space.

Proof

Let Qn(u)=inf⁡{x:Fn(x)≥u}Q_n(u) = \inf\{x : F_n(x) \ge u\} be the quantile function of FnF_n and QQ that of FF. If UU is uniform on (0,1)(0, 1), Qn(U)Q_n(U) has distribution function FnF_n (because Qn(u)≤x⇔u≤Fn(x)Q_n(u) \le x \Leftrightarrow u \le F_n(x)): this is inverse transform sampling. Take Yn=Qn(U)Y_n = Q_n(U) and Y=Q(U)Y = Q(U) and show Qn(u)→Q(u)Q_n(u) \to Q(u) at every uu where QQ is continuous. Since QQ is monotone, it has at most countably many discontinuities, so the result holds almost surely.

Let uu be a continuity point of QQ and ε>0\varepsilon > 0. Lower bound: choose a continuity point xx of FF with Q(u)−ε<x<Q(u)Q(u) - \varepsilon < x < Q(u) (continuity points are dense). Since x<Q(u)x < Q(u), F(x)<uF(x) < u; then Fn(x)<uF_n(x) < u for large nn and hence Qn(u)≥x>Q(u)−εQ_n(u) \ge x > Q(u) - \varepsilon. Upper bound: continuity of QQ at uu gives u′∈(u,1)u' \in (u, 1) with Q(u′)<Q(u)+ε/2Q(u') < Q(u) + \varepsilon/2. Choose a continuity point xx of FF in (Q(u′),Q(u)+ε)(Q(u'), Q(u) + \varepsilon). Then F(x)≥F(Q(u′))≥u′>uF(x) \ge F(Q(u')) \ge u' > u, so Fn(x)>uF_n(x) > u for large nn and Qn(u)≤x<Q(u)+εQ_n(u) \le x < Q(u) + \varepsilon.

∎

Skorokhod is a legitimate trick: replace the variables by others with the same laws for which convergence is almost sure; since convergence in distribution looks only at laws, we can prove it with those variables. The code figure below measures the speed of this quantile coupling.

Proof

(1 ⇒\Rightarrow 2) With Yn→YY_n \to Y almost surely from Skorokhod, f(Yn)→f(Y)f(Y_n) \to f(Y) almost surely, and since ff is bounded, dominated convergence gives Ef(Xn)=Ef(Yn)→Ef(Y)=Ef(X)\E f(X_n) = \E f(Y_n) \to \E f(Y) = \E f(X). (2 ⇒\Rightarrow 3) is trivial. (3 ⇒\Rightarrow 4) Let CC be closed and fk(x)=max⁡(0,1−k dist(x,C))f_k(x) = \max(0, 1 - k\,\text{dist}(x, C)): it is bounded, kk-Lipschitz, fk≥1Cf_k \ge \ind_C and fk↓1Cf_k \downarrow \ind_C. Then lim sup⁡nP(Xn∈C)≤lim⁡nEfk(Xn)=Efk(X)\limsup_n\Pr(X_n \in C) \le \lim_n\E f_k(X_n) = \E f_k(X), and the last term tends to P(X∈C)\Pr(X \in C) as k→∞k \to \infty. (4 ⇔\Leftrightarrow 5) follows by complements. (4, 5 ⇒\Rightarrow 6) Since P(X∈∂A)=0\Pr(X \in \partial A) = 0, P(X∈intA)=P(X∈A)=P(X∈Aˉ)\Pr(X \in \text{int}A) = \Pr(X \in A) = \Pr(X \in \bar A); and lim inf⁡P(Xn∈A)≥lim inf⁡P(Xn∈intA)≥P(X∈intA)\liminf\Pr(X_n \in A) \ge \liminf\Pr(X_n \in \text{int}A) \ge \Pr(X \in \text{int}A), whereas lim sup⁡P(Xn∈A)≤lim sup⁡P(Xn∈Aˉ)≤P(X∈Aˉ)\limsup\Pr(X_n \in A) \le \limsup\Pr(X_n \in \bar A) \le \Pr(X \in \bar A). (6 ⇒\Rightarrow 1) With A=(−∞,x]A = (-\infty, x], ∂A={x}\partial A = \{x\} and P(X=x)=0\Pr(X = x) = 0 if and only if xx is a continuity point of FF.

∎

Formulation 2 is useful because convergence in distribution is convergence of expectations of test functions. Writing “Ef(Xn)→Ef(X)\E f(X_n) \to \E f(X)” says XnX_n and XX look alike to every bounded continuous observable. Formulation 6 shows in what sense it is weak: with Xn=1/n→0X_n = 1/n \to 0, the set A={0}A = \{0\} gives P(Xn∈A)=0\Pr(X_n \in A) = 0 for every nn and P(X∈A)=1\Pr(X \in A) = 1, without contradiction because ∂A={0}\partial A = \{0\} has positive probability under the limiting law and AA is excluded. Point masses need not converge.

Lévy’s continuity theorem

Distribution functions cannot be added, multiplied or checked by eye for a sum of variables. The characteristic function φn(t)=E[eitXn]\varphi_n(t) = \E[e^{itX_n}] can. The next theorem turns convergence in distribution into pointwise convergence of functions R→C\mathbb{R} \to \mathbb{C}, making the proof of the central limit theorem possible.

Proof

(1) cos⁡(tx)\cos(tx) and sin⁡(tx)\sin(tx) are bounded and continuous: apply formulation 2 of Portmanteau to each.

(2) Step 1: the sequence is tight (∀ε ∃K\forall\varepsilon\ \exists K with P(∣Xn∣>K)<ε\Pr(\abs{X_n} > K) < \varepsilon for every nn). Use the truncation inequality

P(∣X∣≥2/δ)≤1δ∫−δδ(1−φX(t)) ⁣dt.\Pr\big(\abs{X} \ge 2/\delta\big) \le \frac1\delta\int_{-\delta}^{\delta}\big(1 - \varphi_X(t)\big)\dd t.

Indeed, 1δ∫−δδ(1−eitx) ⁣dt=2(1−sin⁡δxδx)\frac1\delta\int_{-\delta}^\delta(1 - e^{itx})\dd t = 2\big(1 - \tfrac{\sin\delta x}{\delta x}\big), which is always ≥0\ge 0 and ≥1\ge 1 if ∣δx∣≥2\abs{\delta x} \ge 2 (since ∣sin⁡u/u∣≤1/2\abs{\sin u/u} \le 1/2 for ∣u∣≥2\abs{u} \ge 2); take expectations and apply Fubini. Since g(0)=1g(0) = 1 and gg is continuous at 00, for given ε\varepsilon there is δ\delta with 1δ∫−δδ(1−g)<ε/2\frac1\delta\int_{-\delta}^\delta(1 - g) < \varepsilon/2. By dominated convergence (∣1−φn∣≤2\abs{1 - \varphi_n} \le 2), 1δ∫−δδ(1−φn)→1δ∫−δδ(1−g)<ε/2\frac1\delta\int_{-\delta}^\delta(1 - \varphi_n) \to \frac1\delta\int_{-\delta}^\delta(1 - g) < \varepsilon/2, so P(∣Xn∣≥2/δ)<ε\Pr(\abs{X_n} \ge 2/\delta) < \varepsilon for n≥n0n \ge n_0. Handle the finitely many variables n<n0n < n_0 individually.

Step 2. By Helly’s selection theorem, every subsequence of (Fn)(F_n) has a further subsequence converging at continuity points to a nondecreasing function GG; tightness makes GG a proper distribution function. By (1), the characteristic function of GG is lim⁡φnk=g\lim\varphi_{n_k} = g. All further subsequences have the same limit, since uniqueness says gg determines the law. A number sequence (Fn(x)F_n(x)) for which every subsequence has a further subsequence with the same limit converges to that limit.

∎

There are two messages. First, continuity at 00 of the limit is not optional: if Xn∼N(0,n)X_n \sim \Normal(0, n), then φn(t)=e−nt2/2→1{t=0}\varphi_n(t) = e^{-nt^2/2} \to \ind\{t = 0\}, discontinuous at 00, and indeed XnX_n converges in distribution to nothing (mass escapes to ±∞\pm\infty: there is no tightness). Second, in practice one uses direction (2): computing φn\varphi_n of a normalized sum is easy (multiply), and convergence to e−t2/2e^{-t^2/2} suffices to conclude the limit is normal. The central limit theorem lesson does exactly that.

Continuous mapping and Slutsky’s lemma

Convergence in distribution would be useless if we could not operate with it. The continuous mapping theorem and Slutsky’s lemma make this possible.

Proof

Almost surely: on the probability-one set where Xn(ω)→X(ω)X_n(\omega) \to X(\omega) and X(ω)∉DgX(\omega) \notin D_g, g(Xn(ω))→g(X(ω))g(X_n(\omega)) \to g(X(\omega)) by continuity at X(ω)X(\omega). Probability: let (g(Xnk))(g(X_{n_k})) be a subsequence; by the subsequence criterion, a further subsequence has Xnkj→XX_{n_{k_j}} \to X almost surely, so (previous case) g(Xnkj)→g(X)g(X_{n_{k_j}}) \to g(X) almost surely; the same criterion in the other direction gives g(Xn)→g(X)g(X_n) \to g(X) in probability. Distribution: by Skorokhod, Yn→YY_n \to Y almost surely and g(Yn)→g(Y)g(Y_n) \to g(Y) almost surely, so g(Yn)→dg(Y)g(Y_n) \xrightarrow{d} g(Y); and g(Yn)=dg(Xn)g(Y_n) \overset{d}{=} g(X_n), g(Y)=dg(X)g(Y) \overset{d}{=} g(X).

∎

Three cautions: (i) the result is false in LpL^p (if Xn→0X_n \to 0 in L1L^1, Xn2X_n^2 need not converge in L1L^1: the spike with a=1/2a = 1/2); (ii) the assumption on DgD_g is necessary: g=1(0,∞)g = \ind_{(0, \infty)} and Xn=1/n→0X_n = 1/n \to 0 give g(Xn)=1g(X_n) = 1 but g(0)=0g(0) = 0, and 0∈Dg0 \in D_g has probability one; (iii) for random vectors the proof is the same, with Skorokhod’s theorem in Rd\R^d and “distribution” as weak convergence of measures.

The proof uses a lemma at the heart of the result: two sequences close in probability share their limit in distribution.

Proof

Lemma. If Un→dUU_n \xrightarrow{d} U and ∣Zn−Un∣→P0\abs{Z_n - U_n} \xrightarrow{\Pr} 0, then Zn→dUZ_n \xrightarrow{d} U. Indeed, let ff be bounded by BB and LL-Lipschitz. For ε>0\varepsilon > 0, ∣f(Zn)−f(Un)∣≤Lε+2B1{∣Zn−Un∣>ε}\abs{f(Z_n) - f(U_n)} \le L\varepsilon + 2B\ind\{\abs{Z_n - U_n} > \varepsilon\}, so lim sup⁡∣Ef(Zn)−Ef(Un)∣≤Lε\limsup\abs{\E f(Z_n) - \E f(U_n)} \le L\varepsilon for every ε\varepsilon, meaning the difference tends to 00. Since Ef(Un)→Ef(U)\E f(U_n) \to \E f(U), also Ef(Zn)→Ef(U)\E f(Z_n) \to \E f(U), and formulation 3 of Portmanteau concludes.

Sum. Un=Xn+c→dX+cU_n = X_n + c \xrightarrow{d} X + c and ∣(Xn+Yn)−Un∣=∣Yn−c∣→P0\abs{(X_n + Y_n) - U_n} = \abs{Y_n - c} \xrightarrow{\Pr} 0.

Product. Un=cXn→dcXU_n = cX_n \xrightarrow{d} cX and ∣XnYn−Un∣=∣Xn∣∣Yn−c∣\abs{X_nY_n - U_n} = \abs{X_n}\abs{Y_n - c}. Given η>0\eta > 0, tightness of (Xn)(X_n) gives KK with P(∣Xn∣>K)<η\Pr(\abs{X_n} > K) < \eta for every nn (every sequence converging in distribution is tight: take continuity points ±K0\pm K_0 of FF with F(K0)−F(−K0)>1−η/2F(K_0) - F(-K_0) > 1 - \eta/2, so P(∣Xn∣>K0)<η\Pr(\abs{X_n} > K_0) < \eta for large nn, and enlarge K0K_0 to cover the finitely many remaining); then P(∣Xn∣∣Yn−c∣>ε)≤η+P(∣Yn−c∣>ε/K)→η\Pr(\abs{X_n}\abs{Y_n - c} > \varepsilon) \le \eta + \Pr(\abs{Y_n - c} > \varepsilon/K) \to \eta, and η\eta is arbitrary.

Quotient. By continuous mapping (g(y)=1/yg(y) = 1/y is continuous at c≠0c \ne 0, with convention 1/0=01/0 = 0), 1/Yn→P1/c1/Y_n \xrightarrow{\Pr} 1/c, and apply the product result.

∎

Why “constant”: merely requiring Yn→dYY_n \xrightarrow{d} Y makes the conclusion false. With Xn=ZX_n = Z and Yn=−ZY_n = -Z, Z∼N(0,1)Z \sim \Normal(0, 1), both converge in distribution to N(0,1)\Normal(0, 1) but Xn+Yn=0X_n + Y_n = 0, which is not N(0,2)\Normal(0, 2). For a pair we need the joint law, which the marginal laws do not determine (the copula is another piece of information). With Yn→cY_n \to c in probability, the joint limiting law is trivially the product X⊗δcX \otimes \delta_c.

Slutsky in action: the tt statistic

The canonical example. Let XiX_i be iid with mean μ\mu and variance σ2∈(0,∞)\sigma^2 \in (0, \infty). The central limit theorem says Tn=n(Xˉn−μ)/σ→dN(0,1)T_n = \sqrt n(\bar X_n - \mu)/\sigma \xrightarrow{d} \Normal(0, 1), but requires knowing σ\sigma. In practice, use sample standard deviation SnS_n. By the strong law of large numbers (next lesson, applied to XiX_i and Xi2X_i^2), Sn2=nn−1(X2‾n−Xˉn2)→σ2S_n^2 = \frac{n}{n-1}\big(\overline{X^2}_n - \bar X_n^2\big) \to \sigma^2 almost surely, so Sn/σ→P1S_n/\sigma \xrightarrow{\Pr} 1. By Slutsky,

tn=n(Xˉn−μ)Sn=Tn⋅σSn→dN(0,1)⋅1.t_n = \frac{\sqrt n(\bar X_n - \mu)}{S_n} = T_n \cdot \frac{\sigma}{S_n} \xrightarrow{d} \Normal(0, 1) \cdot 1.

This justifies the confidence interval Xˉn±1.96 Sn/n\bar X_n \pm 1.96\,S_n/\sqrt n without knowing σ\sigma or assuming normal data. It is purely asymptotic: it says nothing about speed. The figure compares both formulations on the same samples.

InteractiveSlutsky in action
Tn=n(Xˉn−μ)/σT_n = \sqrt n(\bar X_n - \mu)/\sigma, with n=12n = 12
  • T_n
  • N(0, 1)
tn=n(Xˉn−μ)/Snt_n = \sqrt n(\bar X_n - \mu)/S_n, with n=12n = 12
  • t_n
  • N(0, 1)
Kolmogorov distance to standard normal versus nn (logarithmic scale)
  • T_n (σ known)
  • t_n (σ estimated)
Population
12
Kolmogorov distance from TnT_n to N(0,1)\Normal(0,1)0.043
Kolmogorov distance from tnt_n to N(0,1)\Normal(0,1)0.093
P(tn<−1.96)\Pr(t_n < -1.96) (nominal 0.0250.025)0.110
P(tn>1.96)\Pr(t_n > 1.96) (nominal 0.0250.025)0.012
coverage of interval Xˉ±1.96 Sn/n\bar X \pm 1.96\,S_n/\sqrt n87.9 %
Sn/σS_n/\sigma: mean and standard deviation0.940 and 0.366
Sn→σS_n \to \sigma in probability: the standard deviation of Sn/σS_n/\sigma is 0.37 at n=12n = 12 and shrinks like 1/n1/\sqrt n. By Slutsky, tnt_n and TnT_n share a limit but differ for finite nn (population skewness: 2).
For each skewed population (or the symmetric uniform), we simulate 25002500 replicates of a sample of size nn and compute, on the same samples, Tn=n(Xˉn−μ)/σT_n = \sqrt n(\bar X_n - \mu)/\sigma (true σ\sigma, blue) and tn=n(Xˉn−μ)/Snt_n = \sqrt n(\bar X_n - \mu)/S_n (estimated SnS_n, orange). The overlaid curve is the standard normal density. Below, the Kolmogorov distance sup⁡x∣F^(x)−Φ(x)∣\sup_x\abs{\hat F(x) - \Phi(x)} of each against nn (the Monte Carlo noise floor with 25002500 replicates is about 0.0170.017). Both approach N(0,1)\Normal(0, 1), but tnt_n lags: with small SnS_n, tnt_n shoots up and the tails are skewed (the 95 %95\,\% interval misses almost entirely on one side). The Sn/σS_n/\sigma reading shows Slutsky's “in probability” part: its spread shrinks like 1/n1/\sqrt n. With the log-normal, the difference remains visible even at n=600n = 600.

The complete implication map

We now have all the pieces. The next interactive map shows implications that always hold, counterexamples to the others, and assumptions repairing each one. Click an arrow: green ones include a proof sketch, red ones an animated counterexample, and enabling an additional assumption turns the corresponding red arrow green.

InteractiveImplication map
almost surelyin Lpin probabilityin distribution
  • valid implication
  • valid with the assumption enabled
  • does not hold in general
Counterexample
Typewriter: Xn=1In(U)X_n = \ind_{I_n}(U) with InI_n the dyadic interval [j/2k,(j+1)/2k)[j/2^k, (j+1)/2^k), n=2k+jn = 2^k + j. Since P(Xn=1)=2−k→0\Pr(X_n = 1) = 2^{-k} \to 0, it converges to 00 in probability (and in LpL^p). But each ω\omega lies in an interval at every level kk: Xn(ω)=1X_n(\omega) = 1 for infinitely many nn, so the sequence converges for no ω\omega.
With an additional assumption
Enable «pass to a subsequence» or «summable rate: ∑nP(∣Xn−X∣>ε)<∞\sum_n \Pr(|X_n - X| > \varepsilon) < \infty» to see when the implication holds.
Typewriter: interval InI_n on Ω=[0,1)\Omega = [0, 1). Drag ω\omega.
n = 63 (nivel k = 5, j = 31)
Xk(ω)X_k(\omega) for k≤nk \le n: equals 11 on 6 occasions and does not stop
n = 63
selected arrowfails in general
P(Xn=1)=E∣Xn∣p\Pr(X_n = 1) = \E|X_n|^p at n=63n = 631/32 = 0.0313
Xn→XX_n \to X in probability   ⇏  \;\not\Rightarrow\; almost surely
Four modes of convergence and eight arrows. Click an arrow's circle for its proof or counterexample. In the counterexamples, drag ω\omega over Ω=[0,1)\Omega = [0, 1) and use the player to advance nn: in the typewriter, the bottom row shows Xn(ω)=1X_n(\omega) = 1 never stops; in the spike, each ω\omega trajectory eventually reaches 00 but the rectangle's area is always 11; in the alternating sign, points jump between diagonal and antidiagonal with the same law. Switches add assumptions (uniform integrability, domination, constant limit, subsequence, summable rate) that turn broken arrows green.

The map reduces to one sentence per mode:

  • Almost surely controls each trajectory. This is what you want when running one algorithm.
  • In probability controls each instant. This is what you prove with only Chebyshev or Chernoff bounds.
  • LpL^p controls mean error. This is the natural mode for quadratic bounds and function norms.
  • In distribution controls only laws. This is the mode of limit theorems and asymptotic inference.

The arrows’ direction is consistent: what a whole trajectory says (a.s.) implies what an instant says (probability), which implies what the law says (distribution), while mean error (LpL^p) sits alongside, implying probability without a connection to a.s.

Skorokhod in general, and beyond. All of the above uses real XnX_n and XX, but holds for random vectors in Rd\R^d and, with suitable modifications, in separable metric spaces (with PXn⇒PX\Pr_{X_n} \Rightarrow \Pr_X defined via Portmanteau formulation 2). This underlies stochastic process theory, needed in the martingale and diffusion process modules, and results such as Donsker’s invariance principle, stated using weak convergence of laws on a space of continuous functions. A final note: convergence in distribution is not the only way to compare laws. Quantifying the difference using a distance (total variation or Wasserstein) or a divergence that is not a distance (Kullback–Leibler) requires going further; the lesson on distances between distributions and couplings covers these. Among other things, Scheffé’s theorem says that if densities converge pointwise, pn→pp_n \to p almost everywhere, then ∫∣pn−p∣→0\int\abs{p_n - p} \to 0, much more than convergence in distribution.

Implementation from scratch

Using NumPy, we build the five sequences in the table and a diagnostic measuring, for each, the three quantities in Figure 1: probability P^(∣Xn∣>ε)\hat\Pr(\abs{X_n} > \varepsilon), moment E^∣Xn∣\hat\E\abs{X_n} and fraction of trajectories stabilized from nn (those with no exceedance between nn and the horizon). Column jj of the array corresponds to n=j+1n = j + 1.

[ ]Five sequences, three convergence measuresBrowser
import numpy as np
from scipy import stats

rng = np.random.default_rng(16)
M, N = 2000, 1024                       # trayectorias y horizonte
n = np.arange(1, N + 1, dtype=float)    # la columna j corresponde a n = j + 1

def maquina(M):
    "X_n = 1{U en I_n}, con I_n = [j/2^k, (j+1)/2^k) y n = 2^k + j"
    U = rng.random(M)[:, None]
    w = 2.0 ** np.floor(np.log2(n))
    return ((U >= (n - w) / w) & (U < (n - w + 1) / w)).astype(float)

def pico_unico(M):
    "X_n = n 1{U < 1/n} con un solo U por trayectoria"
    return n * (rng.random(M)[:, None] < 1 / n)

def picos_indep(M, s):
    "X_n = n 1{U_n < n^-s} con U_n independientes"
    return n * (rng.random((M, N)) < n ** (-float(s)))

def medias(M):
    "X_n = media de n normales estándar"
    return np.cumsum(rng.standard_normal((M, N)), axis=1) / n

def diagnostico(X, eps=0.25, p=1):
    A = np.abs(X)
    prob = (A > eps).mean(axis=0)                    # P(|X_n| > eps), una por columna
    mom = (A ** p).mean(axis=0)                      # E|X_n|^p
    exceso = A > eps
    ultimo = np.where(exceso.any(axis=1), N - np.argmax(exceso[:, ::-1], axis=1), 0)
    estab = lambda n0: np.mean(ultimo < n0)          # fracción de trayectorias sin excesos desde n0
    return prob, mom, estab

secuencias = {
    "máquina de escribir": (maquina(M), 1 / 512),
    "n·1{U<1/n}, un solo U": (pico_unico(M), 1.0),
    "picos independientes, prob. 1/n": (picos_indep(M, 1), 1.0),
    "picos independientes, prob. 1/n²": (picos_indep(M, 2), 1 / 512),
    "media de normales": (medias(M), np.sqrt(2 / np.pi / 512)),
}
print(f"{'sucesión (n = 512)':34s} {'P(|X|>ε)':>9s} {'E|X| est.':>10s} {'E|X| teor.':>11s} {'estabilizadas':>14s}")
for nombre, (X, teo) in secuencias.items():
    prob, mom, estab = diagnostico(X)
    print(f"{nombre:34s} {prob[511]:9.4f} {mom[511]:10.3f} {teo:11.3f} {estab(512):14.3f}")

The table confirms the five rows. Probability P^(∣Xn∣>ε)\hat\Pr(\abs{X_n} > \varepsilon) is small in all (all five converge in probability). Observed means agree with theory: ≈1\approx 1 for the two probability-1/n1/n spikes (which do not converge in L1L^1) and near 00 for the other three. Beware the first’s noise: at n=512n = 512 only about 44 of 20002000 trajectories spike, and each contributes 512/2000≈0.26512/2000 \approx 0.26 to the mean; the same escaping mass now appears as huge Monte Carlo estimator variance. The key column is the last: the stabilized fraction is 0.9980.998 for the one-UU spike and the probability-1/n21/n^2 spikes, near 11, indicating “almost surely”; 0.4970.497 for independent probability-1/n1/n spikes (with horizon 10241024, P(ninguˊn pico entre 512 y 1024)=∏(1−1/k)=511/1024\Pr(\text{ningún pico entre } 512 \text{ y } 1024) = \prod(1 - 1/k) = 511/1024, which is measured), and exactly 00 for the typewriter (each trajectory returns to 11 in the last complete level). These last two do not converge almost surely, although the first column says they do in probability. The phenomenon is the same as Figure 1, now measured in code.

Now verify Borel–Cantelli with a large simulation: for independent P(An)=n−p\Pr(A_n) = n^{-p}, compare the mean event count, the sum ∑P(An)\sum\Pr(A_n), and the fraction of realizations with another event after n=1000n = 1000.

[ ]Borel–Cantelli: the sum of probabilities decidesBrowser
rng2 = np.random.default_rng(3)
R, NN = 4000, 10_000
k = np.arange(1, NN + 1, dtype=float)
print("p    sum P(A_n)   media observada   filas con algún suceso n>=1000")
for p in (0.8, 1.0, 1.2, 2.0):
    A = rng2.random((R, NN)) < k ** (-p)
    print(f"{p:.1f}  {np.sum(k ** (-p)):10.3f}  {A.sum(axis=1).mean():15.3f}   {np.mean(A[:, 999:].any(axis=1)):.3f}")

The observed mean agrees with the sum within Monte Carlo error (the identity E[N]=∑P(An)\E[N] = \sum\Pr(A_n)). With p=2p = 2 it is 1.651.65 (the sum is π2/6=1.645\pi^2/6 = 1.645) and only 0.1 %0.1\,\% of rows have an event from n=1000n = 1000 onward; with p=1p = 1 the sum is 9.799.79 up to 10410^4, which is H104H_{10^4}, and 90 %90\,\% of rows still have an event at n≥1000n \ge 1000 (theory: 1−∏n=1000104(1−1/n)=1−999/104=0.901 - \prod_{n=1000}^{10^4}(1 - 1/n) = 1 - 999/10^4 = 0.90). The critical value is p=1p = 1, and this is not a boundary effect: these are the infinitely many occurrences of (II), spaced at ln⁡10≈2.3\ln 10 \approx 2.3 per decade.

Now the CLT with and without known σ\sigma, with Kolmogorov distance coded from scratch: D=sup⁡x∣F^n(x)−F(x)∣D = \sup_x\abs{\hat F_n(x) - F(x)}, attained for an ordered sample at jumps of F^n\hat F_n.

[ ]Slutsky: T_n versus t_n for an exponential populationBrowser
def kolmogorov(x, F):
    "sup |F_n - F| de la función de distribución empírica de x frente a F"
    x = np.sort(x); m = len(x); f = F(x)
    return max(np.max(np.arange(1, m + 1) / m - f), np.max(f - np.arange(0, m) / m))

rng3 = np.random.default_rng(5)
M3 = 10_000
print("   n    D(T_n)   D(t_n)   P(t_n < -1.96)  P(t_n > 1.96)")
for nn in (5, 30, 200):
    X = rng3.exponential(1.0, size=(M3, nn))              # media 1, desviación típica 1
    xbar, S = X.mean(axis=1), X.std(axis=1, ddof=1)
    T = np.sqrt(nn) * (xbar - 1.0)
    t = np.sqrt(nn) * (xbar - 1.0) / S
    print(f"{nn:4d}  {kolmogorov(T, stats.norm.cdf):7.4f}  {kolmogorov(t, stats.norm.cdf):7.4f}  {np.mean(t < -1.96):13.4f}  {np.mean(t > 1.96):13.4f}")

With n=5n = 5, D(tn)=0.163D(t_n) = 0.163 versus D(Tn)=0.063D(T_n) = 0.063: using SnS_n instead of σ\sigma more than doubles normal approximation error, and the left tail of tnt_n weighs 0.180.18 instead of the nominal 0.0250.025: when Xˉn\bar X_n is low, SnS_n is also small and the ratio stretches. With n=200n = 200, D(Tn)=0.011D(T_n) = 0.011 is already near the Monte Carlo noise floor (≈0.87/M=0.009\approx 0.87/\sqrt{M} = 0.009 with M=104M = 10^4), while D(tn)=0.017D(t_n) = 0.017 still doubles it and the left tail of tnt_n weighs 0.0380.038 instead of 0.0250.025. Slutsky promises the same limit; the sample size at which it is reached is another question, refined by the Berry–Esseen theorem in the CLT lesson.

The library version

ToolWhat it doesNote
scipy.stats.kstest(x, "norm")Kolmogorov distance against a distributionreturns statistic and pvalue; statistic is DD above
scipy.stats.ks_2samp(x, y)distance between two empirical distribution functionscompares two samples without knowing FF
scipy.stats.<ley>.ppfquantile function QQthe quantile coupling piece of Skorokhod
numpy.maximum.accumulatecumulative maximasupremum tail sup⁡k≥n\sup_{k \ge n} in one line (with dimension reversed)
scipy.stats.wasserstein_distanceW1W_1 distance between samplesconvergence in distribution with a metric (lesson on distances between distributions)
[ ]scipy: kstest and Skorokhod quantile couplingBrowser
print("D(t_n) con scipy.stats.kstest:", round(stats.kstest(t, "norm").statistic, 4), " y a mano:", round(kolmogorov(t, stats.norm.cdf), 4))
print("\nacoplamiento por cuantiles: sup |Q_n(u) - Q(u)| en u en [0.05, 0.95]")
u = np.linspace(0.05, 0.95, 181)
for nb in (10, 100, 1000, 10_000):
    Qn = (stats.binom.ppf(u, nb, 0.5) - nb / 2) / (np.sqrt(nb) / 2)     # cuantil de la binomial estandarizada
    print(f"  n = {nb:5d}: {np.max(np.abs(Qn - stats.norm.ppf(u))):.4f}")

The statistic of kstest agrees with the manual implementation (0.01730.0173 with n=200n = 200). The second block draws Skorokhod’s theorem: with the same uniform uu, the standardized binomial Qn(u)Q_n(u) and normal Q(u)Q(u) approach pointwise, with a uniform error decreasing as 1/n1/\sqrt{n} (0.3330.333, 0.09960.0996, 0.03040.0304, 0.00990.0099). The variables Yn=Qn(U)Y_n = Q_n(U) and Y=Q(U)Y = Q(U) are those of the theorem: Yn→YY_n \to Y almost surely (here even uniformly over the central range). This is a useful pattern: coupling two laws with a common uniform is the cheapest way to compare them, leading to Wasserstein distances.

Common mistakes

Exercises

ProofFrom almost surely to probability, and probability to a subsequence
Prove: Prove that (a) if Xn→XX_n \to X almost surely, then Xn→XX_n \to X in probability, and (b) if Xn→XX_n \to X in probability, there is a subsequence Xnk→XX_{n_k} \to X almost surely.
0
Use continuity of probability from above and the first Borel–Cantelli lemma.

Step 1 of 4. For (a), fix ε>0\varepsilon > 0 and define Bn=⋃k≥n{∣Xk−X∣>ε}B_n = \bigcup_{k \ge n}\{\abs{X_k - X} > \varepsilon\}. What do you know about (Bn)(B_n)?

ProofSlutsky for sums using distribution functions
Prove: Prove that if Xn→dXX_n \xrightarrow{d} X and Yn→PcY_n \xrightarrow{\Pr} c (constant), then Xn+Yn→dX+cX_n + Y_n \xrightarrow{d} X + c, using distribution functions directly.
0
Let FF be the distribution function of XX and xx a continuity point of that of X+cX + c, so x−cx - c is a continuity point of FF. Use ε>0\varepsilon > 0 for which x−c±εx - c \pm \varepsilon are also continuity points of FF.

Step 1 of 4. What upper bound do you obtain for P(Xn+Yn≤x)\Pr(X_n + Y_n \le x)?

QuizValues $n$ with probability $1/n$
Let X1,X2,…X_1, X_2, \dots be independent, with Xn=nX_n = n with probability 1/n1/n and Xn=0X_n = 0 otherwise. Which statement about convergence to 00 is correct?
NumericExpected number of events with $\Pr(A_n) = 1/n^2$
Events AnA_n, n≥1n \ge 1, have P(An)=1/n2\Pr(A_n) = 1/n^2. Let NN be the number of events that occur. What is E[N]\E[N]?
NumericProbability that none occur
Events AnA_n, n≥2n \ge 2, are independent with P(An)=1/n2\Pr(A_n) = 1/n^2. What is the probability that none occur?
QuizFor which values of $a$ is it UI?
Let Xn=na 1{U<1/n}X_n = n^a\,\ind\{U < 1/n\} with UU uniform on (0,1)(0, 1) and a≥0a \ge 0. For which values of aa is (Xn)n≥1(X_n)_{n \ge 1} uniformly integrable?
QuizTwo limits in distribution do not add
Let Z∼N(0,1)Z \sim \Normal(0, 1), Xn=ZX_n = Z and Yn=−ZY_n = -Z for every nn. Then Xn→dN(0,1)X_n \xrightarrow{d} \Normal(0, 1) and Yn→dN(0,1)Y_n \xrightarrow{d} \Normal(0, 1). What is the distributional limit of Xn+YnX_n + Y_n?
CodeAn empirical diagnostic: almost surely versus probability
Implement diagnose(X, eps, n0, tol=0.02). X is an array of shape (M, N) containing M simulated trajectories of a sequence compared with 00 (column j is n=j+1n = j + 1). Compute p_last, the fraction of trajectories with |X_N| > eps (last instant), and tail, the fraction with any exceedance |X_n| > eps with n >= n0 (up to the horizon). Return 'casi seguro' if tail <= tol; otherwise 'en probabilidad' if p_last <= tol; otherwise 'ninguno'. The tests use the typewriter, the single-UU spike, independent spikes with probabilities 1/n1/n and 1/n21/n^2, and iid noise.
import numpy as np

def diagnose(X, eps, n0, tol=0.02):
  """Clasifica la convergencia a 0 de las trayectorias X (M x N)."""
  A = np.abs(np.asarray(X, dtype=float)) > eps
  # tu codigo: p_last (ultima columna) y tail (algun exceso desde n = n0)
  return "ninguno"
Shift+Enter to run

Summary

Key idea
“Converges” has four meanings. Almost surely: each trajectory converges. In probability: being far away at any given time is unlikely. In LpL^p: mean error vanishes. In distribution: only laws approach each other. The arrows are “almost surely ⇒\Rightarrow in probability ⇒\Rightarrow in distribution” and “Lp⇒L^p \Rightarrow in probability”; no others hold without an added assumption: a subsequence or summable rate (Borel–Cantelli), uniform integrability (Vitali) or domination, and a constant limit.
  • Almost surely is equivalent to sup⁡k≥n∣Xk−X∣→0\sup_{k \ge n}\abs{X_k - X} \to 0 in probability (tail criterion). It comes from no topology.
  • Borel–Cantelli: if ∑P(An)<∞\sum\Pr(A_n) < \infty, only finitely many AnA_n occur; if the sum diverges and AnA_n are independent, infinitely many occur almost surely. Without independence, the second half is false.
  • Convergence in probability ⇔\Leftrightarrow every subsequence has an almost surely convergent further subsequence. The typewriter (LpL^p and probability, not almost surely) and escaping spike (almost surely, not L1L^1) are the two canonical counterexamples.
  • Uniform integrability: lim⁡Ksup⁡nE[∣Xn∣1{∣Xn∣>K}]=0\lim_K\sup_n\E[\abs{X_n}\ind\{\abs{X_n} > K\}] = 0; with convergence in probability it is equivalent to L1L^1 (Vitali). It is guaranteed by bounded moments of order 1+δ1 + \delta or an integrable dominator.
  • In distribution: Fn→FF_n \to F at continuity points; Portmanteau reformulates it via test functions, closed and open sets. Skorokhod reduces it to almost sure convergence on another space (quantile coupling). Lévy: φn→g\varphi_n \to g pointwise with gg continuous at 00 implies convergence in distribution.
  • Continuous mapping (valid almost surely, in probability and in distribution, not in LpL^p) and Slutsky (Xn→dXX_n \xrightarrow{d} X, Yn→PcY_n \xrightarrow{\Pr} c constant: sums, products and quotients work) justify the tt statistic and asymptotic inference with estimated variances.