Statistical Inference

Weeks 1–2 · 2026 · Probability models, distributions, and convergence

What is statistical inference?

Statistical inference is the process of using data from a small sample to draw conclusions or make generalizations about a larger population.

Sampling goes from a population with an unknown distribution to an observed sample. Statistical inference goes from the sample back to claims about the population: under a probability model, estimate distribution properties and predict new observations.

Typically, we assume that our data follows a probability distribution, and we try to learn properties of the underlying distribution (mean, variance, covariances, other parameters...) by estimation, in order to make predictions about the population from the sample.

Statistical inference is the foundation of all empirical disciplines.

“Since all models are wrong the scientist must be alert to what is importantly wrong.”

A precarious Jenga tower standing on a single block labelled Statistical inference. The wooden blocks are labelled Physics, Machine learning, Economics, Mathematical finance, Biology, Psychology, and Overpaid tech jobs.

Primer: assignments and exams

2020 synthetic assignment and exam scores, with a fitted straight line. Sample size 104, slope 0.099, sample correlation 0.79. The horizontal axis is 0 to 100 and the vertical axis is 0 to 10.

2020
\(n=104\) synthetic observations
Slope \(\widehat\beta\)0.099
Correlation \(r\)0.79

High correlation.

Assignment grades predict exam grades.

Synthetic data. Inspired by T. Osborne, QuSoft (2026).

Assignments and exams

2021 synthetic assignment and exam scores, with a fitted straight line. Sample size 98, slope 0.097, sample correlation 0.82. The horizontal axis is 0 to 100 and the vertical axis is 0 to 10.

2021
\(n=98\) synthetic observations
Slope \(\widehat\beta\)0.097
Correlation \(r\)0.82

A similar pattern appears again.

Is there a causal relationship between assignment grades and exam grades?

Synthetic data. Inspired by T. Osborne, QuSoft (2026).

Assignments and exams

2022 synthetic assignment and exam scores, with a fitted straight line. Sample size 112, slope 0.107, sample correlation 0.84. The horizontal axis is 0 to 100 and the vertical axis is 0 to 10.

2022
\(n=112\) synthetic observations
Slope \(\widehat\beta\)0.107
Correlation \(r\)0.84

Still the same.

Maybe there is some kind of law of nature saying that when you are doing well in the assignments you are also doing well in the exams?

Synthetic data. Inspired by T. Osborne, QuSoft (2026).

Assignments and exams

2023 synthetic assignment and exam scores, with a fitted straight line. Sample size 96, slope 0.092, sample correlation 0.80. The horizontal axis is 0 to 100 and the vertical axis is 0 to 10.

2023
\(n=96\) synthetic observations
Slope \(\widehat\beta\)0.092
Correlation \(r\)0.80

The positive correlation is still visible.

How could this possibly ever change?

Synthetic data. Inspired by T. Osborne, QuSoft (2026).

Assignments and exams

2024 synthetic assignment and exam scores, with a fitted straight line. Sample size 108, slope 0.049, sample correlation 0.33. The horizontal axis is 0 to 100 and the vertical axis is 0 to 10.

2024
\(n=108\) synthetic observations
Slope \(\widehat\beta\)0.049
Correlation \(r\)0.33

What happened here?

The line is flatter. The correlation is weaker. Assignment scores have shifted upwards.

Synthetic data. Inspired by T. Osborne, QuSoft (2026).

Assignments and exams

2025 synthetic assignment and exam scores, with a fitted straight line. Sample size 101, slope 0.015, sample correlation 0.08. The horizontal axis is 0 to 100 and the vertical axis is 0 to 10.

2025
\(n=101\) synthetic observations
Slope \(\widehat\beta\)0.015
Correlation \(r\)0.08

Almost no linear correlation remains.

Does the assignment still measure what the exam measures?

Synthetic data. Inspired by T. Osborne, QuSoft (2026).

Course scope and assessment

A

Probability theory

Random variables, distributions, convergence, limit theorems

B

Nonparametric models

Estimation, goodness of fit, ranks, association

C

Parametric models

Sufficiency, likelihood, estimation, tests

D

Bayesian statistics

Priors, posteriors, conjugacy, Bayes estimators

Assessment · 2026/27

Exam: 100%

Old · 2025/2026 · No longer applicable

Exam 60% · Project/presentation 25% · Written report 15%

Weeks 1–2: the first four lectures

Scalar distributions

Probability spaces, random elements, probability distribution functions, quantiles, densities

Random vectors

Joint distributions, conditioning, generated σ-algebras, independence

Descriptive statistics

Expected values, moments, covariance, standard families, transforms

Convergence

Almost sure, \(L^\infty\), probability, \(L^p\), distribution

Probability spaces and scalar distributions

01 · WEEK 1 · LECTURE 1

Probability spaces, random elements, probability distribution functions, and quantiles.

A brief history of probability theory

4th c. BCE

Aristotle: probability is not part of mathematics. Mathematics describes what is logically necessary, whereas probability reasons about what is plausible. Predominant view until the 17th century.

1654

Blaise Pascal and Pierre de Fermat lay foundations for mathematical probability in their correspondence on gambling problems.

1898–1902

Émile Borel and Henri Lebesgue invent \(\sigma\)-algebrae and measure theory to formalize integration and volume calculations.

1900

David Hilbert presents a list of open problems on the Paris conference of the International Congress of Mathematicians. One of them: Find a rigorous, axiomatic formalization of probability theory which could prove the limit theorems of statistical physics.

1924

Stefan Banach and Alfred Tarski show that a ball in \(\mathbb R^3\) can be split into finitely many pieces and reassembled into two copies of equal volume by rotations and translations. If one assigns a volume to arbitrary subsets of \(\mathbb{R}^3\), then volume becomes paradoxical. Hence, one should use \(\sigma\)-algebrae.

1933

Andrey Kolmogorov axiomatizes probability using measure theory. Modern formulation: a \(\sigma\)-algebra and three probability axioms.

\(\sigma\)-algebrae

Let \(\Omega\) be a nonempty set and let \(\mathcal P(\Omega)\) denote its power set.

Definition 1.1

A collection \(\mathcal F\subseteq\mathcal P(\Omega)\) is called a \(\sigma\)-algebra if

\[ \begin{aligned} \text{(i)}\quad&\Omega\in\mathcal F,\\ \text{(ii)}\quad&A\in\mathcal F\ \Longrightarrow\ A^c\in\mathcal F,\\ \text{(iii)}\quad&A_1,A_2,\ldots\in\mathcal F\ \Longrightarrow\ \bigcup_{n=1}^{\infty}A_n\in\mathcal F. \end{aligned} \]

The pair \((\Omega,\mathcal F)\) is called a measurable space. The members of \(\mathcal F\) are called events.

Probability spaces and Kolmogorov’s axioms

Definition 1.2

A map \(\mathbb P:\mathcal F\to\mathbb R\) is called a probability measure on \((\Omega,\mathcal F)\) if it satisfies Kolmogorov’s axioms, namely

\[ \begin{aligned} \text{(i)}\quad &\mathbb P(A)\in [0, 1] &&\text{for every }A\in\mathcal F,\\[2mm] \text{(ii)}\quad &\mathbb P(\Omega)=1,\\[2mm] \text{(iii)}\quad &\mathbb P\!\left(\bigcup_{n=1}^{\infty}A_n\right) =\sum_{n=1}^{\infty}\mathbb P(A_n) &&\text{for pairwise disjoint }A_n\in\mathcal F. \end{aligned} \]

The triple \((\Omega,\mathcal F,\mathbb P)\) is called a probability space.

Consequences of Kolmogorov’s axioms

Proposition 1.3

For events \(A,B\) in a probability space \((\Omega,\mathcal F,\mathbb P)\),

\[ \begin{aligned} \mathbb P(A^c)&=1-\mathbb P(A),\\ \mathbb P(A\cup B)&=\mathbb P(A)+\mathbb P(B)-\mathbb P(A\cap B). \end{aligned} \]

If \(A\subseteq B\), then \(\mathbb P(B\setminus A)=\mathbb P(B)-\mathbb P(A)\) and \(\mathbb P(A)\le \mathbb P(B)\).

Proof. Finite additivity follows from countable additivity and \(\mathbb P(\varnothing)=0\). Apply it to the disjoint decompositions

\[ \Omega=A\mathbin{\dot\cup}A^c,\qquad A\cup B=A\mathbin{\dot\cup}(B\setminus A),\qquad B=(A\cap B)\mathbin{\dot\cup}(B\setminus A). \]

If \(A\subseteq B\), the last decomposition becomes \(B=A\mathbin{\dot\cup}(B\setminus A)\). Nonnegativity gives \(\mathbb P(B)\ge \mathbb P(A)\).

Monotone sequences of events

Definition 1.4

Let \((\Omega,\mathcal F,\mathbb P)\) be a probability space and \(A,B,A_1,A_2,\ldots\in\mathcal F\).

  • We write \(A_n\nearrow A\) if \(A_n\subseteq A_{n+1}\) for all \(n\ge1\) and \(A=\bigcup_{n\ge1}A_n\).
  • We write \(A_n\searrow B\) if \(A_n\supseteq A_{n+1}\) for all \(n\ge1\) and \(B=\bigcap_{n\ge1}A_n\).

Continuity of probability

Proposition 1.5

Let \(A,B,A_1,A_2,\ldots\) be events in a probability space. Then

\[ A_n\nearrow A\ \Longrightarrow\ \mathbb P(A_n)\nearrow \mathbb P(A), \qquad A_n\searrow B\ \Longrightarrow\ \mathbb P(A_n)\searrow \mathbb P(B). \]

Proof. In the increasing case set \(A_0=\varnothing\) and \(D_n=A_n\setminus A_{n-1}\). These sets are disjoint, so

\[ \mathbb P(A)=\sum_{n=1}^{\infty}\mathbb P(D_n) =\lim_{N\to\infty}\sum_{n=1}^{N}\mathbb P(D_n) =\lim_{N\to\infty}\mathbb P(A_N). \]

Decreasing case. \(A_n^c\nearrow B^c\) gives \(\mathbb P(A_n)=1-\mathbb P(A_n^c)\searrow 1-\mathbb P(B^c)=\mathbb P(B)\).

Definition 1.6 · Borel σ-algebra

For a metric space \(S\), the smallest \(\sigma\)-algebra containing all open subsets of \(S\) is called its Borel \(\sigma\)-algebra, denoted \(\mathcal B(S)\).

Measurable maps

Let \((S,\mathcal S)\) and \((T,\mathcal T)\) be measurable spaces.

Definition 1.7

A map \(g:S\to T\) is called measurable if

\[ g^{-1}(B)=\{s\in S:g(s)\in B\}\in\mathcal S \qquad\text{for every }B\in\mathcal T. \]

Example 1.8

(i) Constant maps. For a fixed \(t_0\in T\), \(g(s)=t_0\) is measurable: \(g^{-1}(B)=S\) if \(t_0\in B\), and \(g^{-1}(B)=\varnothing\) otherwise.

(ii) Continuous maps. For metric spaces \(S\) and \(T\) equipped with their Borel \(\sigma\)-algebras, every continuous map \(g:S\to T\) is measurable.

Inverse images preserve complements and countable unions. Thus \(\{B\subseteq T:g^{-1}(B)\in\mathcal B(S)\}\) is a \(\sigma\)-algebra. By continuity it contains all open subsets of \(T\), hence \(\mathcal B(T)\).

Random elements

Let \((\Omega,\mathcal F,\mathbb P)\) be a probability space and \((S,\mathcal S)\) a measurable space.

Definition 1.9

A measurable map \(X:(\Omega,\mathcal F)\to(S,\mathcal S)\) is called a random element in \((S,\mathcal S)\). Equivalently,

\[ X^{-1}(B)=\{\omega\in\Omega:X(\omega)\in B\}\in\mathcal F \qquad\text{for every }B\in\mathcal S. \]

Types of random elements

Definition 1.10
State space \(S\) Terminology Value at an outcome \(\omega\)
\(\mathbb R\) Random variable A real number \(X(\omega)\)
\(\mathbb R^d\), \(d\ge2\) Random vector \((X_1(\omega),\ldots,X_d(\omega))\)
\(C([0,1])\) Random function A continuous function \(t\mapsto X(\omega)(t)\)

We equip \(C([0,1])\) with the supremum norm and its Borel \(\sigma\)-algebra.

Measurability of random vectors

Proposition 1.11

Let \((\Omega,\mathcal F)\) be a measurable space and \(d\ge1\) an integer. Equip \(\mathbb R\) and \(\mathbb R^d\) with their Borel \(\sigma\)-algebras.

A map \(\mathbf X=(X_1,\ldots,X_d):\Omega\to\mathbb R^d\) is measurable if and only if every coordinate \(X_j\) is measurable.

Proof \((\Rightarrow)\). Fix \(j\in\{1,\ldots,d\}\). The projection \(\pi_j:\mathbb R^d\to\mathbb R\), \(\pi_j(x)=x_j\), is continuous.

With the Borel \(\sigma\)-algebras, \(\pi_j\) is measurable by Example 1.8 (ii).

If \(\mathbf X\) is measurable, then for every \(B\in\mathcal B(\mathbb R)\),

\[ X_j^{-1}(B)=\mathbf X^{-1}\!\left(\pi_j^{-1}(B)\right)\in\mathcal F. \]

Thus \(X_j\) is measurable for every \(j\).

Measurability of random vectors II

Proposition 1.11 · converse

If every coordinate \(X_j\) is measurable, then \(\mathbf X=(X_1,\ldots,X_d)\) is measurable.

Proof \((\Leftarrow)\). Define

\[ \mathcal C=\{A\subseteq\mathbb R^d:\mathbf X^{-1}(A)\in\mathcal F\}. \]

Inverse images preserve complements and countable unions, and \(\mathbf X^{-1}(\mathbb R^d)=\Omega\). Thus \(\mathcal C\) is a \(\sigma\)-algebra.

For open intervals \(I_1,\ldots,I_d\), put \(R=\prod_{j=1}^d I_j\). Then

\[ \mathbf X^{-1}(R)=\bigcap_{j=1}^dX_j^{-1}(I_j)\in\mathcal F. \]

Open boxes \(I_1 \times \ldots \times I_d\) with rational endpoints form a countable basis of the topology on \(\mathbb R^d\), so they generate \(\mathcal B(\mathbb R^d)\). Hence \(\mathcal B(\mathbb R^d)\subseteq\mathcal C\), proving measurability.

The distribution of a random element

Let \(X:(\Omega,\mathcal F,\mathbb P)\to(S,\mathcal S)\) be a random element.

Definition 1.12

The distribution of \(X\) is defined as the probability measure \(\mathbb P_X\) on \((S,\mathcal S)\) given by

\[ \mathbb P_X(B)=\mathbb P(X\in B)=\mathbb P\!\left(X^{-1}(B)\right), \qquad B\in\mathcal S. \]

