# Convergence of random variables

In probability theory, there exist several different notions of convergence of sequences of random variables, including convergence in probability, convergence in distribution, and almost sure convergence. The different notions of convergence capture different properties about the sequence, with some notions of convergence being stronger than others. For example, convergence in distribution tells us about the limit distribution of a sequence of random variables. This is a weaker notion than convergence in probability, which tells us about the value a random variable will take, rather than just the distribution.
The concept is important in probability theory, and its applications to statistics and stochastic processes. The same concepts are known in more general mathematics as stochastic convergence and they formalize the idea that certain properties of a sequence of essentially random or unpredictable events can sometimes be expected to settle down into a behavior that is essentially unchanging when items far enough into the sequence are studied. The different possible notions of convergence relate to how such a behavior can be characterized: two readily understood behaviors are that the sequence eventually takes a constant value, and that values in the sequence continue to change but can be described by an unchanging probability distribution.

## Background

"Stochastic convergence" formalizes the idea that a sequence of essentially random or unpredictable events can sometimes be expected to settle into a pattern. The pattern may for instance be
* Convergence in the classical sense to a fixed value, perhaps itself coming from a random event
* An increasing similarity of outcomes to what a purely deterministic function would produce
* An increasing preference towards a certain outcome
* An increasing "aversion" against straying far away from a certain outcome
* That the probability distribution describing the next outcome may grow increasingly similar to a certain distribution
Some less obvious, more theoretical patterns could be
* That the series formed by calculating the expected value of the outcome's distance from a particular value may converge to 0
* That the variance of the random variable describing the next event grows smaller and smaller.
These other types of patterns that may arise are reflected in the different types of stochastic convergence that have been studied.
While the above discussion has related to the convergence of a single series to a limiting value, the notion of the convergence of two series towards each other is also important, but this is easily handled by studying the sequence defined as either the difference or the ratio of the two series.
For example, if the average of n independent random variables $Y_{i},\ i=1,\dots ,n$, all having the same finite mean and variance, is given by
    $X_{n}={\frac {1}{n}}\sum _{i=1}^{n}Y_{i}\,,$
then as $n$ tends to infinity, $X_{n}$ converges in probability (see below) to the common mean, $\mu$, of the random variables $Y_{i}$. This result is known as the weak law of large numbers. Other forms of convergence are important in other useful theorems, including the central limit theorem.
Throughout the following, we assume that $(X_{n})$ is a sequence of random variables, and $X$ is a random variable, and all of them are defined on the same probability space $(\Omega ,{\mathcal {F}},\mathbb {P} )$.

## Convergence in distribution

Loosely, with this mode of convergence, we increasingly expect to see the next outcome in a sequence of random experiments becoming better and better modeled by a given probability distribution. More precisely, the distribution of the associated random variable in the sequence becomes arbitrarily close to a specified fixed distribution.
Convergence in distribution is the weakest form of convergence typically discussed, since it is implied by all other types of convergence mentioned in this article. However, convergence in distribution is very frequently used in practice; most often it arises from application of the central limit theorem.

### Definition

A sequence $X_{1},X_{2},\ldots$ of real-valued random variables, with cumulative distribution functions $F_{1},F_{2},\ldots$, is said to converge in distribution, or converge weakly, or converge in law to a random variable X with cumulative distribution function F if
    $\lim _{n\to \infty }F_{n}(x)=F(x),$
for every number $x\in \mathbb {R}$ at which $F$ is continuous.
The requirement that only the continuity points of $F$ should be considered is essential. For example, if $X_{n}$ are distributed uniformly on intervals $\left(0,{\frac {1}{n}}\right)$, then this sequence converges in distribution to the degenerate random variable $X=0$. Indeed, $F_{n}(x)=0$ for all $n$ when $x\leq 0$, and $F_{n}(x)=1$ for all $x\geq {\frac {1}{n}}$when $n>0$. However, for this limiting random variable $F(0)=1$, even though $F_{n}(0)=0$ for all $n$. Thus the convergence of cdfs fails at the point $x=0$ where $F$ is discontinuous.
Convergence in distribution may be denoted as
where $\scriptstyle {\mathcal {L}}_{X}$ is the law (probability distribution) of X. For example, if X is standard normal we can write $X_{n}\,{\xrightarrow {d}}\,{\mathcal {N}}(0,\,1)$.
For random vectors $\left\{X_{1},X_{2},\dots \right\}\subset \mathbb {R} ^{k}$ the convergence in distribution is defined similarly. We say that this sequence converges in distribution to a random k-vector X if
    $\lim _{n\to \infty }\mathbb {P} (X_{n}\in A)=\mathbb {P} (X\in A)$
