Random Variables as Measurable Maps
A random variable is a function defined on a probability space, but not every function on that space qualifies. Its defining requirement is measurability: every Borel set of possible values must correspond, through an inverse image, to an event whose probability is defined. This point of view gives a direct way to compute the probabilities assigned to the values of a random variable, even when the sample space is not itself a set of numbers.
Let \((\Omega,\mathcal{F},\mathbb{P})\) be a probability space. Here \(\Omega\) is the set of outcomes, \(\mathcal{F}\) is a sigma-algebra of events, and \(\mathbb{P}\) is a probability measure on \(\mathcal{F}\). The Borel sigma-algebra \(\mathcal{B}(\mathbb{R})\) is the sigma-algebra generated by the open subsets of \(\mathbb{R}\). For a function \(X:\Omega\to\mathbb{R}\) and a set \(B\subseteq\mathbb{R}\), its inverse image is
The inverse image collects the sample outcomes whose values under \(X\) fall in \(B\). It is not the set of output values; it is a subset of \(\Omega\).
This definition ensures that \(\mathbb{P}(X\in B)\) is meaningful for every Borel set \(B\), because the event \(\{X\in B\}\) is exactly \(X^{-1}(B)\) and belongs to \(\mathcal{F}\). When the values of \(X\) lie in a finite set \(S\subseteq\mathbb{R}\), one can also regard its law as a probability measure on the power set of \(S\).
The Law Induced by a Random Variable
The law transfers probability from the sample space to the value space. It records the probabilities of all Borel sets of values, not just the probability of any particular value. Its construction depends on the map \(X\) and the original probability measure \(\mathbb{P}\), but it is itself a measure on the real line.
Proof. For the empty set, \(X^{-1}(\varnothing)=\varnothing\), so \(\mathbb{P}_X(\varnothing)=\mathbb{P}(\varnothing)=0\). Also \(X^{-1}(\mathbb{R})=\Omega\), so \(\mathbb{P}_X(\mathbb{R})=\mathbb{P}(\Omega)=1\). Now let \(B_1,B_2,\ldots\) be pairwise disjoint Borel sets. Their inverse images are pairwise disjoint: if an outcome belonged to both \(X^{-1}(B_r)\) and \(X^{-1}(B_s)\), its image would belong to \(B_r\cap B_s=\varnothing\), which is impossible for \(r\ne s\). Moreover, inverse images preserve unions, so \(X^{-1}(\bigcup_{r\ge1}B_r)=\bigcup_{r\ge1}X^{-1}(B_r)\). Countable additivity of \(\mathbb{P}\) therefore gives \(\mathbb{P}_X(\bigcup_{r\ge1}B_r)=\sum_{r\ge1}\mathbb{P}_X(B_r)\). Thus \(\mathbb{P}_X\) is nonnegative, has total mass one, and is countably additive. \(\square\)
For a finite-valued random variable, it is often enough to find the probabilities of its individual values. The relevant sets are called fibers: the fiber at \(x\) is \(X^{-1}(\{x\})\). The next result explains why fibers also provide a convenient measurability test.
Proof. First suppose \(X\) is measurable. Each singleton \(\{x\}\) is a Borel set, so its inverse image belongs to \(\mathcal{F}\). Conversely, suppose every fiber at an image value is in \(\mathcal{F}\). For any Borel set \(B\), the inverse image \(X^{-1}(B)\) is the union of the fibers whose values lie in \(B\): \(X^{-1}(B)=\bigcup_{x\in X(\Omega)\cap B}X^{-1}(\{x\})\). The image is finite, so this is a finite union of events in \(\mathcal{F}\); if there are no such values, it is the empty set, also in \(\mathcal{F}\). Thus \(X\) is measurable. The formula for a singleton follows from the definition of \(\mathbb{P}_X\). For \(A\subseteq X(\Omega)\), its fibers are pairwise disjoint and \(X^{-1}(A)\) is their union, so finite additivity of \(\mathbb{P}\) gives the stated sum. \(\square\)
Computing Laws on Finite Sample Spaces
Worked Example: Even or Odd on a Fair Die
Let \(\Omega=\{1,2,3,4,5,6\}\), let \(\mathcal{F}\) be its power set, and assign probability \(1/6\) to each outcome. Define \(X(\omega)=1\) if \(\omega\) is even and \(X(\omega)=0\) if \(\omega\) is odd. The image is \(S=\{0,1\}\). Each fiber is an event, so the finite-range criterion shows that \(X\) is measurable.
The fibers are \(X^{-1}(\{1\})=\{2,4,6\}\) and \(X^{-1}(\{0\})=\{1,3,5\}\). Each has three outcomes, each of probability \(1/6\). Therefore
For the full value set, the two fibers partition \(\Omega\), so the probabilities sum to \(1/2+1/2=1\), as required. For example, the probability that \(X\) takes a value in \(A=\{1\}\) is the probability of its inverse image \(\{2,4,6\}\), namely \(1/2\).
Worked Example: A Nonuniform Finite Model
Let \(\Omega=\{a,b,c,d\}\), with \(\mathcal{F}\) equal to the power set of \(\Omega\) and probabilities \(\mathbb{P}(\{a\})=1/10\), \(\mathbb{P}(\{b\})=2/10\), \(\mathbb{P}(\{c\})=3/10\), and \(\mathbb{P}(\{d\})=4/10\). These are nonnegative and sum to \((1+2+3+4)/10=1\), so they define a probability measure. Define \(X(a)=2\), \(X(b)=2\), \(X(c)=5\), and \(X(d)=8\).
The fibers are \(X^{-1}(\{2\})=\{a,b\}\), \(X^{-1}(\{5\})=\{c\}\), and \(X^{-1}(\{8\})=\{d\}\). All subsets of \(\Omega\) are events, so these fibers establish measurability. Their probabilities are
For the set \(A=\{2,8\}\), its inverse image is \(\{a,b,d\}\). Thus \(\mathbb{P}_X(A)=\mathbb{P}(\{a,b,d\})=\tfrac1{10}+\tfrac2{10}+\tfrac4{10}=\tfrac7{10}\). The same value is obtained by adding the two corresponding law values: \(\tfrac3{10}+\tfrac4{10}=\tfrac7{10}\). As a normalization check, the three possible values have total probability \(\tfrac3{10}+\tfrac3{10}+\tfrac4{10}=1\).
A Continuous Sample Space with a Finite-Valued Map
Worked Example: Partitioning the Unit Interval
Take \(\Omega=[0,1]\), let \(\mathcal{F}\) be the Lebesgue-measurable subsets of \([0,1]\), and let \(\mathbb{P}\) assign to each event its Lebesgue length. The total length of \([0,1]\) is \(1\), so this is a probability space. Define
The fibers are \([0,\tfrac14)\), \([\tfrac14,\tfrac34)\), and \([\tfrac34,1]\), each of which is Lebesgue measurable. By the finite-range criterion, \(X\) is a random variable. Their lengths give the law:
The endpoint \(\tfrac14\) is assigned to the fiber at \(1\), and \(\tfrac34\) to the fiber at \(2\); the displayed intervals are disjoint and cover all of \([0,1]\). Their lengths sum to \(\tfrac14+\tfrac12+\tfrac14=1\), checking the total probability. For \(A=\{0,2\}\), the inverse image is \([0,\tfrac14)\cup[\tfrac34,1]\), so \(\mathbb{P}_X(A)=\tfrac14+\tfrac14=\tfrac12\).
What the Inverse-Image Viewpoint Prevents
The law depends on how much probability lies in each inverse image, not on how many output values the map has or on the numerical sizes of those values. Distinct sample outcomes can map to the same value, in which case their probabilities must be combined. Conversely, two values that are numerically close do not have to receive similar probabilities. The original probability space and the map together determine the law.
Measurability is not a technical decoration. It guarantees that inverse images of Borel sets are events. For a finite-valued map, checking each fiber is sufficient, but for a general real-valued map one must ensure the inverse-image condition for every Borel set. In particular, merely writing down a function does not by itself justify assigning probabilities to all sets of its values.
Common mistake. In the fair-die example, a mistaken calculation might say \(\mathbb{P}(X=1)=\mathbb{P}(\{1\})=1/6\), treating the output value \(1\) as the sample outcome \(1\). The correct calculation uses the inverse image: \(X^{-1}(\{1\})=\{2,4,6\}\), so \(\mathbb{P}(X=1)=\mathbb{P}(\{2,4,6\})=3/6=1/2\). The event lives in \(\Omega\); the singleton \(\{1\}\) on the left belongs to the value space.
Once the law is known, questions about values can be expressed as probabilities of sets in the value space. This is why the law is useful: it summarizes all probability statements that depend on \(X\) alone, without retaining the details of the underlying outcomes. The inverse-image calculation is the basic link between those two spaces.
Check Your Understanding
For each question, identify the relevant inverse image before calculating any probability.
- State the measurability condition for a function \(X:\Omega\to\mathbb{R}\).
- Why does \(\mathbb{P}_X(\mathbb{R})=1\) hold for a random variable?
- On a fair die, define \(Y=2\) for outcomes \(1\) and \(6\), and \(Y=0\) otherwise. Find the probabilities assigned by its law to \(0\) and \(2\).
- For a finite-valued map, why is it enough to check that every fiber is an event?
- In the unit-interval example, find the probability that \(X\) belongs to \(\{1,2\}\), using both its inverse image and the law values.