Proof that \(\mathbb P_X\) is a probability measure. Measurability of \(X\) gives \(X^{-1}(B)\in\mathcal F\) for every \(B\in\mathcal S\). Hence \(\mathbb P_X\) is well-defined, \(\mathbb P_X(B)\ge0\), and \(\mathbb P_X(S)=\mathbb P(\Omega)=1\).

For pairwise disjoint \(B_1,B_2,\ldots\in\mathcal S\), put \(A_n=X^{-1}(B_n)\). These events are pairwise disjoint, so countable additivity of \(\mathbb P\) gives

\[ \mathbb P_X\!\left(\bigcup_{n\ge1}B_n\right) =\mathbb P\!\left(\bigcup_{n\ge1}A_n\right) =\sum_{n\ge1}\mathbb P(A_n) =\sum_{n\ge1}\mathbb P_X(B_n). \]

Measurable transformations

Proposition 1.13

Let \(X:(\Omega,\mathcal F,\mathbb P)\to(S,\mathcal S)\) be a random element and let \(g:(S,\mathcal S)\to(T,\mathcal T)\) be measurable.

Then \(Y=g\circ X\) is a random element in \((T,\mathcal T)\) with distribution

\[ \mathbb P_Y(C)=\mathbb P_X\!\left(g^{-1}(C)\right) \qquad\text{for every }C\in\mathcal T. \]

Proof. Let \(C\in\mathcal T\). Since \(g\) is measurable, \(g^{-1}(C)\in\mathcal S\). Measurability of \(X\) therefore gives

\[ Y^{-1}(C)=(g\circ X)^{-1}(C)=X^{-1}\!\left(g^{-1}(C)\right)\in\mathcal F. \]

Thus \(Y\) is a random element. By the definitions of \(\mathbb P_Y\) and \(\mathbb P_X\),

\[ \mathbb P_Y(C)=\mathbb P\!\left(Y^{-1}(C)\right) =\mathbb P\!\left(X^{-1}\!\left(g^{-1}(C)\right)\right) =\mathbb P_X\!\left(g^{-1}(C)\right). \]

Example: Tossing a coin

Example 1.14

Toss two fair coins independently. Write \(H\) for heads and \(T\) for tails.

\[ \Omega=\{TT,HT,TH,HH\},\qquad \mathcal F=\mathcal P(\Omega),\qquad \mathbb P(A)=\frac{|A|}{4}\quad(A\in\mathcal F). \]

Let \(X:\Omega\to\mathbb R\) count heads.

\(\omega\) \(TT\) \(HT\) \(TH\) \(HH\)
\(X(\omega)\) 0 1 1 2

For example, \(X^{-1}(\{1\})=\{HT,TH\}\). From the table, we read that the distribution of \(\mathbb P_X\) is

\[ \mathbb P_X(\{0\})=\frac14,\qquad \mathbb P_X(\{1\})=\frac12,\qquad \mathbb P_X(\{2\})=\frac14. \]

On the other hand, for the random variable \(Y=\mathbf1_{[1,\infty)}(X)\), we have \(\mathbb P_Y(\{1\})=\mathbb P_X(\{1,2\})=3/4\).

Cumulative distribution functions

Definition 1.15

For a real random variable \(X\), its cumulative distribution function (CDF) is defined by \(F_X(x)=\mathbb P(X\le x)\).

We say that a function \(F\) is right-continuous, if \(\displaystyle\lim_{h\searrow0}F(x+h)=F(x)\) for every \(x\).

Theorem 1.16

A function \(F:\mathbb R\to[0,1]\) is a CDF if and only if:

  1. \(F\) is nondecreasing.
  2. \(F\) is right-continuous.
  3. \(\displaystyle\lim_{x\to-\infty}F(x)=0\) and \(\displaystyle\lim_{x\to+\infty}F(x)=1\).

Every such \(F\) determines a unique Borel probability measure on \(\mathbb R\).

Right-continuity and the endpoint limits

Proposition 1.17

Let \(X\) be a real random variable and \(F_X(x)=\mathbb P(X\le x)\). Then \(F_X\) is right-continuous and

\[ \lim_{x\to-\infty}F_X(x)=0, \qquad \lim_{x\to+\infty}F_X(x)=1. \]

Proof. Fix \(x\in\mathbb R\) and let \(h_n\searrow0\) with \(h_n>0\). By Proposition 1.5,

\[ X^{-1}((-\infty,x+h_n])\searrow X^{-1}((-\infty,x]) \quad\Longrightarrow\quad F_X(x+h_n)\searrow F_X(x). \]

For the endpoint limits, the same result gives

\[ \begin{aligned} X^{-1}((-\infty,-n])\searrow\varnothing &\quad\Longrightarrow\quad F_X(-n)\searrow0,\\ X^{-1}((-\infty,n])\nearrow\Omega &\quad\Longrightarrow\quad F_X(n)\nearrow1. \end{aligned} \]

The inclusion \(X^{-1}((-\infty,x])\subseteq X^{-1}((-\infty,y])\) for \(x\le y\) makes \(F_X\) nondecreasing. The integer limits therefore extend to \(x\to\pm\infty\).

Left limits and point probabilities

Proposition 1.18

Let \(X\) be a real random variable with CDF \(F_X\). For every \(x\in\mathbb R\), the left limit \(F_X(x^-)=\lim_{t\nearrow x}F_X(t)\) exists and

\[ \begin{aligned} F_X(x^-)&=\mathbb P(X<x),\\ F_X(x)-F_X(x^-)&=\mathbb P(X=x). \end{aligned} \]

Proof. The bounded, nondecreasing function \(F_X\) has a left limit at every \(x\). Since \(X^{-1}((-\infty,x-1/n])\nearrow X^{-1}((-\infty,x))\), continuity of probability gives

\[ F_X(x^-)=\lim_{n\to\infty}\mathbb P(X\le x-1/n)=\mathbb P(X<x). \]

The second identity follows by additivity from the disjoint decomposition

\[ X^{-1}((-\infty,x])=X^{-1}((-\infty,x))\mathbin{\dot\cup}X^{-1}(\{x\}). \]

Atoms and CDF jumps

Definition 1.19

A point \(x\in\mathbb R\) is called an atom of the distribution \(\mathbb P_X\) if \(\mathbb P(X=x)>0\).

By Proposition 1.18, atoms are exactly the jump discontinuities of \(F_X\). The jump at \(x\) has size \(\mathbb P(X=x)\).

Example 1.20

If \(F_X(2^-)=0.55\) and \(F_X(2)=0.70\), then

\[ \mathbb P(X=2)=0.15. \]

A CDF with correctly scaled vertical coordinates. A jump from 0.55 to 0.70 at x equal to 2 has size 0.15.

Interval probabilities from the CDF

Proposition 1.21

Let \(X\) be a real random variable with CDF \(F_X\). For every \(a,b\in\mathbb R\) with \(a<b\),

\[ \begin{aligned} \mathbb P(a<X\le b)&=F_X(b)-F_X(a),\\ \mathbb P(a\le X\le b)&=F_X(b)-F_X(a^-). \end{aligned} \]

Proof. The following are disjoint decompositions:

\[ \begin{aligned} X^{-1}((-\infty,b])&=X^{-1}((-\infty,a])\mathbin{\dot\cup}X^{-1}((a,b]),\\ X^{-1}((-\infty,b])&=X^{-1}((-\infty,a))\mathbin{\dot\cup}X^{-1}([a,b]). \end{aligned} \]

Apply additivity, use \(\mathbb P(X\le a)=F_X(a)\) and \(\mathbb P(X<a)=F_X(a^-)\), and rearrange.

Countability of CDF discontinuities

Proposition 1.22

If \(X\) is a real random variable, its CDF \(F_X\) has at most countably many discontinuities.

Proof. For each integer \(m\ge1\), define

\[ D_m=\{x\in\mathbb R:\mathbb P(X=x)\ge1/m\}. \]

There can be at most \(m\) points in \(D_m\): any \(m+1\) such disjoint singleton events would have total probability greater than \(1\).

Every atom belongs to some \(D_m\), so

\[ \{x\in\mathbb R:\mathbb P(X=x)>0\}=\bigcup_{m=1}^{\infty}D_m \]

is countable. Since \(F_X\) is nondecreasing and right-continuous, every discontinuity is a jump.

The generalized inverse

Definition 1.23

Let \(F\) satisfy the CDF properties in Theorem 1.16. Its generalized inverse is defined by

\[ F^{-1}(u)=\inf\{x\in\mathbb R:F(x)\ge u\},\qquad 0<u<1. \]

Proposition 1.24

Let \(F\) satisfy the properties in Theorem 1.16. For every \(u\in(0,1)\), \(F^{-1}(u)\) is finite and

\[ F\!\left(F^{-1}(u)\right)\ge u. \]

Proof. The endpoint limits make \(\{x\in\mathbb R:F(x)\ge u\}\) nonempty and bounded below. Put \(q=F^{-1}(u)\) and choose \(x_n\searrow q\) with \(F(x_n)\ge u\). Right-continuity gives

\[ F(q)=\lim_{n\to\infty}F(x_n)\ge u. \]

A prescribed probability distribution function

Proposition 1.25

Let \(F\) satisfy the CDF properties in Theorem 1.16, and put \(Q=F^{-1}\).

Then \(Q:(0,1)\to\mathbb R\) is measurable. If \(U\) is uniform on \((0,1)\), the random variable \(Q(U)\) has CDF \(F\).

Proof. For \(u\in(0,1)\) and \(x\in\mathbb R\),

\[ Q(u)\le x\quad\Longleftrightarrow\quad u\le F(x). \]

The forward implication follows from \(F(x)\ge F(Q(u))\ge u\). The reverse implication follows from the definition of the infimum.

Thus \(Q^{-1}(({-\infty},x])=(0,1)\cap(0,F(x)]\) is Borel. These half-lines generate \(\mathcal B(\mathbb R)\), so \(Q\) is measurable. Moreover,

\[ \mathbb P(Q(U)\le x)=\mathbb P(U\le F(x))=F(x). \]

Taking complements also gives \(F(x)<u\Longleftrightarrow x<Q(u)\).

Continuity of quantiles

Proposition 1.26

For a CDF \(F\), the generalized inverse \(Q=F^{-1}:(0,1)\to\mathbb R\) is nondecreasing and left-continuous.

Proof. For \(0<u<v<1\),

\[ \{x\in\mathbb R:F(x)\ge v\}\subseteq\{x\in\mathbb R:F(x)\ge u\} \quad\Longrightarrow\quad Q(u)\le Q(v). \]

To prove left-continuity, let \(u_n\nearrow u\in(0,1)\). Then \(Q(u_n)\nearrow\ell\le Q(u)\), and

\[ F(\ell)\ge F(Q(u_n))\ge u_n \quad\Longrightarrow\quad F(\ell)\ge u. \]

The inverse relation gives \(Q(u)\le\ell\). Therefore

\[ \lim_{v\nearrow u}Q(v)=Q(u). \]

CDF jumps and quantile plateaus

Example 1.27

For the two-coin variable, \(\mathbb P(X=0)=1/4\), \(\mathbb P(X=1)=1/2\), and \(\mathbb P(X=2)=1/4\).

The CDF of the number of heads in two fair coin tosses and its left-continuous generalized inverse. A jump of one half at x=1 becomes a plateau on one quarter less than u less than or equal to three quarters. A CDF plateau on 0 to 1 becomes a right jump of the quantile at u=one quarter.

\[ F(x^-)<u\le F(x)\quad\Longrightarrow\quad F^{-1}(u)=x. \]

The plateau \(F(x)=1/4\) on \([0,1)\) gives a right jump of \(F^{-1}\) at \(u=1/4\).

Discrete distributions

Definition 1.28

The Dirac measure at \(a\) is defined by \(\delta_a(A)=\mathbf1_A(a)\).

A distribution is called discrete if, for distinct points \(\xi_j\) in a finite or countable set,

\[ \mathbb P_X=\sum_j p_j\delta_{\xi_j}, \qquad p_j\ge0,\qquad\sum_jp_j=1. \]

Its probability mass function (PMF) is defined by \(p_X(\xi_j)=p_j\) and \(p_X(x)=0\) elsewhere.

Its support is the set of atoms, denoted by \(\operatorname{supp}(X):=\{x\in\mathbb R:p_X(x)>0\}\). Hence

\[ \mathbb P(X\in A)=\sum_{\xi_j\in A}p_j, \qquad F_X(x)=\sum_{\xi_j\le x}p_j. \]

For finite support, the CDF is a step function with a jump of \(p_X(x)\) at each \(x\in\operatorname{supp}(X)\).

Absolutely continuous distributions

Definition 1.29

A distribution is called absolutely continuous if there is a measurable \(f_X:\mathbb R\to[0,\infty)\) such that

\[ \int_{\mathbb R}f_X(x)\,dx=1, \qquad \mathbb P(X\in A)=\int_A f_X(x)\,dx \quad(A\in\mathcal B(\mathbb R)). \]

The function \(f_X\) is called a probability density function, and

\[ F_X(x)=\int_{-\infty}^{x}f_X(t)\,dt. \]

The density is called the Radon–Nikodym derivative \(d\mathbb P_X/dx\), defined up to equality almost everywhere.

Radon–Nikodym derivatives

Proposition 1.30

