Measurable functions¶
A measurable function is a type of function for which it is possible to know (to measure) the conditions (the set) that originates certain outcomes. One can think of a function as mapping certain events in a given measure space to outcomes in another measure space. A function is measurable if the sets that induce a given outcome are measurable. Formally:
Definition 23.1: Measurable function
Let \(\left(S,\mathcal{A},\mu\right)\) and \(\left(S^{\prime},\mathcal{A}^{\prime},\mu^{\prime}\right)\) be measure spaces and \(f:S\to S^{\prime}\) a function. \(f\) is measurable if and only if \(f^{-1}\left(A^{\prime}\right)\in\mathcal{A}\) for all \(A^{\prime}\in\mathcal{A}^{\prime}\).
A special case of notable importance is that of \(\left(S^{\prime},\mathcal{A}^{\prime},\mu^{\prime}\right)=\left(\mathbb{R},\mathcal{B},\lambda\right)\), where \(\lambda\) is the Lebesgue measure on the plane. This are real valued functions. In this case the \(\mathcal{B}\)-measurable sets in \(\mathbb{R}\) can be characterized in the following way:
Theorem 23.1
Let \(\left(S,\mathcal{A},\mu\right)\) be a measure space and \(f:S\to\mathbb{R}\). \(f\) is \(\mu\)-measurable if and only if \(f^{-1}\left(\left(-\infty,c\right)\right)=\left\lbrace x\in S|f\left(x\right)<c\right\rbrace \in\mathcal{A}\) for all \(c\in\mathbb{R}\).
Proof
This theorem is stated as the definition of a real valued function \(f\) being \(\mu\)-measurable in Stokey et al. (1989), but a formal proof is presented in Kolmogorov and Fomin (2012, Sec. 28, Thm. 1). It can also be stated with any of the inequalities \(\geq,\leq,>,<\).
Also when the measure space in question is a probability space one can characterize formally what a random variable is.
Definition 23.2: Random variable
Let \(\left(S,\mathcal{A},P\right)\) be a probability space and \(f:S\to\mathbb{R}\) a real valued function. \(f\) is a random variable if and only if \(f\) is measurable, that is, if and only if \(f^{-1}\left(B\right)\in\mathcal{A}\) for all \(B\in\mathcal{B}\), where \(\mathcal{B}\) is the Borel \(\sigma\)-algebra on \(\mathbb{R}\). We further establish the same notation:
- An outcome is an element \(s\in S\).
- An event is a measurable subset of \(S\): \(A\in\mathcal{A}\).
- The real number \(f\left(s\right)\) is a realization of the random variable.
- The probability measure for \(f\) is then: \(\mu\left(B\right)=P\left(f^{-1}\left(B\right)\right)=P\left(\left\lbrace s\in S|f\left(s\right)\in B\right\rbrace \right)\), for \(B\in\mathcal{B}\).
- The distribution function for \(f\) is: \(G\left(b\right)=\mu\left(\left(-\infty,b\right]\right)\), for \(b\in\text{\mathbb{R}}\).
Generally it is very hard to find a function that is not measurable. The details of the example will depend on the spaces considered. For example if \(f:\mathbb{R}\to\mathbb{R}\) and \(\mathcal{A}\) is the set of all open (or closed) sets in \(\mathbb{R}\) the definition of measurability is equivalent to that of continuity (the pre-image of an open set has to be open) and then all functions that are not continuous are not measurable. It is clear that more complete \(\sigma\)-algebras make more difficult to generate counterexamples. The following three results show how difficult it is to generate them:
Proposition 23.1
Let \(f:\mathbb{R}\to\mathbb{R}\).
- If \(f\) is continuous then \(f\) is measurable with respect to the Borel sets.
- If \(f\) is monotone then \(f\) is measurable with respect to the Borel sets.
Proof
Each case is proven:
- Let \(f\) be continuous. Consider the set \(f^{-1}\left(\left(-\infty,c\right)\right)\) for any \(c\in\mathbb{R}\). The set \(\left(-\infty,c\right)\) is open, because \(f\) is continuous then its pre-image is open, then it is a Borel set. Then its measurable.
-
Let \(f\) be monotone increasing. Consider the set \(f^{-1}\left(\left(-\infty,c\right)\right)\) for arbitrary \(c\in\mathbb{R}\). Then, \(f^{-1}\left(\left(-\infty,c\right)\right)=\left(-\infty,a\right)\) or \(f^{-1}\left(\left(-\infty,c\right)\right)=\left(-\infty,a\right]\) or \(f^{-1}\left(\left(-\infty,c\right)\right)=\left(-\infty,\infty\right)\) or \(f^{-1}\left(\left(-\infty,c\right)\right)=\emptyset\) for some \(a\in\mathbb{R}\). Monotonicity ensures that if \(a\in f^{-1}\left(\left(-\infty,c\right)\right)\) and \(b\leq a\) then \(b\in f^{-1}\left(\left(-\infty,c\right)\right)\). Suppose its not, then there exists numbers \(b\leq a\) such that \(f\left(b\right)>c\geq f\left(a\right)\), contradicting monotonicity.
All these sets are in \(\mathcal{B}\), then \(f\) is \(\mathcal{B}\)-measurable.
Corollary 23.1
The composition of measurable functions is measurable. In particular the composition of a continuous function with a measurable function is measurable.
Proposition 23.2
Let \(S=\left\lbrace s_{1},s_{2},\ldots\right\rbrace\) be a countable set (potentially infinite) and \(\mathcal{A}=2^{S}\) a \(\sigma\)-algebra on \(S\). Then all functions \(f:S\to\mathbb{R}\) are measurable.
Proof
The proof is immediate because the pre-image of a Borel set is a subset of \(S\), then it belongs to \(\mathcal{A}=2^{S}\).
In a more general way one can establish the measurability of a function by relating to a class of well behave 'simple' functions. The base for this class is the indicator function.
Definition 23.3: Indicator Function
Let \(\left(S,\mathcal{A}\right)\) be a measurable space. An indicator function \(\chi_{A}:S\to\mathbb{R}\) is:
Clearly \(\chi_{A}\) is measurable if and only if \(A\in\mathcal{A}\).
Definition 23.4: Simple Function
Let \(\left(S,\mathcal{A}\right)\) be a measurable space. A simple function is a function that takes at most countably many values. When the function takes finitely many values it can be expressed as:
where \(\left\lbrace A_{i}\right\rbrace\) is a sequence of subsets of \(S\) and \(\alpha_{i}\in\mathbb{R}\).
Characterizing the measurability of simple functions is slightly more complicated.
Proposition 23.3
A simple function taking values \(\left\lbrace y_{1},y_{2},\ldots\right\rbrace\) is measurable if and only if the sets \(A_{i}=\left\lbrace s\in S|\phi\left(s\right)=y_{n}\right\rbrace\) are measurable.
Proof
Both directions are proven.
- Let \(\phi\) be measurable, and \(\left\lbrace y_{n}\right\rbrace \in\mathcal{B}\), then its pre-image is measurable wrt \(\mathcal{A}\).
-
Let the sets be measurable, that is \(A_{i}\in\mathcal{A}\), and consider \(B\in\mathcal{B}\) a Borel set. Then
\[ \phi^{-1}\left(B\right)=\left\lbrace s\in S|\phi\left(s\right)=y_{i}\in B\right\rbrace =\bigcup_{y_{i}\in B}A_{i}. \]Because each \(A_{i}\in\mathcal{A}_{i}\) and the union is taken over no more than countably many sets we have \(\bigcup_{y_{i}\in B}A_{i}\in\mathcal{A}\) by definition of a \(\sigma\)-algebra. This proves measurability of \(\phi^{-1}\left(B\right)\).
In what follows all simple functions will be considered measurable. The importance of simple functions is given by the applications of the following proposition.
Proposition 23.4
Let \(\left(S,\mathcal{A}\right)\) be a measurable space and let \(\left\lbrace f_{n}\right\rbrace\) be a sequence of measurable functions converging pointwise to \(f\), that is \(\lim f_{n}\left(s\right)=f\left(s\right)\) for all \(s\). Then \(f\) is also measurable.
Proof
The proof can be found in Stokey et al. (1989, Sec. 7.3) or in Kolmogorov and Fomin (2012, Sec. 28.1).
Corollary 23.2
If \(f\) is non-negative one can choose the sequence \(\left\lbrace f_{n}\right\rbrace\) to be strictly increasing.
Corollary 23.3
If \(f\) is bounded one can choose the sequence \(\left\lbrace f_{n}\right\rbrace\) to converge uniformly.
The main application is the following result that gives a characterization of measurable functions in terms of simple functions:
Proposition 23.5
A function \(f\) is measurable if and only if it an be represented as the limit of a uniformly converging sequence of measurable simple functions.
Proof
The first direction is immediate from the previous proposition. If \(f\) is the limit of measurable functions then \(f\) is also measurable.
Let \(f\) be measurable. It is left to construct a converging sequence of simple functions that converges to \(f\). wlog let \(f\left(s\right)\geq0\) for all \(s\), then by the Archimedean principle there exists a non-negative integer \(m\) such that
Let \(f_{n}\left(s\right)=\frac{m}{n}\), because \(n\) is fixed and \(m\in\mathbb{N}\cup\left\lbrace 0\right\rbrace\) it follows that \(f_{n}\) can take at most countably many values, hence it is simple. \(f_{n}\) is also measurable because
For \(m^{\star}\) chosen by the Archimedean principle. The last set is \(f^{-1}\left(\left(-\infty,\frac{m^{\star}+1}{n}\right)\right)\) which is measurable by assumption. Then \(f_{n}\) is measurable for all \(n\).
Finally, \(f_{n}\to f\) uniformly because
Other results will follow and are left stated without proof:
Proposition 23.6
Let \(f,g\) be measurable functions and \(\alpha\in\mathbb{R}\) then:
- \(f+g\) is measurable.
- \(\alpha f\) is measurable.
- \(fg\) is measurable.
- \(\frac{1}{f}\) is measurable provided that \(f\left(s\right)\neq0\).
Finally continuity of functions is used to strengthen the intuition around measurability.
Proposition 23.7
Let \(f,g\) be equivalent function defined on an interval \(E\), that is they are equal a.e. If \(f\) and \(g\) are continuous then they coincide.
Proof
Suppose not, then there exists \(x\in E\) such that \(f\left(x\right)\neq g\left(x\right)\). Let \(\epsilon=\left|f\left(x\right)-g\left(x\right)\right|\), because \(f\) and \(g\) are continuous there exists \(\delta\) such that for \(x^{\prime}\in B_{\delta}\left(x\right)\) it holds that \(\left|f\left(x\right)-f\left(x^{\prime}\right)\right|<\frac{\epsilon}{2}\) and \(\left|g\left(x\right)-g\left(x^{\prime}\right)\right|<\frac{\epsilon}{2}\). Then for all \(x^{\prime}\in B_{\delta}\left(x\right)\) it holds that \(f\left(x^{\prime}\right)\neq g\left(x^{\prime}\right)\), but \(B_{\delta}\left(x\right)\) has strictly positive measure, contradicting \(f\) and \(g\) being equivalent.
Proposition 23.8
A function \(f\) equivalent to a measurable function \(g\) is measurable.
Proof
Because the functions are equivalent the sets \(\left\lbrace x|f\left(x\right)\leq c\right\rbrace\) and \(\left\lbrace x|g\left(x\right)\leq c\right\rbrace\) can differ in at most by a set of measure zero. Then if the second set is measurable so is the first one (taking into account the completion of the \(\sigma\)-algebra). This proves measurability.
Corollary 23.4
A function \(f\) equivalent to a continuous function is measurable.
Proof
Immediate from continuous functions being measurable.
This implies that if a function is continuous a.e. then it is measurable, again the behavior of functions in sets of measure zero carries no consequence. It turns out that this corollary can be strengthened. The result is powerful and is stated without a proof:
Theorem 23.2: Luzin
Let \(f:\left[a,b\right]\to\mathbb{R}\) be a function. \(f\) is measurable if and only if for all \(\epsilon>0\) there exists a continuous function \(g\) such that \(\mu\left\lbrace x\in\left[a,b\right]\,|\,f\left(x\right)\neq g\left(x\right)\right\rbrace <\epsilon\).
This theorem shows that for the case of functions of real variable and real value measurability is equivalent to continuity, except on a set of arbitrarily small size. In other words a measurable function can be made continuous by altering its values on a set of arbitrarily small measure.