for every $A\subset \mathbb {R} ^{k}$ which is a continuity set of X.
The definition of convergence in distribution may be extended from random vectors to more general random elements in arbitrary metric spaces, and even to the “random variables” which are not measurable — a situation which occurs for example in the study of empirical processes. This is the “weak convergence of laws without laws being defined” — except asymptotically.
In this case the term weak convergence is preferable (see weak convergence of measures), and we say that a sequence of random elements {X$_n$} converges weakly to X (denoted as X$_n$ ⇒ X) if
    $\mathbb {E} ^{*}h(X_{n})\to \mathbb {E} \,h(X)$
for all continuous bounded functions h. Here E* denotes the outer expectation, that is the expectation of a “smallest measurable function g that dominates h(X$_n$)”.

### Properties

* Since $F(a)=\mathbb {P} (X\leq a)$, the convergence in distribution means that the probability for X$_n$ to be in a given range is approximately equal to the probability that the value of X is in that range, provided n is sufficiently large.
* In general, convergence in distribution does not imply that the sequence of corresponding probability density functions will also converge. As an example one may consider random variables with densities f$_n$(x) = (1 + cos(2πnx))1$_{(0,1)}$. These random variables converge in distribution to a uniform U(0, 1), whereas their densities do not converge at all.
** However, according to Scheffé’s theorem, convergence of the probability density functions implies convergence in distribution.
* The portmanteau lemma provides several equivalent definitions of convergence in distribution. Although these definitions are less intuitive, they are used to prove a number of statistical theorems. The lemma states that {X$_n$} converges in distribution to X if and only if any of the following statements are true:
** $\mathbb {P} (X_{n}\leq x)\to \mathbb {P} (X\leq x)$ for all continuity points of $x\mapsto \mathbb {P} (X\leq x)$;
** $\mathbb {E} f(X_{n})\to \mathbb {E} f(X)$ for all bounded, continuous functions $f$ (where $\mathbb {E}$ denotes the expected value operator);
** $\mathbb {E} f(X_{n})\to \mathbb {E} f(X)$ for all bounded, Lipschitz functions $f$;
** $\lim \inf \mathbb {E} f(X_{n})\geq \mathbb {E} f(X)$ for all nonnegative, continuous functions $f$;
** $\lim \inf \mathbb {P} (X_{n}\in G)\geq \mathbb {P} (X\in G)$ for every open set $G$;
** $\lim \sup \mathbb {P} (X_{n}\in F)\leq \mathbb {P} (X\in F)$ for every closed set $F$;
** $\mathbb {P} (X_{n}\in B)\to \mathbb {P} (X\in B)$ for all continuity sets $B$ of random variable $X$;
** $\limsup \mathbb {E} f(X_{n})\leq \mathbb {E} f(X)$ for every upper semi-continuous function $f$ bounded above;
** $\liminf \mathbb {E} f(X_{n})\geq \mathbb {E} f(X)$ for every lower semi-continuous function $f$ bounded below.
* The continuous mapping theorem states that for a continuous function g, if the sequence {X$_n$} converges in distribution to X, then {g(X$_n$)} converges in distribution to g(X).
** Note however that convergence in distribution of {X$_n$} to X and {Y$_n$} to Y does in general not imply convergence in distribution of {X$_n$ + Y$_n$} to X + Y or of {X$_n$Y$_n$} to XY.
* Lévy’s continuity theorem: The sequence {X$_n$} converges in distribution to X if and only if the sequence of corresponding characteristic functions {φ$_n$} converges pointwise to the characteristic function φ of X.
* Convergence in distribution is metrizable by the Lévy–Prokhorov metric.
* A natural link to convergence in distribution is the Skorokhod's representation theorem.