Let \(X\) have an absolutely continuous distribution with density \(f_X\). Its CDF \(F_X\) is continuous, and \(F_X'(x)=f_X(x)\) for Lebesgue-almost every \(x\). This equality also holds at every continuity point of \(f_X\).

Proof at continuity points of \(f_X\). For \(h\ne0\),

\[ \frac{F_X(x+h)-F_X(x)}{h} =\frac1h\int_x^{x+h}f_X(t)\,dt \ \longrightarrow\ f_X(x). \]

The fundamental theorem for Lebesgue integrals gives continuity of \(F_X\) and the general almost-everywhere assertion. In particular,

\[ \mathbb P(X=x)=\int_{\{x\}}f_X(t)\,dt=0 \qquad\text{for every }x. \]

A density value is not a point probability: for \(U\sim U(0,1/2)\), \(f_U(x)=2\) on \((0,1/2)\).

Worksheet 1: Uniform distribution on \([-2,2]\)

Exercise 1.31 · Worksheet 1, Question 11

Let \(X\) have probability density function

\[ f_X(x)=c\,\mathbf1_{[-2,2]}(x), \]

  1. Determine \(c\).
  2. Determine and sketch the probability distribution function \(F_X\).
  3. Find the \(0.95\)-quantile.

A mixed distribution

Example 1.32

For \(0<\pi<1\), let \(\mathbb P_X=\pi\delta_0+(1-\pi)U(0,1)\). Then

\[ F_X(x)= \begin{cases} 0,&x<0,\\ \pi+(1-\pi)x,&0\le x<1,\\ 1,&x\ge1. \end{cases} \]

The atom at zero has mass \(\pi\). Probabilities on \((0,1)\) are obtained by integrating the constant \(1-\pi\).

This distribution is neither discrete nor absolutely continuous.

Random vectors and independence

02 · WEEK 1 · LECTURE 2

Joint distributions, independence, and discrete and absolutely continuous random vectors.

Random vectors and their joint CDFs

Definition 2.1

For a random vector \(\mathbf X=(X_1,\ldots,X_d)\), the joint distribution is defined by

\[ \mathbb P_{\mathbf X}(A)=\mathbb P(\mathbf X\in A), \qquad A\in\mathcal B(\mathbb R^d). \]

For \(x=(x_1,\ldots,x_d)\), define \(S_x=\prod_{j=1}^d(-\infty,x_j]\). The joint CDF is defined by

\[ F_{\mathbf X}(x)=\mathbb P(X_1\le x_1,\ldots,X_d\le x_d)=\mathbb P_{\mathbf X}(S_x). \]

It is nondecreasing in each coordinate and uniquely determines the joint distribution.

Joint probability distribution function for the scores of two fair dice with 36 equally likely ordered pairs. A three-dimensional staircase has height ij/36 on each rectangle [i,i+1) × [j,j+1), for i and j from 1 to 6. The horizontal axes are x and y, and the vertical axis is F_X(x,y). The marked point at (3,4) has height 1/3.

Joint CDFs: one-sided limits

Proposition 2.2

Let \(\mathbf X\) be a random vector in \(\mathbb R^d\), \(x\in\mathbb R^d\), and \(h_n>0\) with \(h_n\searrow0\). Write \(\mathbf1=(1,\ldots,1)\) and \(S_x=\prod_{j=1}^d(-\infty,x_j]\). Then

\[ \begin{aligned} F_{\mathbf X}(x+h_n\mathbf1)&\searrow F_{\mathbf X}(x),\\ F_{\mathbf X}(x-h_n\mathbf1)&\nearrow \mathbb P_{\mathbf X}(S_x^\circ), \end{aligned} \] where \(S_x^\circ=\prod_j(-\infty,x_j)\) denotes the interior of \(S_x\).

Proof. The lower rectangles satisfy

\[ S_{x+h_n\mathbf1}\searrow S_x, \qquad S_{x-h_n\mathbf1}\nearrow S_x^\circ. \]

Apply continuity of probability to their inverse images under \(\mathbf X\).

Continuity of a joint CDF

Proposition 2.3

Let \(\mathbf X\) be a random vector in \(\mathbb R^d\) and \(x\in\mathbb R^d\). For \(S_x=\prod_{j=1}^d(-\infty,x_j]\), with boundary \(\partial S_x=S_x\setminus S_x^\circ\),

\[ F_{\mathbf X}\text{ is continuous at }x \quad\Longleftrightarrow\quad \mathbb P_{\mathbf X}(\partial S_x)=0. \]

Proof. If the boundary has probability zero, the upper and lower limits on the previous slide both equal \(F_{\mathbf X}(x)\). For \(\|y-x\|_\infty<h\),

\[ F_{\mathbf X}(x-h\mathbf1) \le F_{\mathbf X}(y) \le F_{\mathbf X}(x+h\mathbf1). \]

For any \(\varepsilon>0\), choose \(h>0\) so that both bounds differ from \(F_{\mathbf X}(x)\) by less than \(\varepsilon\). Then \(|F_{\mathbf X}(y)-F_{\mathbf X}(x)|<\varepsilon\) whenever \(\|y-x\|_\infty<h\), proving continuity at \(x\).

Conversely, continuity gives \(\mathbb P_{\mathbf X}(S_x^\circ)=\mathbb P_{\mathbf X}(S_x)\), so the boundary has probability zero.

Marginal distributions

Definition 2.4

For a random vector \(\mathbf X=(X_1,\ldots,X_d)\), the distributions \(\mathbb P_{X_j}\) of its coordinates are called its marginal distributions.

Writing \(\pi_j(x)=x_j\) for the coordinate projection,

\[ \mathbb P_{X_j}(B)=\mathbb P_{\mathbf X}\!\left(\pi_j^{-1}(B)\right), \qquad B\in\mathcal B(\mathbb R). \]

This identity follows from \(X_j=\pi_j\circ\mathbf X\).

For a pair \((X,Y)\), \((X,Y)^{-1}((-\infty,x]\times(-\infty,n])\nearrow X^{-1}((-\infty,x])\), so

\[ F_X(x)=\lim_{y\to+\infty}F_{X,Y}(x,y). \]

Similarly, \(F_Y(y)=\lim_{x\to+\infty}F_{X,Y}(x,y)\).

Projection for the two fair dice. Thirty-six equally likely points form a six-by-six grid. Projection pi_1 sends each column to its first coordinate, combining six masses of 1/36 into a marginal mass of 1/6. The column with first coordinate 3 and its image are highlighted.

Conditional probability

Definition 2.5

Let \((\Omega,\mathcal F,\mathbb P)\) be a probability space. For \(B\in\mathcal F\) with \(\mathbb P(B)>0\), the conditional probability given \(B\) is defined by

\[ \mathbb P(A\mid B):=\frac{\mathbb P(A\cap B)}{\mathbb P(B)}, \qquad A\in\mathcal F. \]

Verification. This is a probability measure: it is nonnegative, \(\mathbb P(\Omega\mid B)=1\), and for disjoint \(A_n\),

\[ \mathbb P\!\left(\bigcup_n A_n\,\middle|\,B\right) =\frac{\sum_n\mathbb P(A_n\cap B)}{\mathbb P(B)} =\sum_n\mathbb P(A_n\mid B). \]

In particular, \(\mathbb P(B\mid B)=1\) and \(\mathbb P(A\cap B)=\mathbb P(A\mid B)\mathbb P(B)\).

Independent events

Definition 2.6

Events \(A,B\in\mathcal F\) are called independent if

\[ \mathbb P(A\cap B)=\mathbb P(A)\mathbb P(B). \]

For \(\mathbb P(B)>0\), this is equivalent to \(\mathbb P(A\mid B)=\mathbb P(A)\). However, the definition also applies when \(\mathbb P(B)=0\) or \(1\).

Sixteen equally likely outcomes form a four-by-four grid. Event A consists of the eight teal cells in the upper two rows. Event B consists of the eight cells in the left two columns. Conditioning on B leaves eight outcomes, four of which belong to A. Thus ℙ(A)=8/16=1/2 and ℙ(A given B)=4/8=1/2, illustrating independence.

Disjoint events of positive probability are not independent:

\[ A\cap B=\varnothing,\quad \mathbb P(A)\mathbb P(B)>0 \quad\Longrightarrow\quad \mathbb P(A\cap B)=0\ne \mathbb P(A)\mathbb P(B). \]

An independence criterion

Proposition 2.7

For events \(A,B\) with \(0<\mathbb P(B)<1\), \(A\) and \(B\) are independent if and only if

\[ \mathbb P(A\mid B)=\mathbb P(A\mid B^c). \]

Proof. Put \(\alpha=\mathbb P(A\mid B)\) and \(\beta=\mathbb P(A\mid B^c)\).

Since \(A=(A\cap B)\mathbin{\dot\cup}(A\cap B^c)\),

\[ \mathbb P(A)=\alpha \mathbb P(B)+\beta \mathbb P(B^c). \]

If \(\alpha=\beta\), this gives \(\mathbb P(A)=\alpha\) and hence \(\mathbb P(A\cap B)=\mathbb P(A)\mathbb P(B)\).

Conversely, if \(A\) and \(B\) are independent, then

\[ \mathbb P(A\cap B^c)=\mathbb P(A)-\mathbb P(A\cap B)=\mathbb P(A)\mathbb P(B^c), \]

so \(\alpha=\beta=\mathbb P(A)\). The same calculation proves independence is preserved under complementation.

A die: independence and dependence

Example 2.8

On \(\Omega=\{1,\ldots,6\}\) with equal probabilities, let

\[ A=\{2,4,6\},\qquad B=\{1,2\},\qquad C=\{1,2,3\}. \]

Pair Intersection probability Product of probabilities Independent?
\(A,B\) \(1/6\) \((1/2)(1/3)=1/6\) Yes
\(A,C\) \(1/6\) \((1/2)(1/2)=1/4\) No

Two views of the six equally likely die outcomes. Even outcomes in A are teal. Gold outlines select B={1,2} on the left and C={1,2,3} on the right. After conditioning on B, one of the two remaining outcomes is even, so ℙ(A given B)=1/2=ℙ(A). After conditioning on C, one of the three remaining outcomes is even, so ℙ(A given C)=1/3, different from ℙ(A)=1/2.

The dependence in the second row also appears as

\[ \mathbb P(A\mid C)=\frac13\ne\frac23=\mathbb P(A\mid C^c). \]

Independence of intervals

Example 2.9

On \([0,1]\) with uniform probability, let \(I=[0,1/3]\) and \(J=[a,b]\), where \(0\le a<b\le1\).

If \(J\subseteq I\) or \(a\ge1/3\), the equality \(\mathbb P(I\cap J)=\mathbb P(I)\mathbb P(J)\) is impossible. Thus independence requires \(a<1/3<b\), and

\[ \mathbb P(I\cap J)=\frac13-a,\qquad \mathbb P(I)\mathbb P(J)=\frac13(b-a). \]

\(I\) and \(J\) are independent if and only if

\[ 0\le a<\frac13,\qquad b=1-2a. \]

If \(a=b\), \(J\) has probability zero and is independent of every event.

The \(\sigma\)-algebra generated by random variables

Definition 2.10

For a class \(\mathcal C\) of subsets of \(\Omega\), \(\sigma(\mathcal C)\) denotes the smallest \(\sigma\)-algebra containing \(\mathcal C\).

For real random variables \(X_1,X_2,\ldots\), define

\[ \sigma(X_1,X_2,\ldots) =\sigma\!\left(\{X_i^{-1}(B):B\in\mathcal B(\mathbb R),\ i\ge1\}\right). \]

It is the smallest \(\sigma\)-algebra making every \(X_i\) measurable.

For one variable, \(\sigma(X)=\{X^{-1}(B):B\in\mathcal B(\mathbb R)\}\), because inverse images already form a \(\sigma\)-algebra.

Well-definedness: Arbitrary intersections of \(\sigma\)-algebras on \(\Omega\) are \(\sigma\)-algebras. The intersection of all those containing \(\mathcal C\) is therefore the smallest one. This family is nonempty, since it contains \(\mathcal P(\Omega)\).

The \(\sigma\)-algebra generated by a finite family

Proposition 2.11

Let \(\mathcal C=\{A_1,\ldots,A_m\}\subseteq\mathcal F\), where \(m\ge1\). Set \(A_i^{(1)}=A_i\) and \(A_i^{(0)}=A_i^c\).

For \(\varepsilon\in\{0,1\}^m\), define \(C_\varepsilon=\bigcap_{i=1}^m A_i^{(\varepsilon_i)}\). Then

\[ \sigma(\mathcal C) =\left\{\bigcup_{\varepsilon\in J}C_\varepsilon:J\subseteq\{0,1\}^m\right\}, \]

where the union over \(J=\varnothing\) is \(\varnothing\).

Proof. The nonempty sets \(C_\varepsilon\) partition \(\Omega\). Their unions form a \(\sigma\)-algebra \(\mathcal G\): complements select the remaining sets, and countable unions are again unions of these sets.

Since \(A_i=\bigcup_{\varepsilon:\varepsilon_i=1}C_\varepsilon\), we have \(\sigma(\mathcal C)\subseteq\mathcal G\). Conversely, every \(C_\varepsilon\in\sigma(\mathcal C)\), so every union of these finitely many sets belongs to \(\sigma(\mathcal C)\).

Example: the events determined by an observation

Example 2.12

On \(\Omega=[0,1]\), let \(X_1(\omega)=\omega\) and

\[ X_2(\omega)= \begin{cases} 1,&0\le\omega<1/2,\\ 2,&1/2\le\omega\le1. \end{cases} \]

Then

\[ \sigma(X_1)=\mathcal B([0,1]), \]

\[ \sigma(X_2)= \{\varnothing,\ [0,1/2),\ [1/2,1],\ [0,1]\}. \]

Every inverse image under \(X_2\) is a union of its two level sets. All four unions occur.

Independence of classes and sequences

Let \(\mathcal C_i\subseteq\mathcal F\) be classes of events, for \(i=1,2,\ldots\).

Definition 2.13

The classes are called independent if, for every finite nonempty set \(I\) of distinct indices and every choice \(A_i\in\mathcal C_i\),

\[ \mathbb P\!\left(\bigcap_{i\in I}A_i\right)=\prod_{i\in I}\mathbb P(A_i). \]

The random variables \(X_1,X_2,\ldots\) are called independent if the \(\sigma\)-algebras \(\sigma(X_1),\sigma(X_2),\ldots\) are independent.

Independence and joint CDFs

Theorem 2.14

For a real random vector \(\mathbf X=(X_1,\ldots,X_n)\), the following are equivalent.

(i) \(X_1,\ldots,X_n\) are independent.

(ii) For every \(\mathbf x=(x_1,\ldots,x_n)\in\mathbb R^n\),

\[ F_{\mathbf X}(x_1,\ldots,x_n)=F_{X_1}(x_1)\cdots F_{X_n}(x_n). \]

(iii) For all Borel sets \(B_1,\ldots,B_n\subseteq\mathbb R\),

\[ \mathbb P_{\mathbf X}(B_1\times\cdots\times B_n)=\mathbb P_{X_1}(B_1)\cdots \mathbb P_{X_n}(B_n). \]

Proof. (i) ⇒ (ii). Take the events \(X_i^{-1}(({-\infty},x_i])\).

(ii) ⇒ (iii). Equality holds for \(B_i=(-\infty,x_i]\). With the other sets fixed, both sides are finite measures in \(B_i\). Uniqueness extends equality to all Borel sets, one coordinate at a time.

From rectangles to independence

Proof of Theorem 2.14, (iii) ⇒ (i).

Let \(I=\{i_1,\ldots,i_k\}\subseteq\{1,\ldots,n\}\) be nonempty, and choose \(A_i\in\sigma(X_i)\) for \(i\in I\).

By Definition 2.10, write \(A_i=X_i^{-1}(B_i)\) with \(B_i\in\mathcal B(\mathbb R)\). Set \(B_i=\mathbb R\) for \(i\notin I\).

Condition (iii) and \(\mathbb P_{X_i}(\mathbb R)=1\) give

\[ \begin{aligned} \mathbb P\!\left(\bigcap_{i\in I}A_i\right) &=\mathbb P\!\left(\mathbf X^{-1}(B_1\times\cdots\times B_n)\right)\\ &=\mathbb P_{\mathbf X}(B_1\times\cdots\times B_n)\\ &=\mathbb P_{X_1}(B_1)\cdots \mathbb P_{X_n}(B_n)\\ &=\mathbb P(A_{i_1})\cdots \mathbb P(A_{i_k}). \end{aligned} \]

This holds for every \(I\) and every choice of the events \(A_i\). Thus the \(\sigma\)-algebras \(\sigma(X_1),\ldots,\sigma(X_n)\) are independent, as required.

Pairwise and mutual independence

Example 2.15

Toss two independent fair coins. Let \(X,Y\in\{H,T\}\) record the outcomes, with \(H\) for heads and \(T\) for tails. Define \(Z=1\) if \(X=Y\), and \(Z=0\) otherwise.

For \(a\in\{H,T\}\) and \(b\in\{0,1\}\), exactly one of the four equally likely outcomes of \((X,Y)\) gives \((X,Z)=(a,b)\), so

\[ \mathbb P(X=a,Z=b)=\frac14=\mathbb P(X=a)\mathbb P(Z=b). \]

The same calculation holds for \((Y,Z)\), so every pair is independent. But

\[ \mathbb P(X=H,Y=H,Z=1)=\frac14\ne\frac18 =\mathbb P(X=H)\mathbb P(Y=H)\mathbb P(Z=1). \]

Joint probability mass functions

Definition 2.16

Suppose \(X\) and \(Y\) are supported on countable sets \(D_X\) and \(D_Y\). Then \((X,Y)\) is supported on \(D=D_X\times D_Y\).

Its joint probability mass function is defined by

\[ p_{X,Y}(x,y)=\mathbb P(X=x,Y=y). \]

Proposition 2.17

If \((X,Y)\) is supported on a countable set \(D\subseteq\mathbb R^2\), then, for every Borel subset \(A\subseteq\mathbb R^2\),

\[ \mathbb P((X,Y)\in A)=\sum_{(x,y)\in A\cap D}p_{X,Y}(x,y), \qquad \sum_{(x,y)\in D}p_{X,Y}(x,y)=1. \]

Proof. The union of the disjoint events \((X,Y)^{-1}(\{(x,y)\})\), \((x,y)\in D\) has probability one. Both identities follow thus from countable additivity.

Marginal probability mass functions

Proposition 2.18

Let \(X,Y\) be supported on countable sets \(D_X,D_Y\). For every \(x\in D_X\) and \(y\in D_Y\),

\[ p_X(x)=\sum_{v\in D_Y}p_{X,Y}(x,v), \qquad p_Y(y)=\sum_{u\in D_X}p_{X,Y}(u,y). \]

Proof. For fixed \(x\), the events \(X^{-1}(\{x\})\cap Y^{-1}(\{v\})\), \(v\in D_Y\), are disjoint. Their union is \(X^{-1}(\{x\})\cap Y^{-1}(D_Y)\). Since \(\mathbb P(Y^{-1}(D_Y))=1\), countable additivity gives

\[ p_X(x)=\mathbb P\bigl(X^{-1}(\{x\})\bigr) =\sum_{v\in D_Y}\mathbb P\bigl(X^{-1}(\{x\})\cap Y^{-1}(\{v\})\bigr). \]

Interchanging \(X\) and \(Y\) gives the second identity. The marginals are the row and column sums of a joint PMF table.

Conditional probability mass functions

Definition 2.19

Let \((X,Y)\) be discrete with joint PMF \(p_{X,Y}\). For \(p_X(x)>0\), the conditional probability mass function of \(Y\) given \(X=x\) is defined by

\[ p_{Y\mid X=x}(y) :=\mathbb P(Y=y\mid X=x) :=\frac{p_{X,Y}(x,y)}{p_X(x)}. \]

The marginal identity proves normalization:

\[ \sum_{y\in\operatorname{supp}(Y)} p_{Y\mid X=x}(y) =\frac{\sum_{y\in\operatorname{supp}(Y)} p_{X,Y}(x,y)}{p_X(x)}=1. \]

For \(p_Y(y)>0\), the reverse conditional is

\[ p_{X\mid Y=y}(x):=\frac{p_{X,Y}(x,y)}{p_Y(y)}. \]

Independence and PMF factorization

Proposition 2.20

Let \(X,Y\) be random variables supported on countable sets \(D_X,D_Y\). They are independent if and only if

\[ p_{X,Y}(x,y)=p_X(x)p_Y(y)\quad\text{for every }x,y. \]

Proof. Independence gives the identity for the events \(X^{-1}(\{x\})\) and \(Y^{-1}(\{y\})\).

Conversely, summing a factorized PMF over any Borel rectangle \(A\times B\) gives

\[ \begin{aligned} \mathbb P(X\in A,Y\in B) &=\sum_{x\in A\cap D_X}\sum_{y\in B\cap D_Y}p_X(x)p_Y(y)\\ &=\mathbb P(X\in A)\mathbb P(Y\in B). \end{aligned} \]

One joint PMF: marginals, conditioning, independence

Example 2.21
\(Y=0\) \(Y=1\) \(p_X(x)\)
\(X=0\) 0.10 0.20 0.30
\(X=1\) 0.30 0.40 0.70
\(p_Y(y)\) 0.40 0.60 1

\[ \mathbb P(Y=1\mid X=0)=\frac{0.20}{0.30}=\frac23. \]

The variables are not independent because

\[ p_{X,Y}(0,0)=0.10\ne(0.30)(0.40)=p_X(0)p_Y(0). \]

Joint probability density functions

Definition 2.22

A pair \((X,Y)\) is called absolutely continuous if there is a measurable \(f_{X,Y}:\mathbb R^2\to[0,\infty)\) such that, for every Borel subset \(A\subseteq\mathbb R^2\),

\[ \mathbb P((X,Y)\in A)=\iint_A f_{X,Y}(x,y)\,dx\,dy. \]

The function \(f_{X,Y}\) is called a joint probability density function.

Taking \(A=\mathbb R^2\) gives \(\iint_{\mathbb R^2}f_{X,Y}(x,y)\,dx\,dy=1\).

Example 2.23 · Absolutely continuous marginals without a joint density

Let \(X\sim U(0,1)\) and \(Y=X\). Then \(X\) and \(Y\) have absolutely continuous distributions, but \((X,Y)\) has no joint density.

Indeed, the diagonal \(D=\{(x,y)\in\mathbb R^2:x=y\}\) has two-dimensional Lebesgue measure zero, whereas \(\mathbb P((X,Y)\in D)=1\).

Marginal probability density functions

Proposition 2.24

If \((X,Y)\) has joint density \(f_{X,Y}\), then \(X\) and \(Y\) have marginal densities given almost everywhere by

\[ f_X(x)=\int_{\mathbb R}f_{X,Y}(x,y)\,dy, \qquad f_Y(y)=\int_{\mathbb R}f_{X,Y}(x,y)\,dx. \]

Proof. For every Borel subset \(A\subseteq\mathbb R\), Tonelli’s theorem gives

\[ \mathbb P(X\in A) =\int_A\left[\int_{\mathbb R}f_{X,Y}(x,y)\,dy\right]dx. \]

The inner integral is measurable and nonnegative, with total integral one. It is therefore finite almost everywhere and defines a density of \(X\). Interchanging the coordinates proves the claim for \(Y\).

Conditional probability density functions

Definition 2.25

Let \((X,Y)\) have joint density \(f_{X,Y}\), with marginal functions \(f_X,f_Y\) given by Proposition 2.24.

For \(0<f_X(x)<\infty\), the conditional probability density function of \(Y\) given \(X=x\) is defined by

\[ f_{Y\mid X=x}(y):=\frac{f_{X,Y}(x,y)}{f_X(x)}. \]

Similarly, \(f_{X\mid Y=y}(x):=f_{X,Y}(x,y)/f_Y(y)\) for \(0<f_Y(y)<\infty\).

Verification. For such \(x\), \(f_{Y\mid X=x}\) is measurable and nonnegative, and

\[ \int_{\mathbb R}f_{Y\mid X=x}(y)\,dy =\frac{\int_{\mathbb R}f_{X,Y}(x,y)\,dy}{f_X(x)}=1. \]

Conditional distributions from densities

Proposition 2.26

Let \((X,Y)\) have joint density \(f_{X,Y}\). Define \(f_{Y\mid X=x}\) as in Definition 2.25, using a fixed probability density when \(f_X(x)\in\{0,\infty\}\).

For all Borel sets \(A,B\subseteq\mathbb R\),

\[ \mathbb P(X\in A,Y\in B) =\int_A\left[\int_Bf_{Y\mid X=x}(y)\,dy\right]d\mathbb P_X(x). \]

Proof. Put \(D=\{x\in\mathbb R:0<f_X(x)<\infty\}\). Since \(\int_{\mathbb R}f_X(x)\,dx=1\), \(\mathbb P_X(D)=1\).

On \(D\), \(f_{Y\mid X=x}(y)f_X(x)=f_{X,Y}(x,y)\). Thus, by Tonelli,

\[ \begin{aligned} \int_A\left[\int_Bf_{Y\mid X=x}(y)\,dy\right]d\mathbb P_X(x) &=\int_{A\cap D}\int_Bf_{X,Y}(x,y)\,dy\,dx\\ &=\mathbb P(X\in A,Y\in B). \end{aligned} \]

Independence and density factorization

Proposition 2.27

Let \((X,Y)\) have joint density \(f_{X,Y}\) and marginal densities \(f_X,f_Y\). Then \(X\) and \(Y\) are independent if and only if

\[ f_{X,Y}(x,y)=f_X(x)f_Y(y) \quad\text{for Lebesgue-almost every }(x,y). \]

Proof. Put \(g(x,y)=f_X(x)f_Y(y)\). For Borel subsets \(A,B\subseteq\mathbb R\), Tonelli gives

\[ \iint_{A\times B}g(x,y)\,dx\,dy=\mathbb P_X(A)\mathbb P_Y(B). \]

Taking \(A=B=\mathbb R\) shows that \(g\) is a probability density.

(⇐) If \(f_{X,Y}=g\) almost everywhere, then \(\mathbb P(X\in A,Y\in B)=\mathbb P_X(A)\mathbb P_Y(B)\).

(⇒) If \(X\) and \(Y\) are independent, the measures with densities \(f_{X,Y}\) and \(g\) agree on Borel rectangles. This class is closed under finite intersections and generates \(\mathcal B(\mathbb R^2)\). By uniqueness of probability measures and of densities, \(f_{X,Y}=g\) almost everywhere.

Example: a density on a triangle

Example 2.28

Let \(D=\{(x,y)\in\mathbb R^2:0<y<x<1\}\) and \(f_{X,Y}(x,y)=2\cdot\mathbf1_D(x,y)\). Then

\[ \int_0^1\int_0^x2\,dy\,dx=\int_0^12x\,dx=1. \]

The marginal densities are

\[ f_X(x)=2x\cdot\mathbf1_{(0,1)}(x), \qquad f_Y(y)=2(1-y)\cdot\mathbf1_{(0,1)}(y). \]

For \(0<x<1\),

\[ f_{Y\mid X=x}(y)=\frac1x\cdot\mathbf1_{(0,x)}(y). \]

Thus \(Y\mid X=x\) is uniform on \((0,x)\). The variables are not independent.

Bayes’ formula

Optional preparation for Worksheet 1

Proposition 2.29

For events \(A,B\) in a probability space with \(\mathbb P(A)>0\) and \(\mathbb P(B)>0\),

\[ \mathbb P(B\mid A)=\frac{\mathbb P(A\mid B)\mathbb P(B)}{\mathbb P(A)}. \]

Proof. By the definition of conditional probability,

\[ \mathbb P(A\cap B)=\mathbb P(A\mid B)\mathbb P(B)=\mathbb P(B\mid A)\mathbb P(A). \]

Now, divide by \(\mathbb P(A)\).

Worksheet 1:

Exercise 2.30 · Worksheet 1, Question 5

Optional practice

Let \(H\) denote hypertension and \(D\) regular alcohol consumption. Suppose

\[ \mathbb P(H)=0.05,\qquad \mathbb P(D\mid H)=0.75,\qquad \mathbb P(D\mid H^c)=0.50. \]

  1. Find the proportion of people who drink alcohol, \(\mathbb P(D)\).
  2. Find the proportion of drinkers who have hypertension, \(\mathbb P(H\mid D)\).

Expectation, standard families, and transforms

03 · WEEK 2 · LECTURE 3

Expected value, variance, covariance. Binomial, poisson, multinomial, normal, exponential and gamma distributions. Characteristic functions.

Expected value

Definition 3.1

A real random variable \(X\) is called integrable if \(\int_\Omega|X|\,d\mathbb P<\infty\). If \(X\) is integrable, then its expected value is defined by

\[ \mathbb E(X)=\int_\Omega X(\omega)\,d\mathbb P(\omega) =\int_{\mathbb R}x\,d\mathbb P_X(x). \]

Remark: The condition \(\int_\Omega|X|\,d\mathbb P<\infty\) is needed for measure-theoretic reasons. If \(X\ge0\) (that is, \(X\) only attains nonnegative values), then the integral is also defined without this assumption, but it may have a value in \([0,\infty]\).

Expectations of functions of a random variable

Theorem 3.2 · "Law of the unconscious statistician" (LOTUS)

Let \(X\) be a real random variable and \(g:\mathbb R\to\mathbb R\) measurable. If \(\mathbb E(|g(X)|)<\infty\), then

\[ \mathbb E(g(X))=\int_{\mathbb R}g(x)\,d\mathbb P_X(x). \]

If \(X\) is discrete or absolutely continuous, then the integral can be written with either the PMF or the PDF as

\[ \mathbb E(g(X)) =\sum_{x\in\operatorname{supp}(X)} g(x)p_X(x) \quad\text{or}\quad \mathbb E(g(X)) =\int_{\mathbb R}g(x)f_X(x)\,dx. \]

Properties of expectation

Proposition 3.3

Let \(X,Y,X_1,\ldots,X_m\) be integrable random variables on \((\Omega,\mathcal F,\mathbb P)\), \(a_1,\ldots,a_m\in\mathbb R\), and \(A\in\mathcal F\). Then the expected value \(\mathbb E\) has the following properties.

\[ \begin{aligned} &\text{Linearity:}&& \mathbb E\!\left(\sum_{j=1}^m a_jX_j\right)=\sum_{j=1}^m a_j\mathbb E(X_j),\\[3mm] &\text{Monotonicity:}&& X\le Y\ \text{a.s.}\ \Longrightarrow\ \mathbb E(X)\le \mathbb E(Y),\\[3mm] &\text{Indicators:}&& \mathbb E(\mathbf1_A)=\mathbb P(A). \end{aligned} \]

We say that a property holds almost surely (a.s.), if it holds with probability one. Precisely, we say that \(X\le Y\) holds almost surely, if \(\mathbb P (\{\omega\in \Omega \mid X(\omega) \le Y(\omega) \}) = 1\). Likewise, we say that \(X = Y\) holds almost surely, if \(\mathbb P (\{\omega\in \Omega \mid X(\omega) = Y(\omega) \}) = 1\). By \([X]\), we denote the equivalence class of all random variables \(Y\) which are equal to \(X\) almost surely.

Moments and \(L^p\) spaces

Definition 3.4

For \(1\le p<\infty\), let

\[ L^p(\mathbb P)=\{[X]:\mathbb E(|X|^p)<\infty\}, \qquad \|[X]\|_p=(\mathbb E(|X|^p))^{1/p}. \]

Here \(X\) ranges over real random variables on \((\Omega,\mathcal F,\mathbb P)\). We write \([X]\) to denote the equivalence class defined on the previous slide, so that we identify two random variables when they are equal almost surely. This is important, because \(\|[X]\|_p\) is a norm on classes of random variables, but only a seminorm on random variables.

For an integer \(k\ge1\) and \(X \in L^k(\mathbb P)\), the \(k\)-th moment and \(k\)-th central moment are defined, respectively, as

\[ \mathbb E(X^k) \qquad \text{and}\qquad \mathbb E((X-\mathbb E(X))^k). \]

Comparison of \(L^p\) norms

Proposition 3.5

On a probability space, if \(p>q\ge1\) and \(X\in L^p(\mathbb P)\), then \(X\in L^q(\mathbb P)\) and \(\|X\|_q\le\|X\|_p\).

Proof. The function \(t\mapsto t^{q/p}\) is concave on \([0,\infty)\). Jensen’s inequality applied to \(|X|^p\) gives \(\mathbb E(|X|^q)\le(\mathbb E(|X|^p))^{q/p}<\infty\). Taking \(q\)th roots proves the claim.

Proposition 3.6 · Jensen's inequality

Let \(Z\) be integrable with values in an interval \(I\), and let \(g:I\to\mathbb R\) be convex. Then

\[ g(\mathbb E(Z))\le\mathbb E(g(Z)). \]

The right-hand side may be \(+\infty\). For concave \(g\), the inequality is reversed, allowing \(-\infty\) on the right.

Variance

Definition 3.7

For \(X\in L^2(\mathbb P)\), the variance is defined by

\[ \mathbb V(X)=\mathbb E((X-\mathbb E(X))^2). \]

Proposition 3.8

For \(X\in L^2(\mathbb P)\) and \(a,b\in\mathbb R\),

\[ \mathbb V(X)=\mathbb E(X^2)-(\mathbb E(X))^2,\qquad \mathbb V(aX+b)=a^2\mathbb V(X). \]

Moreover, \(\mathbb V(X)=0\) if and only if \(X=\mathbb E(X)\) almost surely.

Proof. Expand the square and apply linearity for the first identity. The second follows from \(aX+b-\mathbb E(aX+b)=a(X-\mathbb E(X))\).

Finally, the nonnegative variable \((X-\mathbb E(X))^2\) has expectation zero if and only if it is zero almost surely.

Worksheet 1: mean and variance

Exercise 3.9 · Worksheet 1, Question 8

Let \(X\) have the following distribution:

\[ \mathbb P(X=-2)=\frac13,\qquad \mathbb P(X=3)=\frac12,\qquad \mathbb P(X=1)=\frac16. \]

  1. Compute \(\mathbb E(X)\) and \(\mathbb E(X^2)\).
  2. Compute \(\mathbb V(X)\).
  3. Determine \(\mathbb E(2X+5)\), \(\mathbb V(2X)\), and \(\mathbb V(2X+5)\).

Worksheet 1: variance of the uniform distribution

Exercise 3.10 · Worksheet 1, Question 11, continued

Let \(X\sim U(-2,2)\).

  1. Compute \(\mathbb E(X)\), \(\mathbb E(X^2)\), and \(\mathbb V(X)\).
  2. Find the standard deviation of \(X\).
  3. Determine \(\mathbb E(2X+5)\) and \(\mathbb V(3X+4)\).

Covariance

Definition 3.11

For \(X,Y\in L^2(\mathbb P)\), their covariance is defined by

\[ \operatorname{Cov}(X,Y) =\mathbb E((X-\mathbb E(X))(Y-\mathbb E(Y))). \]

The random variables \(X, Y\) are called uncorrelated if \(\operatorname{Cov}(X,Y)=0\).

Proposition 3.12

For \(X,Y\in L^2(\mathbb P)\) and \(a,b,c,d\in\mathbb R\),

\[ \begin{aligned} \operatorname{Cov}(X,Y)&=\mathbb E(XY)-\mathbb E(X)\mathbb E(Y),\\ \operatorname{Cov}(aX+b,cY+d)&=ac\,\operatorname{Cov}(X,Y),\\ |\operatorname{Cov}(X,Y)|&\le\sqrt{\mathbb V(X)\mathbb V(Y)}. \end{aligned} \]

Proof. Expand the product, use linearity, and apply Cauchy–Schwarz to the centered variables.

Covariance and inner products

Proposition 3.13

On the real vector space \(L^2(\mathbb P)\), an inner product is defined by

\[ \langle X,Y\rangle_2:=\int_\Omega X(\omega)Y(\omega)\,d\mathbb P(\omega). \]

On the subspace \(L^2_0(\mathbb P):=\{X\in L^2(\mathbb P):\mathbb E(X)=0\}\), covariance is this inner product:

\[ \operatorname{Cov}(X,Y)=\langle X,Y\rangle_2\qquad(X,Y\in L^2_0(\mathbb P)). \]

Proof. Cauchy–Schwarz gives \(\mathbb E(|XY|)<\infty\). Symmetry and bilinearity follow from the integral. Also, \(\langle X,X\rangle_2=\mathbb E(X^2)\ge0\), with equality exactly when \(X=0\) almost surely, that is, \(X=0\) in \(L^2(\mathbb P)\).

For centered variables the covariance formula is \(\mathbb E(XY)\). On all of \(L^2(\mathbb P)\), covariance is not an inner product: \(\operatorname{Cov}(1,1)=0\) although \(1\ne0\).

Hoeffding’s covariance identity

Theorem 3.14

Let \(X,Y\in L^2(\mathbb P)\), with joint CDF \(F_{X,Y}\) and marginal CDFs \(F_X,F_Y\). Then

\[ \operatorname{Cov}(X,Y) =\int_{\mathbb R^2} \bigl(F_{X,Y}(x,y)-F_X(x)F_Y(y)\bigr)\,dx\,dy. \]

For independent variables the integrand is zero everywhere. The converse does not hold, since the integral can be zero due to cancellations between positive and negative values of the integrand.

Variance of a sum

Proposition 3.15

For \(X_1,\ldots,X_n\in L^2(\mathbb P)\),

\[ \mathbb V\!\left(\sum_{j=1}^nX_j\right) =\sum_{j=1}^n\mathbb V(X_j) +2\sum_{1\le i<j\le n}\operatorname{Cov}(X_i,X_j). \] If the variables are pairwise uncorrelated, then

\[ \mathbb V\!\left(\sum_{j=1}^nX_j\right)=\sum_{j=1}^n\mathbb V(X_j). \]

Proof. We showed in Proposition 3.12 that the covariance is bilinear. This can be used to expand \(\mathbb E\!\left(\left(\sum_j(X_j-\mathbb E(X_j))\right)^2\right)\). The cross terms are twice the pairwise covariances.

Expectation of a product

Proposition 3.16

If \(X\) and \(Y\) are independent and integrable, then \(XY\) is integrable and

\[ \mathbb E(XY)=\mathbb E(X)\mathbb E(Y). \]

Proof. By Theorem 2.14, the joint distribution is the product of the marginals. Tonelli’s theorem gives

\[ \begin{aligned} \mathbb E(|XY|) &=\int_{\mathbb R}\int_{\mathbb R}|xy|\,d\mathbb P_Y(y)\,d\mathbb P_X(x)\\ &=\mathbb E(|X|)\mathbb E(|Y|)<\infty. \end{aligned} \]

Fubini’s theorem therefore applies to the signed product:

\[ \mathbb E(XY) =\int_{\mathbb R}x\left(\int_{\mathbb R}y\,d\mathbb P_Y(y)\right)d\mathbb P_X(x) =\mathbb E(X)\mathbb E(Y). \]

Uncorrelatedness and independence

Proposition 3.17

Let \(X,Y\in L^2(\mathbb P)\).

(i) \(X\) and \(Y\) are uncorrelated if and only if \(\operatorname{Cov}(f(X),g(Y))=0\) for every pair of affine linear functions \(f,g:\mathbb R\to\mathbb R\).

(ii) \(X\) and \(Y\) are independent if and only if \(\operatorname{Cov}(f(X),g(Y))=0\) for every pair of Borel-measurable functions \(f,g:\mathbb R\to\mathbb R\) with \(f(X),g(Y)\in L^2(\mathbb P)\).

In each condition, the integral required to vanish is

\[ \int_\Omega \bigl(f(X)-\mathbb E(f(X))\bigr) \bigl(g(Y)-\mathbb E(g(Y))\bigr)\,d\mathbb P. \]

The integrability restriction in (ii) can instead be replaced by requiring \(f,g\) to be bounded.

Proof of the comparison

Proof of Proposition 3.17.

(i) If \(f(x)=ax+b\) and \(g(y)=cy+d\), Proposition 3.12 gives

\[ \operatorname{Cov}(f(X),g(Y))=ac\,\operatorname{Cov}(X,Y). \]

This vanishes for all \(a,b,c,d\) exactly when \(\operatorname{Cov}(X,Y)=0\), by taking \(a=c=1\) and \(b=d=0\).

(ii), forward implication. Measurability gives \(\sigma(f(X))\subseteq\sigma(X)\) and \(\sigma(g(Y))\subseteq\sigma(Y)\), so \(f(X)\) and \(g(Y)\) are independent. By Proposition 3.16, their covariance is zero.

Reverse implication. For any Borel sets \(A,B\subseteq\mathbb R\), choose the bounded and measurable functions \(f=\mathbf1_A\) and \(g=\mathbf1_B\). Then

\[ 0=\operatorname{Cov}(\mathbf1_A(X),\mathbf1_B(Y)) =\mathbb P(X\in A,Y\in B)-\mathbb P(X\in A)\mathbb P(Y\in B). \]

By Theorem 2.14, \(X\) and \(Y\) are independent.

Uncorrelated but dependent variables

Example 3.18

Let \(\mathbb P(X=-1)=\mathbb P(X=0)=\mathbb P(X=1)=1/3\) and set \(Y=X^2\). Then

\[ \mathbb E(X)=\mathbb E(XY)=\mathbb E(X^3)=0, \]

so \(\operatorname{Cov}(X,Y)=0\). But \(Y\) is a function of \(X\), and

\[ \mathbb P(X=0,Y=0)=\frac13\ne\frac19=\mathbb P(X=0)\mathbb P(Y=0). \]

Tail integrals for moments

Proposition 3.19

For a nonnegative random variable \(X\) and a real \(r>0\), with equality in \([0,\infty]\),

\[ \mathbb E(X^r) =r\int_0^\infty t^{r-1}\mathbb P(X>t)\,dt. \]

Proof. Tonelli permits the interchange below because the integrand is nonnegative.

\[ \begin{aligned} \mathbb E(X^r) &=\int_\Omega X(\omega)^r\,d\mathbb P(\omega) =\int_\Omega\int_0^{X(\omega)}r t^{r-1}\,dt\,d\mathbb P(\omega)\\ &=\int_0^\infty\int_{\{\omega\in\Omega\mid X(\omega)>t\}}r t^{r-1}\,d\mathbb P(\omega)\,dt\\ &=r\int_0^\infty\mathbb P(\{\omega\in\Omega\mid X(\omega)>t\})t^{r-1}\,dt =r\int_0^\infty t^{r-1}\mathbb P(X>t)\,dt. \end{aligned} \]

Tail formulas for the mean

Proposition 3.20

For a nonnegative random variable \(X\),

\[ \mathbb E(X)=\int_0^\infty \mathbb P(X>t)\,dt =\int_0^\infty(1-F_X(t))\,dt. \]

Proposition 3.21 · Tail sum formula

For a random variable \(X\) taking values in \(\{0,1,2,\ldots\}\),

\[ \mathbb E(X)=\sum_{k=1}^\infty \mathbb P(X\ge k) =\sum_{k=0}^\infty \mathbb P(X>k). \]

Both equalities allow the value \(+\infty\). The integral follows from \(r=1\) in Proposition 3.19. The sum follows by taking expectations in \(X=\sum_{k\ge1}\mathbf1_{[k,\infty)}(X)\).

Tail sums for higher moments

Proposition 3.22

Let \(X\) take values in \(\{0,1,2,\ldots\}\) and let \(r\ge1\) be an integer. Then, with equality in \([0,\infty]\),

\[ \mathbb E(X^r) =\sum_{k=0}^{\infty} \bigl((k+1)^r-k^r\bigr)\mathbb P(X>k). \]

Proof. For \(t\in[k,k+1)\), \(\mathbb P(X>t)=\mathbb P(X>k)\). Splitting the nonnegative integral in Proposition 3.19 gives

\[ \begin{aligned} \mathbb E(X^r) &=\sum_{k=0}^\infty\mathbb P(X>k)\int_k^{k+1}r t^{r-1}\,dt\\ &=\sum_{k=0}^\infty\bigl((k+1)^r-k^r\bigr)\mathbb P(X>k). \end{aligned} \]

Expectation as a quantile integral

Proposition 3.23

Let \(X\) be an integrable real random variable and \(F_X^{-1}\) its generalized inverse. Then

\[ \mathbb E(X)=\int_0^1F_X^{-1}(u)\,du. \]

Proof. Put \(Q=F_X^{-1}\) and let \(U\) be uniform on \((0,1)\). By Proposition 1.25, \(Q\) is measurable and \(Q(u)\le x\) if and only if \(u\le F_X(x)\). Hence, for every \(x\in\mathbb R\),

\[ \mathbb P(Q(U)\le x)=\mathbb P(U\le F_X(x))=F_X(x). \]

Thus \(Q(U)\) and \(X\) have the same distribution. In particular, \(\mathbb E(|Q(U)|)=\mathbb E(|X|)<\infty\). Applying Theorem 3.2 to \(U\) and \(Q\) gives

\[ \mathbb E(X)=\mathbb E(Q(U))=\int_0^1Q(u)\,du. \]

The binomial distribution

Definition 3.24

Let \(n\ge1\) be an integer and \(0\le p\le1\). A variable \(X\) is said to have the binomial distribution, written \(X\sim B(n,p)\), if

\[ \mathbb P(X=k)=\binom nkp^k(1-p)^{n-k}, \qquad k=0,\ldots,n. \]

We use the convention \(0^0=1\) to include \(p=0\) and \(p=1\). The distribution \(B(1,p)\) is called Bernoulli\((p)\).

Proposition 3.25

Let \(X_1,\ldots,X_n\) be independent Bernoulli\((p)\) variables and put \(S_n=X_1+\cdots+X_n\). Then \(S_n\sim B(n,p)\) and

\[ \mathbb E(S_n)=np,\qquad \mathbb V(S_n)=np(1-p). \]

Conversely, every \(B(n,p)\) variable has the same distribution as \(S_n\).

Counting Bernoulli outcomes

Proof of Proposition 3.25. Suppose first that \(0<p<1\).

Each sequence \((\varepsilon_1,\ldots,\varepsilon_n)\in\{0,1\}^n\) containing exactly \(k\) ones has probability \(p^k(1-p)^{n-k}\), by independence.

There are \(\binom nk\) choices for the positions of the ones. The corresponding events are disjoint, so

\[ \mathbb P(S_n=k)=\binom nkp^k(1-p)^{n-k}. \]

For \(p=0\) or \(p=1\), \(S_n=np\) almost surely.

Four independent Bernoulli steps form a Galton-board lattice. Left steps have probability one minus p, right steps probability p. The path counts at the five endpoints are 1, 4, 6, 4, 1. One of the six paths with two right steps is highlighted.

The numbers count paths. All six paths to \(k=2\) have probability \(p^2(1-p)^2\).

Since \(X_j^2=X_j\), \(\mathbb E(X_j)=p\) and \(\mathbb V(X_j)=p(1-p)\). Linearity and Proposition 3.15 give

\[ \mathbb E(S_n)=np, \qquad \mathbb V(S_n)=np(1-p). \]

Worksheet 2: a binomial probability

Exercise 3.26 · Worksheet 2, Question 1

Each of 25 independently sampled people has probability \(0.10\) of kidney problems. Let \(X\) count the cases in the sample.

  1. Identify the distribution of \(X\) and its parameters.
  2. Find the probability of at most five cases.
  3. Find the probability of between six and nine cases, inclusive.

The trinomial distribution

Example 3.27

Assume we roll a 3-sided die 10 times independently. This means we have to take \(n=3\), \(d=10\). The die is weighted to show 1,2,3 with probabilities \(\mathbf p=(0.2,0.3,0.5)\). The vector \(\mathbf X=(X_1,X_2,X_3)\) records the face counts, so \(X_1+X_2+X_3=10\).

A triangular grid of the 66 possible count triples in ten rolls of a three-sided die with probabilities 0.2, 0.3, and 0.5. Circle area represents probability. The triple 2,3,5 is highlighted.

Each point represents one possible count triple. Circle area is proportional to its probability.

For the highlighted point,

\[ \begin{gathered} \mathbb P(\mathbf X=(2,3,5))\\ =\frac{10!}{2!\,3!\,5!}\,0.2^2\,0.3^3\,0.5^5\\ =0.08505. \end{gathered} \]

The multinomial distribution

Definition 3.28

Let \(n,d\ge1\) be integers and \(\mathbf p=(p_1,\ldots,p_n)\), where \(p_j\ge0\) and \(p_1+\cdots+p_n=1\).

A random vector \(\mathbf X=(X_1,\ldots,X_n)\) has the multinomial distribution, written \(\mathbf X\sim\operatorname{Multinomial}(d,\mathbf p)\), if

\[ \mathbb P(\mathbf X=\mathbf x) =\frac{d!}{x_1!\cdots x_n!}\,p_1^{x_1}\cdots p_n^{x_n} \]

for \(\mathbf x\in\mathbb N_0^n\) with \(x_1+\cdots+x_n=d\), and the probability is zero otherwise.

Counting interpretation. Roll an \(n\)-sided die \(d\) times independently. Write \(C_\ell\) for the outcome of roll \(\ell\), with \(\mathbb P(C_\ell=j)=p_j\) for each face \(j\). Let \(X_j\) count the occurrences of face \(j\).

Exactly \(d!/(x_1!\cdots x_n!)\) sequences have counts \(\mathbf x\). Each has probability \(p_1^{x_1}\cdots p_n^{x_n}\), giving the displayed formula.

Multinomial moments

Proposition 3.29

If \(\mathbf X=(X_1,\ldots,X_n)\sim\operatorname{Multinomial}(d,\mathbf p)\), then for each \(j\),

\[ X_j\sim B(d,p_j), \qquad \mathbb E(X_j)=dp_j, \qquad \mathbb V(X_j)=dp_j(1-p_j). \]

For \(i\ne j\), \(\operatorname{Cov}(X_i,X_j)=-dp_ip_j\).

Proof. Each of the \(d\) independent rolls shows face \(j\) with probability \(p_j\), so \(X_j\sim B(d,p_j)\) by Proposition 3.25.

For \(i\ne j\), \(X_iX_j\) counts ordered pairs of distinct rolls showing faces \(i\) and \(j\). Linearity and independence give

\[ \begin{aligned} \mathbb E(X_iX_j) &=\sum_{\substack{1\le\ell,m\le d\\\ell\ne m}}\mathbb P(C_\ell=i,C_m=j) =d(d-1)p_ip_j,\\ \operatorname{Cov}(X_i,X_j) &=d(d-1)p_ip_j-(dp_i)(dp_j)=-dp_ip_j. \end{aligned} \]

The Poisson distribution

Definition 3.30

For \(\lambda>0\), we define the Poisson distribution with rate \(\lambda\), denoted \(\operatorname{Poisson}(\lambda)\) as follows.

\[ X\sim\operatorname{Poisson}(\lambda) \quad\Longleftrightarrow\quad \mathbb P(X=k)=e^{-\lambda}\frac{\lambda^k}{k!}, \quad k=0,1,\ldots \] A Poisson-distributed random variable takes values in \(\mathbb N_0\).

Its mean and variance are both \(\lambda\):

\[ \mathbb E(X)=\mathbb V(X)=\lambda. \]

If \(X_j\sim\operatorname{Poisson}(\lambda_j)\) are independent, then

\[ \sum_{j=1}^nX_j\sim\operatorname{Poisson}\!\left(\sum_{j=1}^n\lambda_j\right). \]

The exponential distribution

Definition 3.31

For \(\lambda>0\), we define the exponential distribution with rate \(\lambda\), denoted \(\operatorname{Exp}(\lambda)\), as follows.

\[ X\sim\operatorname{Exp}(\lambda) \quad\Longleftrightarrow\quad f_X(x)=\lambda e^{-\lambda x}\mathbf1_{[0,\infty)}(x). \]

An exponentially distributed random variable takes values in \([0,\infty)\).

Integration gives

\[ \mathbb P(X>x)=e^{-\lambda x}\quad(x\ge0), \qquad \mathbb E(X)=\frac1\lambda, \qquad \mathbb V(X)=\frac1{\lambda^2}. \]

In the call-arrival example below, \(1/\lambda\) is the mean waiting time.

Call arrivals: counts

Example 3.32 · Call-centre model

Take \(\lambda>0\) and an integer \(n>\lambda\). At times \(j/n\) minutes (\(j=1,2,\ldots\)), one call arrives with probability \(\lambda/n\), independently. Let \(N_n(t)\) count calls by time \(t\). Then \(N_n(1)\sim B(n,\lambda/n)\).

Call-count probabilities for 6, 30, and 1000 short intervals per minute, at an average rate of three calls per minute. Teal binomial bars approach the fixed Poisson(3) probabilities shown by coral dots. All panels use the same axes.

For fixed \(k\in\mathbb N_0\) and \(n\ge k\), as \(n\to\infty\),

\[ \mathbb P(N_n(1)=k) =\frac{\lambda^k}{k!} \underbrace{\frac{n!}{(n-k)!\,n^k}}_{\longrightarrow 1} \underbrace{\left(1-\frac{\lambda}{n}\right)^{n-k}}_{\longrightarrow e^{-\lambda}} \longrightarrow e^{-\lambda}\frac{\lambda^k}{k!}. \]

Plots: \(\lambda=3\) calls/minute. Bars: binomial probabilities. Dots: \(\operatorname{Poisson}(3)\) probabilities.

Call arrivals: waiting times

Example 3.33 · Call-centre model, continued

In Example 3.32, let \(X_n\) be the waiting time, in minutes, for the first call. There are \(\lfloor nt\rfloor\) trials by time \(t\ge0\).

No calls occur between time zero and t. The first call arrives at time X_n, to the right of t. Thus X_n greater than t and N_n(t) equal to zero describe the same event.

Waiting longer than \(t\) means that all these trials produced no call:

\[ \begin{aligned} \mathbb P(X_n>t) &=\mathbb P(N_n(t)=0)=\left(1-\frac{\lambda}{n}\right)^{\lfloor nt\rfloor}\\ &=\left[\left(1-\frac{\lambda}{n}\right)^n\right]^{\lfloor nt\rfloor/n} \xrightarrow[n\to\infty]{} e^{-\lambda t}. \end{aligned} \]

This is the survival probability of \(\operatorname{Exp}(\lambda)\). For \(\lambda=3\) calls/minute, the mean waiting time is \(1/3\) minute, or \(20\) seconds.

Memorylessness

Proposition 3.34

If \(X\sim\operatorname{Exp}(\lambda)\) with \(\lambda>0\), then for every \(s,t\ge0\),

\[ \mathbb P(X>s+t\mid X>s) =\mathbb P(X>t). \]

Equivalently, the conditional distribution of \(X-s\) given \(X>s\) is \(\operatorname{Exp}(\lambda)\).

Proof. Since \(\mathbb P(X>s)=e^{-\lambda s}>0\),

\[ \mathbb P(X>s+t\mid X>s) =\frac{\mathbb P(X>s+t)}{\mathbb P(X>s)} =\frac{e^{-\lambda(s+t)}}{e^{-\lambda s}} =e^{-\lambda t}. \]

This is the survival probability \(\mathbb P(X>t)\) for every \(t\ge0\), so it determines the same distribution.

Worksheet 2: a Poisson probability

Exercise 3.35 · Worksheet 2, Question 3

The annual number of new cases follows a Poisson distribution with mean \(13\).

Find the probability that a given year has:

  1. Exactly ten new cases.
  2. At least eight new cases.
  3. Between nine and fifteen new cases, inclusive.

The normal distribution

Definition 3.36

For \(\mu\in\mathbb R\) and \(\sigma>0\), \(X\) has the normal distribution, also called the Gaussian distribution, written \(X\sim N(\mu,\sigma^2)\), if its probability density is

\[ f_X(x)=\frac{1}{\sigma\sqrt{2\pi}} \exp\!\left(-\frac12\left(\frac{x-\mu}{\sigma}\right)^2\right). \]

Normal densities with parameters N(0,1), N(2,1), and N(0,4). Changing the mean shifts the curve. A larger variance gives a wider, lower curve.

The parameter \(\mu\) is the mean, and \(\sigma\) is the standard deviation:

\[ \mathbb E(X)=\mu,\qquad \mathbb V(X)=\sigma^2,\qquad \frac{X-\mu}{\sigma}\sim N(0,1). \]

From binomial to normal

Standardized binomial distributions for 4, 16, and 64 trials with p equal to one half. The binomial histograms approach the fixed standard normal density shown as a smooth coral curve. Both axes have the same scales in all panels.
Theorem 3.37 · De Moivre-Laplace

Fix \(0<p<1\). If \(X_d\sim B(d,p)\), then for every \(z\in\mathbb R\),

\[ \lim_{d\to\infty}\mathbb P\!\left(\frac{X_d-dp}{\sqrt{dp(1-p)}}\le z\right) =\int_{-\infty}^z\frac{e^{-t^2/2}}{\sqrt{2\pi}}\,dt. \]

Bars: standardized \(B(d,1/2)\), with height \(\mathbb P(X_d=k)/(2/\sqrt d)\). Each bar’s area is its probability. Curve: the \(N(0,1)\) density. This is a special case of the central limit theorem, which will be stated and proved in Week 3.

Worksheet 2: standardization

Exercise 3.38 · Worksheet 2, Question 4

Let \(X\) denote a person’s weight in kilograms. Assume \(X\sim N(60,12^2)\).

  1. Find \(\mathbb P(X=60)\) and \(\mathbb P(X>70)\).
  2. Find \(\mathbb P(55<X<65)\).
  3. Find the \(0.75\)-quantile of \(X\).

The Gamma distribution

Definition 3.39

For shape \(\kappa>0\) and scale \(\theta>0\),

\[ X\sim\Gamma(\kappa,\theta) \quad\Longleftrightarrow\quad f_X(x)= \frac{x^{\kappa-1}e^{-x/\theta}} {\Gamma(\kappa)\theta^\kappa}\mathbf1_{(0,\infty)}(x). \]

\[ \mathbb E(X)=\kappa\theta,\qquad \mathbb V(X)=\kappa\theta^2. \]

If \(\kappa=m\in\mathbb N\), then \(\Gamma(m,\theta)\) is the distribution of a sum of \(m\) independent \(\operatorname{Exp}(1/\theta)\) variables. In the shape–rate parameterization \(\lambda=1/\theta\).

Moment generating functions

Definition 3.40

For a real random variable \(X\), its moment generating function (MGF) is defined by

\[ M_X(t)=\mathbb E(e^{tX}) \]

for \(t\) such that the expectation is finite.

Theorem 3.41

Let \(X\) be real and \(M_X\) finite on an open interval \(I\) containing \(0\). Then all absolute moments of \(X\) are finite and

\[ M_X^{(k)}(0)=\mathbb E(X^k),\qquad k=1,2,\ldots \]

If a real random variable \(Y\) satisfies \(M_Y(t)=M_X(t)\) for every \(t\in I\), then \(\mathbb P_Y=\mathbb P_X\).

Some distributions, including the Cauchy distribution, have no finite MGF for any \(t\ne0\).

Characteristic functions

Definition 3.42

The characteristic function of a real random variable \(X\) is defined by

\[ \varphi_X(t)=\mathbb E(e^{itX}) =\int_{\mathbb R}e^{itx}\,d\mathbb P_X(x), \qquad t\in\mathbb R. \]

Here \(i^2=-1\). Since \(|e^{itX}|=1\), the expectation exists for every real \(t\). Every characteristic function satisfies

\[ \varphi_X(0)=1,\qquad |\varphi_X(t)|\le1,\qquad \varphi_X(-t)=\overline{\varphi_X(t)}, \]

and is uniformly continuous on \(\mathbb R\).

Affine linear maps and independent sums

Proposition 3.43

For a real random variable \(X\) and \(a,b\in\mathbb R\),

\[ \varphi_{aX+b}(t)=e^{ibt}\varphi_X(at)\qquad(t\in\mathbb R). \]

For independent real random variables \(X_1,\ldots,X_n\),

\[ \varphi_{\sum_{j=1}^nX_j}(t) =\prod_{j=1}^n\varphi_{X_j}(t)\qquad(t\in\mathbb R). \]

Proof. Substitute \(aX+b\) in the definition and factor out \(e^{ibt}\). For the sum, independence gives

\[ \mathbb E\!\left(e^{it\sum_jX_j}\right) =\mathbb E\!\left(\prod_je^{itX_j}\right) =\prod_j\mathbb E(e^{itX_j}). \]

The corresponding MGF identities hold wherever all MGFs involved are finite.

Derivatives of characteristic functions

Proposition 3.44

Let \(k\ge1\) be an integer and \(X\) a real random variable with \(\mathbb E(|X|^k)<\infty\). Then \(\varphi_X\) is \(k\) times continuously differentiable and, for \(1\le j\le k\),

\[ \varphi_X^{(j)}(t) =\mathbb E\!\left((iX)^je^{itX}\right), \qquad t\in\mathbb R. \]

In particular,

\[ \varphi_X^{(j)}(0)=i^j\mathbb E(X^j). \]

Proof. Since \(|(ix)^je^{itx}|=|x|^j\le1+|x|^k\), dominated differentiation under the integral is valid through order \(k\). Lebesgue’s dominated convergence theorem also shows that the derivatives are continuous. Set \(t=0\) for the final identity.

Characteristic functions of common distributions

Distribution \(\varphi_X(t)\)
\(B(n,p)\) \((1-p+pe^{it})^n\)
\(\operatorname{Poisson}(\lambda)\) \(\exp(\lambda(e^{it}-1))\)
\(U(a,b)\) \(\dfrac{e^{itb}-e^{ita}}{it(b-a)}\) for \(t\ne0\). Value \(1\) at \(t=0\)
\(N(\mu,\sigma^2)\) \(\exp(i\mu t-\tfrac12\sigma^2t^2)\)
\(\operatorname{Exp}(\lambda)\) \(\dfrac{\lambda}{\lambda-it}\)
\(\Gamma(\kappa,\theta)\) \((1-i\theta t)^{-\kappa}\)

Uniqueness of characteristic functions

Definition 3.45

Real random variables \(X\) and \(Y\) are said to have the same distribution, written \(X\overset{d}=Y\), if \(\mathbb P_X=\mathbb P_Y\).

Theorem 3.46

For real-valued random variables \(X\) and \(Y\),

\[ X\overset{d}=Y \quad\Longleftrightarrow\quad \varphi_X(t)=\varphi_Y(t) \quad\text{for every }t\in\mathbb R. \]

Together with the product formula, uniqueness identifies distributions of sums without evaluating convolution integrals.

Types of convergence

04 · WEEK 2 · LECTURE 4

Types of convergence: overview

There exist various different senses in which one can say that a sequence of random variables \(X_n\) converges to a random variable \(X\). In this lecture, we are going to learn about the most important types of convergence of random variables.

For real random variables and \(1\le p<\infty\):

Type Notation As \(n\to\infty\) Same probability space?
Almost surely \(X_n\xrightarrow{\mathrm{a.s.}}X\) \(X_n(\omega)\to X(\omega)\) outside a set of probability zero Yes
\(L^\infty\) \(X_n\xrightarrow{L^\infty}X\) \(\|X_n-X\|_\infty\to0\) Yes
In probability \(X_n\overset{\mathbb P}{\rightharpoonup}X\) \(\mathbb P(|X_n-X|>\varepsilon)\to0\) for every \(\varepsilon>0\) Yes
\(L^p\) \(X_n\xrightarrow{L^p}X\) \(\mathbb E(|X_n-X|^p)\to0\) Yes
In distribution \(X_n\xrightarrow{\mathmakebox[1.5em]{d}}X\) \(F_{X_n}(x)\to F_X(x)\) at every continuity point \(x\) of \(F_X\) No

We should therefore not simply say that \(X_n\) converges to \(X\), as that would be ambiguous. It is important to specify the type of convergence.

Almost sure convergence

Definition 4.1

For real random variables \(X,X_1,X_2,\ldots\) on one probability space, we say that \(X_n\) converge almost surely to \(X\), and write \(X_n\xrightarrow{\mathrm{a.s.}}X\), if

\[ \mathbb P\!\left(\{\omega\in\Omega:X_n(\omega)\to X(\omega)\}\right)=1. \]

Definition 4.2

For events \(A_1,A_2,\ldots\), their limit superior is defined by

\[ \limsup_{n\to\infty} A_n=\bigcap_{m=1}^{\infty}\bigcup_{n\ge m}A_n. \]

This is the event that infinitely many of the \(A_n\) occur.

Almost sure convergence: criterion

Proposition 4.3

Let \(X,X_1,X_2,\ldots\) be real random variables on one probability space. Then \(X_n\xrightarrow{\mathrm{a.s.}}X\) if and only if

\[ \mathbb P\!\left(\limsup_{n\to\infty}\bigl(|X_n-X|\bigr)^{-1}((\varepsilon,\infty))\right)=0 \quad\text{for every }\varepsilon>0. \]

Proof of “\(\implies\)”. Suppose \(X_n\xrightarrow{\mathrm{a.s.}}X\). Outside a set \(A\) of probability zero, \(X_n(\omega)\) converges (pointwise) to \(X(\omega)\). For each \(\varepsilon>0\) and \(\omega \in \Omega\setminus A\), there can thus only be finitely many \(n\ge1\) such that \(|X_n(\omega)-X(\omega)| \ge \varepsilon\). Hence, any \(\omega \in \Omega\setminus A\) cannot lie in the limit superior of the sets \(\bigl(|X_n-X|\bigr)^{-1}((\varepsilon,\infty))\). Thus the limit superior is contained in \(A\) and must therefore have probability zero.

Almost sure convergence: converse

Proposition 4.3 · Converse

Assume that, for every \(\varepsilon>0\),

\[ \mathbb P\!\left(\limsup_{n\to\infty}\bigl(|X_n-X|\bigr)^{-1}((\varepsilon,\infty))\right)=0. \]

Then \(X_n\xrightarrow{\mathrm{a.s.}}X\).

Proof. By the assumption and by countable subadditivity,

\[ A:=\bigcup_{m=1}^{\infty}\limsup_{n\to\infty}\bigl(|X_n-X|\bigr)^{-1}((1/m,\infty)) \qquad\text{satisfies }\mathbb P(A)=0. \]

For \(\omega\notin A\) and every \(m\), \(|X_n(\omega)-X(\omega)|\le1/m\) holds for all large enough \(n\). Hence \(X_n(\omega)\) converges pointwise to \(X(\omega)\) for \(\omega\notin A\), proving \(X_n\xrightarrow{\mathrm{a.s.}}X\).

The space \(L^\infty(\mathbb P)\)

Definition 4.4

For a real random variable \(X\) on \((\Omega,\mathcal F,\mathbb P)\), define

\[ \|X\|_\infty :=\operatorname*{ess\,sup}|X| :=\inf\{a\in[0,\infty):\mathbb P(|X|>a)=0\}, \]

with \(\inf\varnothing:=\infty\). The variable \(X\) is called essentially bounded if \(\|X\|_\infty<\infty\).

The space of essentially bounded random variables is denoted by

\[ L^\infty(\mathbb P):=\{X:\|X\|_\infty<\infty\}. \]

As in \(L^p(\mathbb P)\), variables equal almost surely are identified. On these equivalence classes, \(\|\cdot\|_\infty\) is called the essential supremum norm.

\(L^\infty\) convergence

Definition 4.5

For \(X,X_1,X_2,\ldots\in L^\infty(\mathbb P)\), we say that \(X_n\) converges in \(L^\infty\) to \(X\), and write \(X_n\xrightarrow{L^\infty}X\), if

\[ \|X_n-X\|_\infty\to0. \]

Proposition 4.6

For \(X,X_1,X_2,\ldots\in L^\infty(\mathbb P)\),

\[ X_n\xrightarrow{L^\infty}X \quad\Longrightarrow\quad X_n\xrightarrow{\mathrm{a.s.}}X. \]

Proof. For each \(n\), choose a set \(A_n\) of probability zero outside which \(|X_n-X|\le\|X_n-X\|_\infty\). The union \(A=\bigcup_{n\ge1}A_n\) has probability zero.

For \(\omega\notin A\), we have \(|X_n(\omega)-X(\omega)|\le\|X_n-X\|_\infty\to0\), proving \(X_n\xrightarrow{\mathrm{a.s.}}X\).

Convergence in probability

Definition 4.7

For real random variables \(X,X_1,X_2,\ldots\) on one probability space, we say that \(X_n\) converges in probability to \(X\), and write \(X_n\overset{\mathbb P}{\rightharpoonup}X\), if

\[ \mathbb P(|X_n-X|>\varepsilon)\to0 \quad\text{for every }\varepsilon>0. \]

Proposition 4.8

If real random variables \(X_n\) converge to \(X\) almost surely on a common probability space, then \(X_n\overset{\mathbb P}{\rightharpoonup}X\).

Proof. For fixed \(\varepsilon>0\), the indicators \(\mathbf1_{(\varepsilon,\infty)}(|X_n-X|)\) converge to zero almost surely and are bounded by \(1\). Applying Lebesgue’s dominated convergence theorem, we see

\[ \mathbb P(|X_n-X|>\varepsilon) =\mathbb E\!\left(\mathbf1_{(\varepsilon,\infty)}(|X_n-X|)\right)\to0. \]

Convergence in \(L^p\)

Definition 4.9

Let \(1\le p<\infty\) and \(X,X_1,X_2,\ldots\in L^p(\mathbb P)\). We say that \(X_n\) converges in \(L^p\) to \(X\), and write \(X_n\xrightarrow{L^p}X\), if

\[ \|X_n-X\|_p =(\mathbb E(|X_n-X|^p))^{1/p}\to0. \]

If \(q>p\ge1\), then on a probability space

\[ \|Y\|_p\le\|Y\|_q. \]

Consequently,

\[ L^\infty\text{ convergence}\Rightarrow L^q\text{ convergence} \Rightarrow L^p\text{ convergence}. \]

Markov’s inequality

Proposition 4.10 · Markov's inequality

Let \(Z\) be a nonnegative random variable and let \(f:[0,\infty)\to[0,\infty)\) be nondecreasing, with \(\mathbb E(f(Z))<\infty\). For every \(\varepsilon>0\) such that \(f(\varepsilon)>0\),

\[ \mathbb P(Z\ge\varepsilon)\le\frac{\mathbb E(f(Z))}{f(\varepsilon)}. \]

In particular, this applies to \(f(t) = t\) and \(f(t) = t^2\).

Proof. The pointwise inequality \(f(\varepsilon)\mathbf1_{[\varepsilon,\infty)}(Z)\le f(Z)\) and monotonicity of expectation give

\[ f(\varepsilon)\,\mathbb P(Z\ge\varepsilon) =\mathbb E(f(\varepsilon)\mathbf1_{[\varepsilon,\infty)}(Z)) \le\mathbb E(f(Z)). \]

Now, divide by \(f(\varepsilon)>0\).

For \(f(t)=t\), this gives \(\mathbb P(Z\ge\varepsilon)\le\mathbb E(Z)/\varepsilon\).

Chebyshev’s inequality

Proposition 4.11 · Chebyshev's inequality

Let \(X\in L^2(\mathbb P)\). For every \(\varepsilon>0\),

\[ \mathbb P\!\left(|X-\mathbb E(X)|\ge\varepsilon\right) \le\frac{\mathbb V(X)}{\varepsilon^2}. \]

Proof. Apply Proposition 4.10 to \(Z=|X-\mathbb E(X)|\), with \(f(t)=t^2\):

\[ \mathbb P\!\left(|X-\mathbb E(X)|\ge\varepsilon\right) \le\frac{\mathbb E(|X-\mathbb E(X)|^2)}{\varepsilon^2} =\frac{\mathbb V(X)}{\varepsilon^2}. \]

\(L^p\) and probability convergence

Proposition 4.12

Let \(1\le p<\infty\) and \(X,X_1,X_2,\ldots\in L^p(\mathbb P)\). Then

\[ X_n\xrightarrow{L^p}X \quad\Longrightarrow\quad X_n\overset{\mathbb P}{\rightharpoonup}X. \]

Proof. For every \(\varepsilon>0\), apply Proposition 4.10 with \(Z=|X_n-X|\) and \(f(t)=t^p\):

\[ \begin{aligned} \mathbb P(|X_n-X|>\varepsilon) &\le\frac{\mathbb E(f(|X_n-X|))}{f(\varepsilon)}\\ &=\frac{\mathbb E(|X_n-X|^p)}{\varepsilon^p}\longrightarrow0. \end{aligned} \]

Under \(L^p\) convergence the numerator tends to zero, proving convergence in probability.

The typewriter sequence

Example 4.13

Take \(\Omega=[0,1)\), \(\mathcal F=\mathcal B([0,1))\), and let \(\mathbb P\) be the Lebesgue measure. For integers \(m\ge0\) and \(k=0,\ldots,2^m-1\), put

\[ I_{m,k}:=[k2^{-m},(k+1)2^{-m}), \qquad X_{m,k}:=\mathbf1_{I_{m,k}}. \]

List all variables row by row, from left to right, to define the sequence

\[ (Y_n)_{n\ge1}:=(X_{0,0},X_{1,0},X_{1,1},X_{2,0},\ldots). \]

Rows m=0,1,2,3 split the interval from zero to one into one interval, two halves, four quarters, and eight eighths. Read each row from left to right. Each point belongs to exactly one interval in each row.

Typewriter: \(L_p\) convergence without almost sure convergence

Proposition 4.14

The sequence \((Y_n)_{n\ge1}\) in Example 4.13 converges to \(0\) in \(L^p\) for every \(1\le p<\infty\) and in probability, but does not converge almost surely.

Proof. If \(Y_n=X_{m,k}\), then \(\|Y_n\|_p^p=\int_\Omega\mathbf1_{I_{m,k}}\,d\mathbb P=2^{-m}\).

Each row is finite, so \(m\to\infty\) as \(n\to\infty\). Hence \(\|Y_n\|_p\to0\). Convergence in probability follows from Proposition 4.12.

Fix \(\omega\in\Omega\). In every row \(m\ge1\), exactly one indicator equals \(1\) at \(\omega\), and the others equal \(0\). Let \(n_m(\omega)\) and \(r_m(\omega)\) be the indices in \((Y_n)\) of this \(1\) and the first \(0\) in that row. Both index sequences are strictly increasing, and

\[ Y_{n_m(\omega)}(\omega)=1,\qquad Y_{r_m(\omega)}(\omega)=0 \qquad(m\ge1). \]

Thus \((Y_n(\omega))\) does not converge for any \(\omega\in\Omega\).

Almost sure convergence without \(L^1\) convergence

Example 4.15

Let \(U\sim U(0,1)\) and

\[ X_n=n\,\mathbf1_{(0,1/n]}(U). \]

For every \(\omega\) with \(U(\omega)>0\), \(X_n(\omega)=0\) for all sufficiently large \(n\). Since \(\mathbb P(U>0)=1\),

\[ X_n\xrightarrow{\mathrm{a.s.}}0. \]

But

\[ \mathbb E(|X_n|)=n\mathbb P(0<U\le1/n)=1, \]

so \(X_n\) does not converge to \(0\) in \(L^1\).

Graphs of u mapped to n times the indicator of (0,1/n] for n=2,4,8, on common axes. The heights increase while the widths decrease. Each shaded rectangle has area one.

Dominated convergence in \(L^p\)

Theorem 4.16

Let \(1\le p<\infty\) and let \(X,X_1,X_2,\ldots,Y\) be real random variables on one probability space, with \(Y\ge0\). Suppose \(X_n\overset{\mathbb P}{\rightharpoonup}X\) and

\[ |X_n|\le Y\quad\text{a.s. for every }n, \qquad Y\in L^p(\mathbb P). \]

Then \(X\in L^p(\mathbb P)\) and \(X_n\xrightarrow{L^p}X\).

Proof. Not examinable Step 1) For every \(\varepsilon>0\), the triangle inequality and \(|X_n|\le Y\) almost surely give

