Tutorials › Measure Theory › Indicator and Simple Random Variables

Probability Spaces and Random Variables · Tutorial 730 of 798

Indicator and Simple Random Variables

Learn to test measurability using level sets and compute a finite-valued random variable’s distribution directly from the probabilities of those sets.

Intermediate 9 min read

What You'll Learn

  • Characterize when an event indicator is a measurable random variable.
  • Test a finite-valued map for measurability by checking its value fibers.
  • Express a simple random variable as a sum of weighted event indicators.
  • Compute a finite distribution by grouping outcomes with the same value.
  • Distinguish values in the range from values that occur with positive probability.

From Events to Random Variables

On a probability space, an event is a measurable set, and an indicator records whether that event occurs. Finite-valued random variables generalize this construction: each possible value corresponds to an event on which the variable takes that value. This viewpoint gives a direct measurability test and a simple way to compute the variable’s distribution from event probabilities.

Throughout, \((\Omega,\mathcal{F},\mathbb{P})\) is a probability space, so \(\mathbb{P}(\Omega)=1\). A random variable here is a real-valued measurable map \(X:\Omega\to\mathbb{R}\): for every Borel set \(B\in\mathcal{B}_{\mathbb{R}}\), the level set \(X^{-1}(B)=\{\omega:X(\omega)\in B\}\) belongs to \(\mathcal{F}\). A finite-valued random variable is one whose range contains only finitely many distinct real numbers. Statements about maps and their level sets are pointwise; distribution tables concern probabilities, so values occurring only on null events have probability zero.

Definition: For an event \(A\in\mathcal{F}\), its indicator is \(\chi_A:\Omega\to\mathbb{R}\), defined by \(\chi_A(\omega)=1\) if \(\omega\in A\), and \(\chi_A(\omega)=0\) if \(\omega\notin A\). A simple random variable is a measurable, finite-valued, real-valued function on \((\Omega,\mathcal{F},\mathbb{P})\).

Indicators and Their Measurability

An indicator has just two possible values. Its level sets are determined entirely by the event used to define it: \(\{\chi_A=1\}=A\) and \(\{\chi_A=0\}=A^c\). This gives an exact criterion, not just a sufficient condition.

Proposition: For a subset \(A\subseteq\Omega\), the real-valued map \(\chi_A\) is a random variable on \((\Omega,\mathcal{F},\mathbb{P})\) if and only if \(A\in\mathcal{F}\).

Proof. Suppose first that \(\chi_A\) is measurable. The singleton \(\{1\}\) is Borel in \(\mathbb{R}\), so \(A=\chi_A^{-1}(\{1\})\in\mathcal{F}\). Conversely, suppose \(A\in\mathcal{F}\). Then \(A^c\in\mathcal{F}\). For any Borel set \(B\subseteq\mathbb{R}\), the preimage \(\chi_A^{-1}(B)\) is one of \(\varnothing,A,A^c,\Omega\), according to whether \(B\) contains neither, only \(1\), only \(0\), or both of the values \(0,1\). Each of these sets belongs to \(\mathcal{F}\), so \(\chi_A\) is measurable. This also covers \(A=\varnothing\) and \(A=\Omega\), whose indicators are constant. \(\square\)

Worked Example: The Distribution of an Event Indicator

Let \(\Omega=\{\omega_1,\omega_2,\omega_3,\omega_4\}\), let \(\mathcal{F}\) be the set of all subsets of \(\Omega\), and assign probabilities \(\mathbb{P}(\{\omega_1\})=1/10\), \(\mathbb{P}(\{\omega_2\})=2/10\), \(\mathbb{P}(\{\omega_3\})=3/10\), and \(\mathbb{P}(\{\omega_4\})=4/10\). These point probabilities sum to \(1/10+2/10+3/10+4/10=10/10=1\). Take \(A=\{\omega_1,\omega_3\}\) and \(X=\chi_A\).

Since \(A\in\mathcal{F}\), the proposition shows that \(X\) is measurable. The level set for value \(1\) is \(A\), with probability \(\mathbb{P}(X=1)=1/10+3/10=4/10=2/5\). The level set for value \(0\) is \(A^c=\{\omega_2,\omega_4\}\), with probability \(\mathbb{P}(X=0)=2/10+4/10=6/10=3/5\). Thus the distribution table has values \(0,1\) with probabilities \(3/5,2/5\), respectively. Check: the probabilities add to \(3/5+2/5=1\), and the two level sets are disjoint and cover \(\Omega\).

