Tutorials › Measure Theory › Indicator Expansions for Event-Based Expectations

Expectation, Conditional Expectation and Independence · Tutorial 746 of 798

Indicator Expansions for Event-Based Expectations

Use indicator functions to turn event descriptions of simple random variables into exact expectation formulas.

Advanced 9 min read

What You'll Learn

  • Express a simple random variable as a sum of indicators of its level sets.
  • Compute an indicator’s expectation from the probability of its event.
  • Expand weighted event expressions even when the events overlap.
  • Apply inclusion–exclusion to unions of two or three events.
  • Check event-based expectation calculations using disjoint regions.

From Events to Expectations

An event-based description often makes a random quantity easier to analyze. A payoff might be one amount when event \(A\) occurs and another when event \(B\) occurs; the events need not be disjoint. Indicator functions translate such descriptions into algebra, while event probabilities supply the expectation. The essential bookkeeping is to preserve overlaps: if two events both occur, both indicators contribute.

Throughout, \((\Omega,\mathcal{F},\mathbb{P})\) is a probability space, so \(\mathbb{P}(\Omega)=1\). An event is a set in \(\mathcal{F}\). For an event \(A\), its indicator \(\chi_A\) is the random variable equal to \(1\) on \(A\) and \(0\) on \(A^c\). A simple random variable here means a measurable, real-valued function taking only finitely many values. Such a function is bounded and integrable on a probability space, and its expectation is \(\mathbb{E}[X]=\int_\Omega X\,d\mathbb{P}\).

Definition: For every event \(A\in\mathcal{F}\), \(\mathbb{E}[\chi_A]=\mathbb{P}(A)\). More generally, if \(X\) takes the distinct values \(a_1,\ldots,a_r\) on the disjoint events \(A_i=\{X=a_i\}\), then \(X=\sum_{i=1}^r a_i\chi_{A_i}\) pointwise and \(\mathbb{E}[X]=\sum_{i=1}^r a_i\mathbb{P}(A_i)\).

The first identity follows directly from integrating the indicator: its value is \(1\) on \(A\) and \(0\) elsewhere. The second is the expectation formula for a simple random variable, applied to its level-set partition. The partition includes every outcome: the events are disjoint and \(\bigcup_{i=1}^r A_i=\Omega\). Values \(a_i\) may be negative or zero.

Worked Example: Expectation from a Disjoint Partition

Suppose \(\Omega\) has eight equally likely outcomes and a simple random variable \(X\) equals \(-2\) on three outcomes, \(1\) on two outcomes, and \(4\) on the remaining three. Compute \(\mathbb{E}[X]\) from its level sets.

Let \(A_{-2},A_1,A_4\) be the respective level sets. They form a disjoint partition, with probabilities \(3/8,2/8,3/8\). Therefore, by the simple-function formula,

$$ \mathbb{E}[X] =(-2)\frac{3}{8}+1\frac{2}{8}+4\frac{3}{8} =\frac{-6+2+12}{8} =\frac{8}{8}=1. $$

Check: the probabilities add to \(3/8+2/8+3/8=8/8=1\). The weighted sum of the three values is \(-6+2+12=8\), and dividing by the eight equally likely outcomes again gives \(8/8=1\).

Overlapping Events and Weighted Indicators

An event expression such as \(c_1\chi_{E_1}+\cdots+c_s\chi_{E_s}\) is still a simple random variable when the number of events is finite and the coefficients are real. It is constant on each region determined by which events occur. Crucially, on an overlap, the corresponding coefficients add; the expression does not select just one of them.

Proposition: If \(E_1,\ldots,E_s\in\mathcal{F}\) and \(c_1,\ldots,c_s\in\mathbb{R}\), then the pointwise finite sum \(Y=\sum_{j=1}^s c_j\chi_{E_j}\) is integrable and \(\mathbb{E}[Y]=\sum_{j=1}^s c_j\mathbb{P}(E_j)\). No disjointness or independence assumption is needed.