\[ \mathbb P(|X|>Y+\varepsilon) \le\mathbb P(|X-X_n|>\varepsilon)\longrightarrow0. \]

The probability on the left does not depend on \(n\), so it is zero. Taking \(\varepsilon=1/m\) for \(m=1,2,\ldots\) and using countable subadditivity gives \(|X|\le Y\) almost surely.

Thus \(\mathbb E(|X|^p)\le\mathbb E(Y^p)<\infty\), so \(X\in L^p(\mathbb P)\).

Dominated convergence: the \(L^p\) limit

Proof of Theorem 4.16. Not examinable Step 2) Put \(Z_n:=|X_n-X|^p\) and \(Z:=(2Y)^p\). Step 1 gives \(0\le Z_n\le Z\) almost surely, with \(\mathbb E(Z)<\infty\).

Fix \(\delta,M>0\). On \(Z\le M\), use \(Z_n\le\delta+M\mathbf1_{(\delta,\infty)}(Z_n)\). On \(Z>M\), use \(Z_n\le Z\). Taking expectations gives

\[ \mathbb E(Z_n)\le\delta+M\,\mathbb P(Z_n>\delta) +\mathbb E\!\left(Z\mathbf1_{(M,\infty)}(Z)\right). \]

By convergence in probability,

\[ \mathbb P(Z_n>\delta) =\mathbb P(|X_n-X|>\delta^{1/p})\longrightarrow0. \]