## Convergence in probability

The basic idea behind this type of convergence is that the probability of an “unusual” outcome becomes smaller and smaller as the sequence progresses.
The concept of convergence in probability is used very often in statistics. For example, an estimator is called consistent if it converges in probability to the quantity being estimated. Convergence in probability is also the type of convergence established by the weak law of large numbers.

### Definition

A sequence {X$_n$} of random variables converges in probability towards the random variable X if for all ε > 0
    $\lim _{n\to \infty }\mathbb {P} {\big|X_{n}-X|>\varepsilon {\big )}=0.$
More explicitly, let P$_n$(ε) be the probability that X$_n$ is outside the ball of radius ε centered at X. Then X$_n$ is said to converge in probability to X if for any ε > 0 and any δ > 0 there exists a number N (which may depend on ε and δ) such that for all n ≥ N, P$_n$(ε) < δ (the definition of limit).
Notice that for the condition to be satisfied, it is not possible that for each n the random variables X and X$_n$ are independent (and thus convergence in probability is a condition on the joint cdf's, as opposed to convergence in distribution, which is a condition on the individual cdf's), unless X is deterministic like for the weak law of large numbers. At the same time, the case of a deterministic X cannot, whenever the deterministic value is a discontinuity point (not isolated), be handled by convergence in distribution, where discontinuity points have to be explicitly excluded.
Convergence in probability is denoted by adding the letter p over an arrow indicating convergence, or using the "plim" probability limit operator:
For random elements {X$_n$} on a separable metric space (S, d), convergence in probability is defined similarly by
    $\forall \varepsilon >0,\mathbb {P} {\bigd(X_{n},X)\geq \varepsilon {\big )}\to 0.$

### Properties

* Convergence in probability implies convergence in distribution.
* In the opposite direction, convergence in distribution implies convergence in probability when the limiting random variable X is a constant.
* Convergence in probability does not imply almost sure convergence.
* The continuous mapping theorem states that for every continuous function $g$, if X$_n$→$^p$X{\textstyle X_{n}\xrightarrow {p} X}, then also  g(X$_n$)→$^p$g(X){\textstyle g(X_{n})\xrightarrow {p} g(X)}.
* Convergence in probability defines a topology on the space of random variables over a fixed probability space. This topology is metrizable by the Ky Fan metric: $d(X,Y)=\inf \!{\big \\varepsilon >0:\ \mathbb {P} {\big|X-Y|>\varepsilon {\big )}\leq \varepsilon {\big \}}$ or alternately by this metric $d(X,Y)=\mathbb {E} \left[\min(|X-Y|,1)\right].$

### Counterexamples

Not every sequence of random variables which converges to another random variable in distribution also converges in probability to that random variable. As an example, consider a sequence of standard normal random variables $X_{n}$ and a second sequence $Y_{n}=(-1)^{n}X_{n}$. Notice that the distribution of $Y_{n}$ is equal to the distribution of $X_{n}$ for all $n$, but: $P(|X_{n}-Y_{n}|\geq \epsilon )=P(|X_{n}|\cdot |(1-(-1)^{n})|\geq \epsilon )$
which does not converge to $0$. So we do not have convergence in probability.

## Almost sure convergence

This is the type of stochastic convergence that is most similar to pointwise convergence known from elementary real analysis.

### Definition

To say that the sequence X$_n$ converges almost surely or almost everywhere or with probability 1 or strongly towards X means that $\mathbb {P} \!\left(\lim _{n\to \infty }\!X_{n}=X\right)=1.$
This means that the values of X$_n$ approach the value of X, in the sense that events for which X$_n$ does not converge to X have probability 0 (see Almost surely). Using the probability space $(\Omega ,{\mathcal {F}},\mathbb {P} )$ and the concept of the random variable as a function from Ω to R, this is equivalent to the statement $\mathbb {P} {\Bigl\omega \in \Omega :\lim _{n\to \infty }X_{n}(\omega )=X(\omega ){\Bigr )}=1.$
Using the notion of the limit superior of a sequence of sets, almost sure convergence can also be defined as follows: $\mathbb {P} {\Bigl\limsup _{n\to \infty }{\bigl \\omega \in \Omega :|X_{n}(\omega )-X(\omega )|>\varepsilon {\bigr \}}{\Bigr )}=0\quad {\text{for all}}\quad \varepsilon >0.$
Almost sure convergence is often denoted by adding the letters a.s. over an arrow indicating convergence:
For generic random elements {X$_n$} on a metric space $(S,d)$, convergence almost surely is defined similarly: $\mathbb {P} {\Bigl\omega \in \Omega \colon \,d{\bigX_{n}(\omega ),X(\omega ){\big )}\,{\underset {n\to \infty }{\longrightarrow }}\,0{\Bigr )}=1$

