Measurable Function
1 Measurable Functions
Measurable functions are the structure-preserving maps of measure theory, in the same way that continuous functions are the structure-preserving maps of Topology and linear maps are those of Linear Algebra. They are the functions we are able to integrate (see Lebesgue Integral), and in probability theory they are the random variables.
The central idea is that a measure assigns a size or a probability to subsets, not to points, and only to subsets in a chosen [[sigma-algebra|\(\sigma\)-algebra]]. A function \(f\) transports the question “how large is \(A\)?” about a set \(A\) in its codomain into the question “how large is \(f^{-1}(A)\)?” about a set in its domain. This only makes sense when \(f^{-1}(A)\) is itself in the \(\sigma\)-algebra of the domain.
2 Definition
Let \((X,\mathcal{F})\) and \((Y,\mathcal{G})\) be measurable spaces. A function \(f:X\to Y\) is \((\mathcal{F},\mathcal{G})\)-measurable if
\[ f^{-1}(B) := \{x\in X : f(x)\in B\} \in \mathcal{F} \qquad\text{for all } B\in\mathcal{G}. \]
When the \(\sigma\)-algebras are clear we simply say that \(f\) is measurable, or \(\mathcal{F}\)-measurable. If the codomain is \(\mathbb{R}\) (or \(\mathbb{R}^n\)), it carries the [[borel-sigma-algebra|Borel \(\sigma\)-algebra]] \(\mathcal{B}_{\mathbb{R}}\) by default, so that a function \(f:X\to\mathbb{R}\) is \(\mathcal{F}\)-measurable if \(f^{-1}(B)\in\mathcal{F}\) for every Borel set \(B\subseteq\mathbb{R}\).
The definition is the exact analogue of continuity, with \(\sigma\)-algebras in place of topologies: a function is continuous if preimages of open sets are open, and measurable if preimages of measurable sets are measurable.
Two special cases of this definition appear often.
- If \(X\) and \(Y\) are topological spaces, \(f\) is Borel measurable if it is \((\mathcal{B}_X,\mathcal{B}_Y)\)-measurable.
- A function \(f:\mathbb{R}\to\mathbb{R}\) is Lebesgue measurable if it is \((\mathcal{F}_{\lambda},\mathcal{B}_{\mathbb{R}})\)-measurable, where \(\mathcal{F}_{\lambda}\) is the \(\sigma\)-algebra of Lebesgue measurable sets. Since \(\mathcal{B}_{\mathbb{R}}\subsetneq\mathcal{F}_{\lambda}\), every Borel measurable function is Lebesgue measurable, but not conversely.
2.1 Pushforward Measures
If \(f:(X,\mathcal{F},\mu)\to(Y,\mathcal{G})\) is measurable, then \(\mu\circ f^{-1}\) is well defined on \(\mathcal{G}\), and is a measure on \(Y\) called the pushforward (or image) measure,
\[ (f_*\mu)(B) = \mu\left(f^{-1}(B)\right), \qquad B\in\mathcal{G}. \]
Measurability is exactly the condition that makes this transport possible. For example, let \(\Omega=\{1,\dots,6\}\) be the outcomes of a die and let \(f(\omega)=+10\) if \(\omega\) is odd and \(-10\) if \(\omega\) is even, the payoff of a bet. Then \(f_*\mathbb{P}(\{10\})=\mathbb{P}(f^{-1}(10))=\mathbb{P}(\{1,3,5\})\), and the probability of losing money is \(\mathbb{P}(f^{-1}((-\infty,0)))\).
3 Random Variables
Let \((\Omega,\mathcal{F},\mathbb{P})\) be a probability space.
A random variable is an \(\mathcal{F}\)-measurable function \(X:\Omega\to\mathbb{R}\) (or \(\mathbb{R}^n\), in which case \(X\) is a random vector).
See Random Variables and Distribution Functions. Measurability is what allows us to speak of the probability of events defined by \(X\): the set \(\{X\le x\}=X^{-1}((-\infty,x])\) is in \(\mathcal{F}\) for every \(x\), so \(\mathbb{P}(X\le x)\) is defined. The pushforward measure of \(\mathbb{P}\) is the distribution (or law) of \(X\),
\[ \mu_X(B) = \mathbb{P}(X\in B) = \mathbb{P}\left(X^{-1}(B)\right), \qquad B\in\mathcal{B}_{\mathbb{R}}. \]
Further connections with probability theory:
- Generated \(\sigma\)-algebra. The collection \(\sigma(X)=\{X^{-1}(B):B\in\mathcal{B}_{\mathbb{R}}\}\) is the smallest \(\sigma\)-algebra on \(\Omega\) for which \(X\) is measurable, and records the information in \(X\) (see Generated Sigma Algebra). A random variable \(X\) is \(\mathcal{G}\)-measurable if and only if \(\sigma(X)\subseteq\mathcal{G}\).
- Functions of random variables. If \(X\) is a random variable and \(g\) is Borel measurable, then \(g(X)\) is a random variable, by the composition result below. This includes all continuous \(g\).
- Doob-Dynkin lemma. A random variable \(Y\) is \(\sigma(X)\)-measurable if and only if \(Y=g(X)\) for some Borel measurable function \(g\). This says that the information in \(X\) determines exactly the functions of \(X\).
- Expectation. The expectation of \(X\) is the Lebesgue integral \(\mathbb{E}[X]=\int_\Omega X\,d\mathbb{P}\), which is defined for measurable functions, and satisfies \(\mathbb{E}[g(X)]=\int g\,d\mu_X\).
- Stochastic processes. A process \((X_t)\) is adapted to a filtration \((\mathcal{F}_t)\) if each \(X_t\) is \(\mathcal{F}_t\)-measurable (see Filtrations and Adapted Processes), and a conditional expectation \(\mathbb{E}[X\mid\mathcal{G}]\) is by definition \(\mathcal{G}\)-measurable (see Conditional Expectation).
4 Equivalent Conditions
It is enough to check measurability on a family that generates the \(\sigma\)-algebra of the codomain.
Let \((X,\mathcal{F})\) and \((Y,\mathcal{G})\) be measurable spaces, where \(\mathcal{G}=\sigma(\mathcal{E})\) is generated by a collection \(\mathcal{E}\). Then \(f:X\to Y\) is \((\mathcal{F},\mathcal{G})\)-measurable if and only if \(f^{-1}(E)\in\mathcal{F}\) for all \(E\in\mathcal{E}\).
Proof. The only if direction is immediate since \(\mathcal{E}\subseteq\mathcal{G}\). For the converse, the collection \[ \mathcal{A}=\{B\subseteq Y : f^{-1}(B)\in\mathcal{F}\} \] is a \(\sigma\)-algebra, because preimages commute with complements and countable unions, and \(\mathcal{F}\) is closed under both. It contains \(\mathcal{E}\) by assumption, so it contains \(\sigma(\mathcal{E})=\mathcal{G}\).
For real-valued functions this gives several equivalent conditions.
For a measurable space \((X,\mathcal{F})\) and a function \(f:X\to\mathbb{R}\) the following are equivalent:
- \(f\) is \(\mathcal{F}\)-measurable;
- \(f^{-1}((a,\infty))\in\mathcal{F}\) for all \(a\in\mathbb{R}\);
- \(f^{-1}([a,\infty))\in\mathcal{F}\) for all \(a\in\mathbb{R}\);
- \(f^{-1}((-\infty,a))\in\mathcal{F}\) for all \(a\in\mathbb{R}\);
- \(f^{-1}((-\infty,a])\in\mathcal{F}\) for all \(a\in\mathbb{R}\).
Proof. Condition 1 implies each of 2 to 5, since rays are Borel sets. Conversely, the open rays \((a,\infty)\) generate \(\mathcal{B}_{\mathbb{R}}\): from them we get \((-\infty,b]=(b,\infty)^c\), then \((a,b]=(a,\infty)\cap(-\infty,b]\) and \((a,b)=\bigcup_n(a,b-\tfrac1n]\), and every open set is a countable union of open intervals. The same holds for the other three families, since each is obtained from another by complements or countable intersections and unions, for example \([a,\infty)=\bigcap_n(a-\tfrac1n,\infty)\). The result follows from the generating sets theorem.
The same conditions characterize measurability of functions into the extended reals \([-\infty,\infty]\), which is needed for suprema and limits. A function \(f=(f_1,\dots,f_n):X\to\mathbb{R}^n\) is measurable if and only if each component \(f_i\) is, since \(\mathcal{B}_{\mathbb{R}^n}\) is the [[product-sigma-algebra|product \(\sigma\)-algebra]] of \(n\) copies of \(\mathcal{B}_{\mathbb{R}}\).
5 Important Results
If \(f:(X,\mathcal{F})\to(Y,\mathcal{G})\) and \(g:(Y,\mathcal{G})\to(Z,\mathcal{H})\) are measurable, then \(g\circ f\) is \((\mathcal{F},\mathcal{H})\)-measurable.
Proof. For \(C\in\mathcal{H}\), \((g\circ f)^{-1}(C)=f^{-1}(g^{-1}(C))\). Here \(g^{-1}(C)\in\mathcal{G}\) and so \(f^{-1}(g^{-1}(C))\in\mathcal{F}\).
Every continuous function \(f:X\to Y\) between topological spaces is Borel measurable.
Proof. By the generating sets theorem it suffices to check the open sets, which generate \(\mathcal{B}_Y\). If \(U\subseteq Y\) is open then \(f^{-1}(U)\) is open by continuity, hence in \(\mathcal{B}_X\).
If \(f,g:X\to\mathbb{R}\) are \(\mathcal{F}\)-measurable and \(c\in\mathbb{R}\), then \(cf\), \(f+g\), \(fg\), \(|f|\), \(\max(f,g)\) and \(\min(f,g)\) are measurable. If \(g\neq0\), then \(f/g\) is measurable.
Proof. For the sum, note that \(f(x)+g(x)>a\) if and only if there is a rational \(q\) with \(f(x)>q\) and \(g(x)>a-q\), so \[ \{f+g>a\} = \bigcup_{q\in\mathbb{Q}}\{f>q\}\cap\{g>a-q\}\in\mathcal{F}. \] The remaining cases follow from the composition theorem, since \(f\mapsto cf\) and \(f\mapsto|f|\) are continuous, and from \(fg=\tfrac14\left((f+g)^2-(f-g)^2\right)\) and \(\max(f,g)=\tfrac12\left(f+g+|f-g|\right)\).
If \(f_n:X\to[-\infty,\infty]\) are \(\mathcal{F}\)-measurable, \(n\ge1\), then \(\sup_nf_n\), \(\inf_nf_n\), \(\limsup_nf_n\) and \(\liminf_nf_n\) are measurable. In particular, if \(f_n\to f\) pointwise, then \(f\) is measurable.
Proof. We have \(\{\sup_nf_n>a\}=\bigcup_n\{f_n>a\}\in\mathcal{F}\), so the supremum is measurable, and \(\inf_nf_n=-\sup_n(-f_n)\). Then \(\limsup_nf_n=\inf_{k}\sup_{n\ge k}f_n\) and \(\liminf_nf_n=\sup_{k}\inf_{n\ge k}f_n\) are measurable, and when the limit exists it equals the \(\limsup\).
The last result is a key difference from continuity: pointwise limits of continuous functions need not be continuous, but pointwise limits of measurable functions are always measurable.
A simple function is a measurable function taking finitely many values. Every measurable \(f:X\to[0,\infty]\) is the pointwise limit of an increasing sequence of non-negative simple functions \(0\le s_1\le s_2\le\dots\). If \(f\) is bounded the convergence is uniform. Every measurable real function is a difference of two such limits, \(f=f^+-f^-\).
Proof. Define
\[ s_n = \sum_{k=0}^{n2^n-1}\frac{k}{2^n}\, \mathbf{1}_{\{k2^{-n}\le f<(k+1)2^{-n}\}} + n\,\mathbf{1}_{\{f\ge n\}}. \]
Each set in the sum is the preimage of an interval, so it is in \(\mathcal{F}\) and \(s_n\) is simple. Refining the grid from \(n\) to \(n+1\) rounds \(f\) down to a finer level, so \(s_n\le s_{n+1}\le f\), and \(f-s_n\le2^{-n}\) wherever \(f<n\), which gives \(s_n\uparrow f\).
This result is how the Lebesgue Integral is constructed: the integral is defined first for simple functions (see Calculus of Simple Functions) and then extended to measurable functions by this approximation and the Monotone Convergence Theorem.
6 Examples
Constant functions are measurable for every \(\sigma\)-algebra, since \(f^{-1}(B)\) is either \(\emptyset\) or \(X\).
Indicator functions. For \(A\subseteq X\), the indicator \(\mathbf{1}_A\) is \(\mathcal{F}\)-measurable if and only if \(A\in\mathcal{F}\), because \(\mathbf{1}_A^{-1}(B)\) is one of \(\emptyset\), \(A\), \(A^c\) or \(X\). Simple functions are finite linear combinations of indicators.
Extreme choices of \(\sigma\)-algebra. If \(\mathcal{F}=\{\emptyset,X\}\) is the trivial \(\sigma\)-algebra, the only measurable real functions are the constants. If \(\mathcal{F}=2^X\) is the power set, every function is measurable. This is why every function on a finite probability space with the power set is a random variable.
A function that is not measurable. On \(\Omega=\{1,\dots,6\}\) with \(\mathcal{F}=\{\emptyset,\{1,3,5\},\{2,4,6\},\Omega\}\) (we can only observe whether the roll is odd or even), the function \(X(\omega)=\omega\) is not \(\mathcal{F}\)-measurable, since \(X^{-1}(\{1\})=\{1\}\notin\mathcal{F}\). The parity \(\mathbf{1}_{\{\text{odd}\}}\) is measurable.
Continuous functions such as \(f(x)=x^2\) and \(f(x)=e^x\) are Borel measurable, and so are all polynomials and \(\sin\), \(\cos\), by the continuity theorem above.
Monotone functions. If \(f:\mathbb{R}\to\mathbb{R}\) is non-decreasing then \(\{f>a\}\) is an interval for every \(a\), so \(f\) is Borel measurable even if it has countably many jumps, such as the floor function.
The Dirichlet function \(\mathbf{1}_{\mathbb{Q}}\) is nowhere continuous, but is Borel measurable because \(\mathbb{Q}\) is a countable union of points and hence Borel. It is the pointwise limit \(\lim_m\lim_n\cos^{2n}(m!\pi x)\) of continuous functions.
Non-measurable functions exist but need the axiom of choice. If \(V\subset[0,1]\) is a Vitali set, then \(\mathbf{1}_V\) is not Lebesgue measurable. See Vitalli Non-Measurability Theorem.
Stock prices. If \((\Omega,\mathcal{F},\mathbb{P})\) models a financial market and \(S_T=S_0\exp\left((\mu-\frac12\sigma^2)T+\sigma W_T\right)\), then \(S_T\) is a random variable, as a continuous function of the random variable \(W_T\). So are payoffs such as \((S_T-K)^+\), as continuous functions of \(S_T\).