First take the limit superior as \(n\to\infty\). Then let \(M\to\infty\): the last expectation tends to zero by Lebesgue’s dominated convergence theorem. This yields \(\limsup_{n\to\infty}\mathbb E(Z_n)\le\delta\).

Since \(\delta>0\) is arbitrary, \(\mathbb E(|X_n-X|^p)\to0\), as required.

Weak convergence

Let \(S\) be a metric space and let \(C_b(S)\) denote the space of bounded continuous functions \(f\colon S\to \mathbb R\).

Definition 4.17

We say that probability measures \(\mathbb P_n\) on \((S,\mathcal B(S))\) converge weakly to \(\mathbb P\), and write \(\mathbb P_n\rightharpoonup \mathbb P,\) if

\[ \int_Sg\,d\mathbb P_n\longrightarrow\int_Sg\,d\mathbb P \qquad\text{for every }g\in C_b(S). \]

For random elements, we say that \(X_n\) converges in distribution to \(X\), and write \(X_n\xrightarrow{\mathmakebox[1.5em]{d}}X,\) if \(\mathbb P_{X_n}\rightharpoonup \mathbb P_X\).

The random variables may be defined on different probability spaces.

Uniform continuity and continuity sets

Definition 4.18

A function \(g:S\to\mathbb R\) on a metric space \((S,d)\) is called uniformly continuous if, for every \(\varepsilon>0\), there exists \(\delta>0\) such that