### Properties

* Almost sure convergence implies convergence in probability (by Fatou's lemma), and hence implies convergence in distribution. It is the notion of convergence used in the strong law of large numbers.
* The concept of almost sure convergence does not come from a topology on the space of random variables. This means there is no topology on the space of random variables such that the almost surely convergent sequences are exactly the converging sequences with respect to that topology. In particular, there is no metric of almost sure convergence.

### Counterexamples

Consider a sequence $\{X_{n}\}$ of independent random variables such that $P(X_{n}=1)={\frac {1}{n}}$ and $P(X_{n}=0)=1-{\frac {1}{n}}$. For $0<\varepsilon <1/2$ we have $P(|X_{n}|\geq \varepsilon )={\frac {1}{n}}$ which converges to $0$ hence $X_{n}\to 0$ in probability.
Since $\sum _{n\geq 1}P(X_{n}=1)\to \infty$ and the events $\{X_{n}=1\}$ are independent, second Borel Cantelli Lemma ensures that $P(\limsup _{n}\{X_{n}=1\})=1$ hence the sequence $\{X_{n}\}$ does not converge to $0$ almost everywhere (in fact the set on which this sequence does not converge to $0$ has probability $1$).

## Sure convergence or pointwise convergence

To say that the sequence of random variables (X$_n$) defined over the same probability space (i.e., a random process) converges surely or everywhere or pointwise towards X means
$\forall \omega \in \Omega \colon \ \lim _{n\to \infty }X_{n}(\omega )=X(\omega ),$
where Ω is the sample space of the underlying probability space over which the random variables are defined.
This is the notion of pointwise convergence of a sequence of functions extended to a sequence of random variables. (Note that random variables themselves are functions).
$\left\{\omega \in \Omega :\lim _{n\to \infty }X_{n}(\omega )=X(\omega )\right\}=\Omega .$
Sure convergence of a random variable implies all the other kinds of convergence stated above, but there is no payoff in probability theory by using sure convergence compared to using almost sure convergence. The difference between the two only exists on sets with probability zero. This is why the concept of sure convergence of random variables is very rarely used.

## Convergence in mean

Given a real number r ≥ 1, we say that the sequence X$_n$ converges in the r-th mean (or in the L$^r$-norm) towards the random variable X, if the r-th absolute moments $\mathbb {E}$(|X$_n$|$^r$) and $\mathbb {E}$(|X|$^r$) of X$_n$ and X exist, and
    $\lim _{n\to \infty }\mathbb {E} \left(|X_{n}-X|^{r}\right)=0,$
where the operator E denotes the expected value. Convergence in r-th mean tells us that the expectation of the r-th power of the difference between $X_{n}$ and $X$ converges to zero.
This type of convergence is often denoted by adding the letter L$^r$ over an arrow indicating convergence:
The most important cases of convergence in r-th mean are:
* When X$_n$ converges in r-th mean to X for r = 1, we say that X$_n$ converges in mean to X.
* When X$_n$ converges in r-th mean to X for r = 2, we say that X$_n$ converges in mean square (or in quadratic mean) to X.
Convergence in the r-th mean, for r ≥ 1, implies convergence in probability (by Markov's inequality). Furthermore, if r > s ≥ 1, convergence in r-th mean implies convergence in s-th mean. Hence, convergence in mean square implies convergence in mean.
Additionally,
    ${\overset{X_{n}\xrightarrow {L^{r}} X}}\quad \Rightarrow \quad \lim _{n\to \infty }\mathbb {E} [|X_{n}|^{r}]=\mathbb {E} [|X|^{r}].$
The converse is not necessarily true, however it is true if ${\overset{X_{n}\,\xrightarrow {p} \,X}}$ (by a more general version of Scheffé's lemma).

## Properties

Provided the probability space is complete:
* If $X_{n}\ {\xrightarrow {\overset{p}}}\ X$ and $X_{n}\ {\xrightarrow {\overset{p}}}\ Y$, then $X=Y$ almost surely.
* If $X_{n}\ {\xrightarrow {\overset{\text{a.s.}}}}\ X$ and $X_{n}\ {\xrightarrow {\overset{\text{a.s.}}}}\ Y$, then $X=Y$ almost surely.
* If $X_{n}\ {\xrightarrow {\overset{L^{r}}}}\ X$ and $X_{n}\ {\xrightarrow {\overset{L^{r}}}}\ Y$, then $X=Y$ almost surely.
* If $X_{n}\ {\xrightarrow {\overset{p}}}\ X$ and $Y_{n}\ {\xrightarrow {\overset{p}}}\ Y$, then $aX_{n}+bY_{n}\ {\xrightarrow {\overset{p}}}\ aX+bY$ (for any real numbers a and b) and $X_{n}Y_{n}{\xrightarrow {\overset{p}}}\ XY$.
* If $X_{n}\ {\xrightarrow {\overset{\text{a.s.}}}}\ X$ and $Y_{n}\ {\xrightarrow {\overset{\text{a.s.}}}}\ Y$, then $aX_{n}+bY_{n}\ {\xrightarrow {\overset{\text{a.s.}}}}\ aX+bY$ (for any real numbers a and b) and $X_{n}Y_{n}{\xrightarrow {\overset{\text{a.s.}}}}\ XY$.
* If $X_{n}\ {\xrightarrow {\overset{L^{r}}}}\ X$ and $Y_{n}\ {\xrightarrow {\overset{L^{r}}}}\ Y$, then $aX_{n}+bY_{n}\ {\xrightarrow {\overset{L^{r}}}}\ aX+bY$ (for any real numbers a and b).
* None of the above statements are true for convergence in distribution.
The chain of implications between the various notions of convergence are noted in their respective sections. They are, using the arrow notation:
    ${\begin{matrix}{\xrightarrow {\overset{L^{s}}}}&{\underset {s>r\geq 1}{\Rightarrow }}&{\xrightarrow {\overset{L^{r}}}}&&\\&&\Downarrow &&\\{\xrightarrow {\text{a.s.}}}&\Rightarrow &{\xrightarrow {p}}&\Rightarrow &{\xrightarrow {d}}\end{matrix}}$
These properties, together with a number of other special cases, are summarized in the following list:
* Almost sure convergence implies convergence in probability:
    $X_{n}\ {\xrightarrow {\text{a.s.}}}\ X\quad \Rightarrow \quad X_{n}\ {\xrightarrow {\overset{p}}}\ X$
* Convergence in probability implies there exists a sub-sequence $(n_{k})$ which almost surely converges:
    $X_{n}\ \xrightarrow {\overset{p}} \ X\quad \Rightarrow \quad X_{n_{k}}\ \xrightarrow {\text{a.s.}} \ X$
* Convergence in probability implies convergence in distribution:
    $X_{n}\ {\xrightarrow {\overset{p}}}\ X\quad \Rightarrow \quad X_{n}\ {\xrightarrow {\overset{d}}}\ X$
* Convergence in r-th order mean implies convergence in probability:
    $X_{n}\ {\xrightarrow {\overset{L^{r}}}}\ X\quad \Rightarrow \quad X_{n}\ {\xrightarrow {\overset{p}}}\ X$
* Convergence in r-th order mean implies convergence in lower order mean, assuming that both orders are greater than or equal to one:
    $X_{n}\ {\xrightarrow {\overset{L^{r}}}}\ X\quad \Rightarrow \quad X_{n}\ {\xrightarrow {\overset{L^{s}}}}\ X,$ provided r ≥ s ≥ 1.
* If X$_n$ converges in distribution to a constant c, then X$_n$ converges in probability to c:
    $X_{n}\ {\xrightarrow {\overset{d}}}\ c\quad \Rightarrow \quad X_{n}\ {\xrightarrow {\overset{p}}}\ c,$ provided c is a constant.
* If X$_n$ converges in distribution to X and the difference between X$_n$ and Y$_n$ converges in probability to zero, then Y$_n$ also converges in distribution to X:
    $X_{n}\ {\xrightarrow {\overset{d}}}\ X,\ \ |X_{n}-Y_{n}|\ {\xrightarrow {\overset{p}}}\ 0\ \quad \Rightarrow \quad Y_{n}\ {\xrightarrow {\overset{d}}}\ X$
* If X$_n$ converges in distribution to X and Y$_n$ converges in distribution to a constant c, then the joint vector (X$_n$, Y$_n$) converges in distribution to ⁠$(X,c)$⁠:
    $X_{n}\ {\xrightarrow {\overset{d}}}\ X,\ \ Y_{n}\ {\xrightarrow {\overset{d}}}\ c\ \quad \Rightarrow \quad (X_{n},Y_{n})\ {\xrightarrow {\overset{d}}}\ (X,c)$ provided c is a constant.
    Note that the condition that Y$_n$ converges to a constant is important, if it were to converge to a random variable Y then we wouldn't be able to conclude that (X$_n$, Y$_n$) converges to ⁠$(X,Y)$⁠.
* If X$_n$ converges in probability to X and Y$_n$ converges in probability to Y, then the joint vector (X$_n$, Y$_n$) converges in probability to (X, Y):
    $X_{n}\ {\xrightarrow {\overset{p}}}\ X,\ \ Y_{n}\ {\xrightarrow {\overset{p}}}\ Y\ \quad \Rightarrow \quad (X_{n},Y_{n})\ {\xrightarrow {\overset{p}}}\ (X,Y)$
* If X$_n$ converges in probability to X, and if P(|X$_n$| ≤ b) = 1 for all n and some b, then X$_n$ converges in rth mean to X for all r ≥ 1. In other words, if X$_n$ converges in probability to X and all random variables X$_n$ are almost surely bounded above and below, then X$_n$ converges to X also in any rth mean.
* Almost sure representation. Usually, convergence in distribution does not imply convergence almost surely. However, for a given sequence {X$_n$} which converges in distribution to X$_0$ it is always possible to find a new probability space (Ω, F, P) and random variables {Y$_n$, n = 0, 1, ...} defined on it such that Y$_n$ is equal in distribution to X$_n$ for each n ≥ 0, and Y$_n$ converges to Y$_0$ almost surely.
* If for all ε > 0,
       $\sum _{n}\mathbb {P} \left(|X_{n}-X|>\varepsilon \right)<\infty ,$
    then we say that X$_n$ converges almost completely, or almost in probability towards X. When X$_n$ converges almost completely towards X then it also converges almost surely to X. In other words, if X$_n$ converges in probability to X sufficiently quickly (i.e. the above sequence of tail probabilities is summable for all ε > 0), then X$_n$ also converges almost surely to X. This is a direct implication from the Borel–Cantelli lemma.
* If S$_n$ is a sum of n real independent random variables:
       $S_{n}=X_{1}+\cdots +X_{n}\,$
    then S$_n$ converges almost surely if and only if S$_n$ converges in probability. The proof can be found in Page 126 (Theorem 5.3.4) of the book by Kai Lai Chung.
    However, for a sequence of mutually independent random variables, convergence in probability does not imply almost sure convergence.
* The dominated convergence theorem gives sufficient conditions for almost sure convergence to imply L$^1$-convergence:
* A necessary and sufficient condition for L$^1$ convergence is $X_{n}{\xrightarrow {\overset{P}}}X$ and the sequence (X$_n$) is uniformly integrable.
* If $X_{n}\ \xrightarrow {\overset{p}} \ X$, the followings are equivalent
** $X_{n}\ {\xrightarrow {\overset{L^{r}}}}\ X$,
** $\mathbb {E} [|X_{n}|^{r}]\rightarrow \mathbb {E} [|X|^{r}]<\infty$,
** $\{|X_{n}|^{r}\}$ is uniformly integrable.