Finite-Valued Maps and Their Level Sets

For a finite-valued map, the important level sets are its fibers: the sets of outcomes that produce each distinct value. These fibers must form a measurable partition. Once they do, every Borel level set of the map is a union of some of those fibers.

Theorem: Let \(X:\Omega\to\mathbb{R}\) be a finite-valued map on a probability space \((\Omega,\mathcal{F},\mathbb{P})\), and write its distinct attained values as \(x_1,\ldots,x_k\). Then \(X\) is measurable if and only if \(A_i=\{\omega:X(\omega)=x_i\}\in\mathcal{F}\) for every \(i\). In that case the \(A_i\) are disjoint, their union is \(\Omega\), and $$ X=\sum_{i=1}^{k}x_i\chi_{A_i} $$ at every \(\omega\in\Omega\).

Proof. If \(X\) is measurable, then for each \(i\), \(A_i=X^{-1}(\{x_i\})\in\mathcal{F}\), since \(\{x_i\}\) is Borel. Conversely, suppose every \(A_i\) belongs to \(\mathcal{F}\). For any Borel set \(B\subseteq\mathbb{R}\), $$ X^{-1}(B)=\bigcup_{\{i:\,x_i\in B\}}A_i. $$ This is a finite union of measurable sets, and is therefore in \(\mathcal{F}\); if the index set is empty, the union is \(\varnothing\in\mathcal{F}\). Thus \(X\) is measurable. Distinct values cannot occur at the same outcome, so \(A_i\cap A_j=\varnothing\) for \(i\ne j\); every outcome has one of the attained values, so \(\bigcup_{i=1}^k A_i=\Omega\). At an outcome \(\omega\in A_j\), the indicator \(\chi_{A_j}(\omega)\) is \(1\) and all the other indicators are \(0\), giving \(\sum_{i=1}^k x_i\chi_{A_i}(\omega)=x_j=X(\omega)\). This proves the representation pointwise, including when one of the values \(x_i\) is zero. \(\square\)

The converse also explains why measurable event partitions are a natural way to define a simple random variable. If \(A_1,\ldots,A_k\) are disjoint measurable sets whose union is \(\Omega\), and \(x_1,\ldots,x_k\) are real numbers, then the function \(\sum_{i=1}^k x_i\chi_{A_i}\) is measurable: on each \(A_i\) it equals \(x_i\), and its fibers are unions of partition sets with the same assigned value. If some assigned values coincide, the corresponding partition sets must be grouped to obtain the fibers for the distinct values.

Worked Example: A Simple Random Variable on an Interval

Take \(\Omega=[0,1]\), \(\mathcal{F}=\mathcal{L}\), and let \(\mathbb{P}\) be Lebesgue measure restricted to \([0,1]\). Partition the interval into \(A_1=[0,1/4)\), \(A_2=[1/4,3/4)\), and \(A_3=[3/4,1]\). These are measurable, disjoint, and cover \([0,1]\). Define \(X=-2\) on \(A_1\), \(X=1\) on \(A_2\), and \(X=4\) on \(A_3\). The theorem shows that \(X\) is measurable and \(X=-2\chi_{A_1}+\chi_{A_2}+4\chi_{A_3}\).

The probabilities are the interval lengths: \(\mathbb{P}(X=-2)=m([0,1/4))=1/4-0=1/4\), \(\mathbb{P}(X=1)=m([1/4,3/4))=3/4-1/4=1/2\), and \(\mathbb{P}(X=4)=m([3/4,1])=1-3/4=1/4\). The endpoint convention makes the sets disjoint and exhaustive; including or excluding a single endpoint does not change these Lebesgue probabilities. Check: \(1/4+1/2+1/4=1\), as required for the probabilities of a partition of the probability space.

Reading a Distribution from Level Sets

For a finite-valued random variable, its distribution can be recorded by listing each distinct value and the probability of its fiber. Values with probability zero may be included in the table, but they are not outcomes of positive probability. To find the probability that \(X\) belongs to any Borel set \(B\), add the probabilities of the fibers whose values lie in \(B\).

Proposition: If \(X\) is a finite-valued random variable on \((\Omega,\mathcal{F},\mathbb{P})\), with distinct values \(x_1,\ldots,x_k\) and fibers \(A_i=\{X=x_i\}\), then \(p_i=\mathbb{P}(A_i)\geq0\), \(\sum_{i=1}^k p_i=1\), and for every Borel set \(B\subseteq\mathbb{R}\), $$ \mathbb{P}(X\in B)=\sum_{\{i:\,x_i\in B\}}p_i. $$ The sum over no indices is \(0\).