\[ d(x,y)<\delta\quad\Longrightarrow\quad |g(x)-g(y)|<\varepsilon \qquad(x,y\in S). \]

Definition 4.19

Write \(A^\circ\) for the interior of \(A\), \(\overline A\) for its closure, and \(\partial A:=\overline A\setminus A^\circ\) for its boundary.

For a Borel probability measure \(\mathbb P\) on \(S\), a Borel set \(A\subseteq S\) is called a \(\mathbb P\)-continuity set if \(\mathbb P(\partial A)=0\).

The Portmanteau theorem

Theorem 4.20

For Borel probability measures \(\mathbb P,\mathbb P_1,\mathbb P_2,\ldots\) on a metric space \(S\), the following conditions are equivalent:

  1. \(\mathbb P_n\rightharpoonup\mathbb P\).
  2. \(\int_Sg\,d\mathbb P_n\to\int_Sg\,d\mathbb P\) for every bounded uniformly continuous \(g:S\to\mathbb R\).
  3. \(\limsup_{n\to\infty}\mathbb P_n(F)\le\mathbb P(F)\) for every closed set \(F\).
  4. \(\liminf_{n\to\infty}\mathbb P_n(G)\ge\mathbb P(G)\) for every open set \(G\).
  5. \(\mathbb P_n(A)\to\mathbb P(A)\) for every \(\mathbb P\)-continuity set \(A\).