Proof. The function \(Y\) takes only finitely many real values, since at each outcome it is a sum of some of the finitely many coefficients. It is measurable and bounded, hence integrable on the probability space. To compute its integral without assuming that the \(E_j\) are disjoint, partition \(\Omega\) into the finitely many measurable regions \(D_I\), indexed by subsets \(I\subseteq\{1,\ldots,s\}\), where \(D_I\) consists of outcomes belonging to exactly those \(E_j\) with \(j\in I\). These regions are disjoint and cover \(\Omega\); some may be empty. On \(D_I\), \(Y=\sum_{j\in I}c_j\). Thus the simple-function expectation formula gives \[ \mathbb{E}[Y]=\sum_{I\subseteq\{1,\ldots,s\}}\left(\sum_{j\in I}c_j\right)\mathbb{P}(D_I) =\sum_{j=1}^s c_j\left(\sum_{I:\,j\in I}\mathbb{P}(D_I)\right). \] The inner regions \(D_I\) with \(j\in I\) are a disjoint partition of \(E_j\), so their probabilities sum to \(\mathbb{P}(E_j)\). Substitution gives the claimed formula. This argument also covers empty events and zero coefficients. \(\square\)

Worked Example: A Payoff on Two Overlapping Events

On a twelve-outcome space with equally likely outcomes, suppose \(A\) contains seven outcomes, \(B\) contains six, and \(A\cap B\) contains three. Define \(Y=2\chi_A+5\chi_B\). Find its expectation and verify it by splitting into disjoint regions.

The event probabilities are \(\mathbb{P}(A)=7/12\), \(\mathbb{P}(B)=6/12\), and \(\mathbb{P}(A\cap B)=3/12\). The indicator-expansion proposition gives

$$ \mathbb{E}[Y]=2\frac{7}{12}+5\frac{6}{12} =\frac{14+30}{12} =\frac{44}{12}=\frac{11}{3}. $$

For an independent check, \(A\setminus B\) has \(7-3=4\) outcomes, \(B\setminus A\) has \(6-3=3\), and \(A\cap B\) has \(3\). On these regions, \(Y\) equals \(2\), \(5\), and \(2+5=7\), respectively; outside their union it equals \(0\). Thus

$$ \mathbb{E}[Y]=2\frac{4}{12}+5\frac{3}{12}+7\frac{3}{12} =\frac{8+15+21}{12} =\frac{44}{12}=\frac{11}{3}. $$

The regions account for \(4+3+3=10\) outcomes, leaving \(12-10=2\) outcomes outside both events. Those outcomes contribute zero. The two calculations agree.

Unions and Inclusion–Exclusion

For a union, the indicator is not generally the sum of the individual indicators: an outcome in two events would be counted twice. For two events the correction is to subtract the overlap. For three events, one subtracts the pairwise overlaps and adds back the triple overlap. The same pattern extends to any finite family.

Theorem (Indicator inclusion–exclusion): For any finite family of events \(E_1,\ldots,E_s\) in \((\Omega,\mathcal{F},\mathbb{P})\), with \(s\geq 1\), \[ \chi_{\bigcup_{i=1}^s E_i} =\sum_{\varnothing\ne J\subseteq\{1,\ldots,s\}}(-1)^{|J|+1} \chi_{\bigcap_{j\in J}E_j} \quad\text{pointwise}. \] Consequently, the probability of the union is the corresponding alternating sum of intersection probabilities.

Proof. Fix an outcome \(\omega\), and let \(r\) be the number of events \(E_i\) that contain it. If \(r=0\), the left side is zero and every intersection indicator on the right is zero. If \(r\geq1\), the left side is one. Among the terms on the right, precisely the subsets \(J\) of those \(r\) events contribute one. The right side therefore equals \[ \sum_{k=1}^{r}(-1)^{k+1}\binom{r}{k} =1-\sum_{k=0}^{r}(-1)^k\binom{r}{k} =1-(1-1)^r=1. \] This proves the pointwise identity in both cases. Each side is a finite linear combination of event indicators, so taking expectations is justified by the proposition. The expectation of each intersection indicator is the probability of that intersection, and the expectation of the union indicator is the probability of the union. Hence the asserted probability formula follows. \(\square\)