Proof. Each \(A_i\) is measurable by the theorem, so \(p_i\) is defined and nonnegative. The fibers are a finite disjoint partition of \(\Omega\). Finite additivity of the probability measure therefore gives \(\sum_{i=1}^k p_i=\mathbb{P}(\Omega)=1\). Also, the event \(\{X\in B\}\) is exactly the union of \(A_i\) over indices for which \(x_i\in B\). These fibers are disjoint, so finite additivity gives the stated formula. If there are no such indices, the event is empty and has probability \(0\). \(\square\)

This formula groups outcomes by the value of the random variable, rather than counting each outcome separately. Consequently, a fiber can contain infinitely many outcomes and still contribute a single probability to a finite distribution table.

Worked Example: Grouping a Countable Sample Space

Let \(\Omega=\mathbb{N}=\{1,2,\ldots\}\), let \(\mathcal{F}\) contain all subsets of \(\mathbb{N}\), and assign \(\mathbb{P}(\{n\})=2^{-n}\). The geometric series gives \(\sum_{n=1}^{\infty}2^{-n}=(1/2)/(1-1/2)=1\), so these point probabilities define a probability measure. Define \(X(n)=0\) when \(n\) is even and \(X(n)=3\) when \(n\) is odd. Its two fibers are measurable, so \(X\) is a simple random variable even though each fiber is infinite.

For the odd fiber, $$ \mathbb{P}(X=3)=\sum_{j=0}^{\infty}2^{-(2j+1)} =\frac{1/2}{1-1/4} =\frac{1/2}{3/4} =\frac{2}{3}. $$ For the even fiber, $$ \mathbb{P}(X=0)=\sum_{j=1}^{\infty}2^{-2j} =\frac{1/4}{1-1/4} =\frac{1/4}{3/4} =\frac{1}{3}. $$ Thus the distribution table has value \(0\) with probability \(1/3\) and value \(3\) with probability \(2/3\). Check: the probabilities sum to \(1/3+2/3=1\). Independently, the two fibers partition \(\mathbb{N}\), and their probabilities sum to the full geometric series \(\sum_{n=1}^{\infty}2^{-n}=1\).

A Measurability Pitfall

A finite range alone does not guarantee measurability: the fibers must belong to the sigma-algebra. For a concrete example, take \(\Omega=\{1,2\}\), \(\mathcal{F}=\{\varnothing,\Omega\}\), and the probability measure with \(\mathbb{P}(\Omega)=1\). Define \(X(1)=0\) and \(X(2)=1\). The map has finite range, but \(\{X=1\}=\{2\}\notin\mathcal{F}\), so the singleton-preimage test shows that it is not measurable.

Incorrect calculation: “\(X\) takes only the values \(0\) and \(1\), so its distribution assigns probabilities \(\mathbb{P}(X=0)\) and \(\mathbb{P}(X=1)\).” This assumes those level sets are events before checking that they are measurable. Correction: first test the fibers. Here neither singleton fiber belongs to \(\mathcal{F}\), so these probabilities are not defined by this probability space and \(X\) is not a random variable on it. In contrast, an indicator is measurable precisely when the set it indicates is an event.

When a fiber is measurable but has probability zero, its value remains in the pointwise range but receives zero mass in the distribution table. Thus the range of a random variable and the set of values with positive probability need not agree. The table records probability, not whether a value is attained at least once.

Check Your Understanding

Use the level sets first, and distinguish pointwise values from probabilities.

  1. Prove that if \(A\in\mathcal{F}\), then \(\chi_{A^c}=1-\chi_A\) at every outcome. What are the probabilities of the two values of \(\chi_{A^c}\)?
  2. A simple random variable has distinct values \(-1,2,5\) on a measurable partition with probabilities \(1/3,1/2,1/6\). Compute the probability that its value belongs to \([0,4]\).
  3. On a probability space, suppose \(X\) takes values \(0\) and \(7\), and \(\mathbb{P}(X=7)=0\). What is \(\mathbb{P}(X=0)\), and must \(X\) equal \(0\) everywhere?
  4. Give the level-set criterion for measurability of a finite-valued map and explain why finite range alone is not enough.
  5. For the countable example above, compute \(\mathbb{P}(X\in\{3,4\})\) directly from the distribution table.