Portmanteau: closed sets

Proof of Theorem 4.20, (1) implies (2) implies (3). Not examinable The first implication follows because uniform continuity is more special than just continuity.

For a nonempty closed set \(F\subseteq S\) and integers \(m\ge1\), put

\[ d(x,F):=\inf_{y\in F}d(x,y),\qquad g_m(x):=\max\{1-m\,d(x,F),0\}. \]

Then \(|g_m(x)-g_m(y)|\le m\,d(x,y)\), so \(g_m\) is uniformly continuous. Also \(0\le g_m\le1\) and \(g_m\searrow\mathbf1_F\), since \(F\) is closed. By (2),

\[ \limsup_{n\to\infty}\mathbb P_n(F) \le\lim_{n\to\infty}\int_Sg_m\,d\mathbb P_n =\int_Sg_m\,d\mathbb P. \]

Let \(m\to\infty\). Lebesgue’s dominated convergence theorem makes the last integral tend to \(\mathbb P(F)\). For \(F=\varnothing\), the inequality is immediate.

Portmanteau: open and continuity sets

Proof of Theorem 4.20, (3) and (4) are equivalent. Not examinable If \(G\) is open, then \(G^c\) is closed, so (3) gives

\[ \liminf_{n\to\infty}\mathbb P_n(G) =1-\limsup_{n\to\infty}\mathbb P_n(G^c) \ge1-\mathbb P(G^c)=\mathbb P(G). \]