For \(s=2\), the identity reads \(\chi_{A\cup B}=\chi_A+\chi_B-\chi_{A\cap B}\). For \(s=3\), it reads \(\chi_{A\cup B\cup C}=\chi_A+\chi_B+\chi_C-\chi_{A\cap B}-\chi_{A\cap C}-\chi_{B\cap C}+\chi_{A\cap B\cap C}\). These are pointwise identities, so they apply regardless of the probability values or any independence relations.

Worked Example: A Three-Event Union

On a sixteen-outcome space with equally likely outcomes, suppose \(A,B,C\) have sizes \(8,7,6\); the pairwise intersections \(A\cap B,A\cap C,B\cap C\) have sizes \(4,3,2\); and the triple intersection has size \(1\). Find the expectation of \(Z=3\chi_{A\cup B\cup C}\).

Apply the three-event indicator identity and take expectations. Using the given sizes, the union probability is

$$ \mathbb{P}(A\cup B\cup C) =\frac{8+7+6-4-3-2+1}{16} =\frac{13}{16}. $$

Since \(Z\) is three on the union and zero outside it, its expectation is \[ \mathbb{E}[Z]=3\mathbb{P}(A\cup B\cup C) =3\frac{13}{16}=\frac{39}{16}. \] Check the event counts by splitting into disjoint regions. The triple-only region has \(1\) outcome. The pair-only regions have \(4-1=3\), \(3-1=2\), and \(2-1=1\) outcomes. The \(A\)-only region has \(8-3-2-1=2\) outcomes; the \(B\)-only region has \(7-3-1-1=2\); the \(C\)-only region has \(6-2-1-1=2\). These seven disjoint regions total \(1+3+2+1+2+2+2=13\) outcomes, so the union has probability \(13/16\), as calculated. The remaining \(16-13=3\) outcomes lie outside the union and give \(Z=0\). Thus the direct partition check also gives \(3\cdot13/16=39/16\).

A Common Pitfall and a Practical Check

Pitfall: treating overlapping events as disjoint. In the two-event example, adding the event probabilities without correcting for overlap gives \(\mathbb{P}(A)+\mathbb{P}(B)=7/12+6/12=13/12\). This cannot be a probability, and it is not the union probability. The three outcomes in \(A\cap B\) were counted twice, so the correction is \(\mathbb{P}(A\cup B)=7/12+6/12-3/12=10/12=5/6\). The strict event membership is exact here: the union includes outcomes in \(A\) or \(B\), including those in both.

When computing an event-based expectation, first write the random variable as a pointwise indicator identity. Then take expectations term by term using the finite-sum proposition, and only afterward substitute probabilities. If the expression is a union, use inclusion–exclusion or split into disjoint regions. Independence is not required for any of these steps; it would matter only if one needed to calculate an intersection probability from separate probabilities.

Check Your Understanding

For each question, keep track of whether the event expression is pointwise and whether the events overlap.

  1. If \(X=4\chi_A-2\chi_B\), with \(\mathbb{P}(A)=1/3\) and \(\mathbb{P}(B)=1/4\), what is \(\mathbb{E}[X]\)? Does the answer require \(A\) and \(B\) to be disjoint?
  2. Write the indicator identity for \(A\cup B\cup C\) and explain why the triple intersection has a positive sign.
  3. If \(A\subseteq B\), express \(\chi_B-\chi_A\) as the indicator of an event, and identify that event.
  4. For three events, what disjoint regions could you count to check an inclusion–exclusion calculation?
  5. Give a pointwise reason that \(\chi_{A\cup B}=\chi_A+\chi_B\) fails when \(A\cap B\) is nonempty.