The same calculation with complements proves the reverse implication.

These conditions imply (5). For a Borel set \(A\), use \(A^\circ\subseteq A\subseteq\overline A\) to obtain

\[ \mathbb P(A^\circ) \le\liminf_{n\to\infty}\mathbb P_n(A) \le\limsup_{n\to\infty}\mathbb P_n(A) \le\mathbb P(\overline A). \]

If \(\mathbb P(\partial A)=0\), both outer terms equal \(\mathbb P(A)\). Hence \(\mathbb P_n(A)\to\mathbb P(A)\).

Portmanteau: level sets

Proof of Theorem 4.20, (5) implies (1). Not examinable Assume (5). Fix a continuous function \(h:S\to[0,1]\) and, for \(0<t<1\), define

\[ A_t:=h^{-1}((t,\infty)). \]

By continuity, a point with \(h(x)>t\) has a neighbourhood inside \(A_t\), while a point with \(h(x)<t\) has a neighbourhood outside \(A_t\). Thus

\[ \partial A_t\subseteq h^{-1}(\{t\}). \]

By Proposition 1.22, the distribution of \(h\) under \(\mathbb P\) has at most countably many atoms. For all other \(t\), \(\mathbb P(\partial A_t)=0\), so (5) gives

\[ \mathbb P_n(A_t)\longrightarrow\mathbb P(A_t). \]

Portmanteau: integrals of continuous functions

Proof of Theorem 4.20, conclusion. Not examinable With \(h\) and \(A_t\) as above, the tail integral formula Proposition 3.20 gives

\[ \int_Sh\,d\mathbb P_n=\int_0^1\mathbb P_n(A_t)\,dt \longrightarrow\int_0^1\mathbb P(A_t)\,dt=\int_Sh\,d\mathbb P. \]

The limit follows from Lebesgue’s dominated convergence theorem: the integrands lie in \([0,1]\) and converge outside a countable set, which has Lebesgue measure zero.

For general \(g\in C_b(S)\), choose \(M>0\) with \(|g|\le M\) and put \(h=(g+M)/(2M)\). Then \(h:S\to[0,1]\) is continuous and

\[ \int_Sg\,d\mathbb P_n=2M\int_Sh\,d\mathbb P_n-M \longrightarrow2M\int_Sh\,d\mathbb P-M=\int_Sg\,d\mathbb P. \]

This is weak convergence, completing all the equivalences.

Convergence in distribution: the CDF criterion

Theorem 4.21

Let \(X,X_1,X_2,\ldots\) be real random variables with CDFs \(F,F_1,F_2,\ldots\). Then

\[ X_n\xrightarrow{\mathmakebox[1.5em]{d}}X \quad\Longleftrightarrow\quad F_n(x)\to F(x) \]

for every continuity point \(x\) of \(F\).

At a jump of \(F\), convergence of \(F_n(x)\) is not required.

Proof, forward implication. Suppose \(X_n\xrightarrow{\mathmakebox[1.5em]{d}}X\) and \(F\) is continuous at \(x\). By Proposition 1.18,

\[ \mathbb P_X(\partial(-\infty,x]) =\mathbb P_X(\{x\})=F(x)-F(x^-)=0. \]

Condition (5) in Theorem 4.20 gives \(F_n(x)=\mathbb P_{X_n}((-\infty,x])\to\mathbb P_X((-\infty,x])=F(x)\).

The CDF criterion: intervals

Proof of Theorem 4.21, converse. Assume \(F_n(x)\to F(x)\) at every continuity point of \(F\).

By Proposition 1.22, the discontinuities of \(F\) are countable. Choose a continuity point in each nonempty open interval with rational endpoints. Their set \(D\) is countable and dense in \(\mathbb R\).

For \(a,b\in D\) with \(a<b\),

\[ \begin{aligned} \mathbb P_{X_n}((a,b]) &=F_n(b)-F_n(a)\\ &\longrightarrow F(b)-F(a)=\mathbb P_X((a,b]). \end{aligned} \]

The same convergence holds for every finite union of such intervals. To see this, rewrite it as a disjoint union of finitely many half-open intervals with endpoints in \(D\), and use finite additivity.

Remark. Every open \(G\subseteq\mathbb R\) is a countable union of such intervals. Approximating by increasing finite unions gives \(\liminf_{n\to\infty}\mathbb P_{X_n}(G)\ge\mathbb P_X(G)\), so Theorem 4.20 yields \(X_n\xrightarrow{\mathmakebox[1.5em]{d}}X\).

A set with positive boundary probability

Example 4.22

Let \(X_n\equiv1/n\) and \(X\equiv0\). For every bounded continuous \(g\),

\[ \mathbb E(g(X_n))=g(1/n)\to g(0)=\mathbb E(g(X)), \]

so \(X_n\xrightarrow{\mathmakebox[1.5em]{d}}X\).

For \(A=\{0\}\), however,

\[ \mathbb P(X_n\in A)=0 \quad\text{but}\quad \mathbb P(X\in A)=1. \]

There is no contradiction: \(0\in\partial A\), so \(\mathbb P(X\in\partial A)=1\).

Probability and distributional convergence

Proposition 4.23

Let \(X,X_1,X_2,\ldots\) be real random variables on one probability space. Then

\[ X_n\overset{\mathbb P}{\rightharpoonup}X \quad\Longrightarrow\quad X_n\xrightarrow{\mathmakebox[1.5em]{d}}X. \] For a constant \(c\in\mathbb R\), the converse also holds:

\[ X_n\xrightarrow{\mathmakebox[1.5em]{d}}c \quad\Longleftrightarrow\quad X_n\overset{\mathbb P}{\rightharpoonup}c. \]

Equal distributions without probability convergence

Example 4.24

Let \(X,X_1,X_2,\ldots\) be independent Rademacher variables:

\[ \mathbb P(X_j=-1)=\mathbb P(X_j=1)=\frac12. \]

\[ \begin{aligned} X_n&\overset{d}=X &&\text{for every }n,\\ \mathbb P(|X_n-X|>1)&=\mathbb P(X_n\ne X)=\frac12 &&\text{for every }n. \end{aligned} \]

Thus \(X_n\xrightarrow{\mathmakebox[1.5em]{d}}X\) but \(X_n\overset{\mathbb P}{\not\rightharpoonup}X\).

Lévy’s continuity theorem

Theorem 4.25

Let \(X_1,X_2,\ldots\) be real random variables with characteristic functions \(\varphi_1,\varphi_2,\ldots\). If

\[ \varphi_n(t)\to\varphi(t)\qquad\text{for every }t\in\mathbb R \]

and \(\varphi\) is continuous at \(0\), then \(\varphi\) is the characteristic function of some distribution \(\mathbb P\), and

\[ \mathbb P_{X_n}\rightharpoonup \mathbb P. \]

Conversely, \(X_n\xrightarrow{\mathmakebox[1.5em]{d}}X\) implies \(\varphi_n(t)\to\varphi_X(t)\) for every \(t\).

Continuous mapping theorem

Theorem 4.26

Let \(S,T\) be metric spaces, \(X,X_1,X_2,\ldots\) random elements in \(S\), and \(g:S\to T\) measurable. Let \(D_g\) be its set of discontinuity points. If

\[ X_n\xrightarrow{\mathmakebox[1.5em]{d}}X \qquad\text{and}\qquad \mathbb P(X\in D_g)=0, \]

then

\[ g(X_n)\xrightarrow{\mathmakebox[1.5em]{d}}g(X). \]

For almost sure or probability convergence, the analogous conclusion holds when \(g\) is continuous at \(X\) almost surely.

The implication structure

Valid implications among almost sure, L infinity, L q, L p, probability, and distributional convergence.

The arrows \(L^q\Rightarrow L^p\) assume \(q>p\ge1\) and \(\mathbb P(\Omega)=1\).

Reverse implications: counterexamples and conditions

Invalid converse Counterexample Sufficient additional condition
\(L^p\not\Rightarrow\) almost surely Typewriter sequence. Proposition 4.14 —
Almost surely \(\not\Rightarrow L^1\) Spike sequence. Example 4.15 An integrable dominating variable. Theorem 4.16 with \(p=1\)
In distribution \(\not\Rightarrow\) in probability Independent copies. Example 4.24 A constant limit. Proposition 4.23

An initial draft of these slides was prepared with the help of AI coding agents.