Tutorials › Measure Theory › Integrating Over a Measurable Subset

Integration of Nonnegative Functions · Tutorial 249 of 798

Integrating Over a Measurable Subset

Learn to restrict a nonnegative integral to a measurable set and compute the result by intersecting simple-function level sets with that set.

Advanced 11 min read

What You'll Learn

  • Define the integral of a nonnegative measurable function over a measurable subset.
  • Prove the restricted-simple-minorant formula for integrals over subsets.
  • Compute subset integrals by intersecting level sets with the subset.
  • Apply the level-set formula under Lebesgue, counting, and Dirac measures.
  • Separate integrals over disjoint measurable subsets.
  • Identify the error caused by using whole-space level sets instead of restricted ones.

Restricting an Integral to a Measurable Set

An integral over a measurable subset records only the contribution from that part of the space. The standard way to express this is to multiply the function by the indicator of the subset: the product agrees with the function on the subset and is zero elsewhere. For simple functions, this operation has a direct computational interpretation: intersect each level set with the subset before measuring it.

Throughout, \((X,\mathcal{M},\mu)\) is an arbitrary measure space; no assumption of finiteness, sigma-finiteness, or completeness is needed. Functions in this tutorial are measurable and take values in \([0,\infty]\). We use the nonnegative Lebesgue integral, defined as the supremum of the integrals of nonnegative simple functions below the function. A nonnegative simple function has finitely many finite values and measurable level sets. Its integral is the sum of each value times the measure of the set where that value occurs.

Definition: For \(A\in\mathcal{M}\), define \(\chi_A(x)=1\) for \(x\in A\) and \(\chi_A(x)=0\) for \(x\notin A\). For a measurable \(f:X\to[0,\infty]\), the integral of \(f\) over \(A\) is \(\displaystyle\int_A f\,d\mu:=\int_X f\chi_A\,d\mu.\) The product is understood pointwise as \(f\) on \(A\) and \(0\) on \(A^c\), including when \(f(x)=\infty\). Thus no ambiguous product \(0\cdot\infty\) is required.

The function \(f\chi_A\) is measurable and nonnegative, so its integral is defined on every measure space, with \(+\infty\) allowed. The subset integral is not an average: it is not divided by \(\mu(A)\). In particular, its definition makes sense whether or not \(A\) has finite measure.

Simple Functions: Restrict the Level Sets

Suppose \(\varphi\) is a nonnegative simple function and \(A\in\mathcal{M}\). If \(\varphi=\sum_{j=1}^r c_j\chi_{E_j}\), where the \(E_j\) are disjoint measurable sets and \(c_j\ge0\), then restricting to \(A\) replaces each \(E_j\) by \(E_j\cap A\). Equivalently, one can use the superlevel sets of \(\varphi\).

Proposition (Level-set formula on a subset): Let \((X,\mathcal{M},\mu)\) be any measure space, let \(A\in\mathcal{M}\), and let \(\varphi:X\to[0,\infty)\) be simple. Write its distinct positive values in increasing order as \(0<a_1<\cdots<a_k\), and set \(a_0=0\). Then \(\displaystyle\int_A\varphi\,d\mu=\sum_{j=1}^k(a_j-a_{j-1})\,\mu\bigl(A\cap\{\varphi\ge a_j\}\bigr).\) If \(\varphi\) is identically zero, the sum is empty and the integral is zero.

Proof. For each \(x\in X\), if \(\varphi(x)=0\), then every indicator \(\chi_{\{\varphi\ge a_j\}}(x)\) is zero. If \(\varphi(x)=a_\ell\) for some \(1\le\ell\le k\), then \(\varphi(x)\ge a_j\) holds exactly when \(j\le\ell\). Consequently, \(\sum_{j=1}^k(a_j-a_{j-1})\chi_{\{\varphi\ge a_j\}}(x)=\sum_{j=1}^{\ell}(a_j-a_{j-1})=a_\ell=\varphi(x)\). This proves the pointwise identity \(\varphi=\sum_{j=1}^k(a_j-a_{j-1})\chi_{\{\varphi\ge a_j\}}\). Multiplying by \(\chi_A\) replaces each superlevel set by its intersection with \(A\). The integral of a nonnegative simple function is the sum of its coefficients times the measures of its disjoint level sets; applying that definition to this finite decomposition gives the formula. If there are no positive values, then \(\varphi=0\) everywhere and both sides are zero. \(\square\)

The level sets in this formula are nested: \(\{\varphi\ge a_{j+1}\}\subseteq\{\varphi\ge a_j\}\). Their intersections with \(A\) are nested as well. The successive differences \(a_j-a_{j-1}\) account for the value of \(\varphi\) accumulated at each level. The intersection is essential: measuring the full superlevel set instead would compute a contribution from points outside \(A\).

The Subset Integral as a Supremum

Theorem: Let \((X,\mathcal{M},\mu)\) be any measure space, \(A\in\mathcal{M}\), and \(f:X\to[0,\infty]\) measurable. Then \(\displaystyle\int_A f\,d\mu=\sup\left\{\int_A\varphi\,d\mu:\ \varphi\text{ is nonnegative simple and }\varphi\le f\right\}.\) The equality is an equality in \([0,\infty]\); the supremum need not be attained.

Proof. By definition, \(\int_X f\chi_A\,d\mu\) is the supremum of \(\int_X\psi\,d\mu\) over nonnegative simple \(\psi\le f\chi_A\). Every such \(\psi\) vanishes on \(A^c\), since there \(0\le\psi\le f\chi_A=0\). Hence \(\psi=\psi\chi_A\) pointwise. Also \(\psi\le f\) on \(A\), and \(\psi=0\le f\) on \(A^c\), so \(\psi\) is one of the simple functions appearing on the right-hand side of the theorem. Its integral over \(X\) equals \(\int_A\psi\,d\mu\) by the definition of subset integral.

Conversely, if \(\varphi\) is nonnegative simple and \(\varphi\le f\), then \(\varphi\chi_A\) is nonnegative simple and \(\varphi\chi_A\le f\chi_A\) pointwise. Its integral over \(X\) is \(\int_A\varphi\,d\mu\). Thus each value used in the supremum on the right also occurs among the simple minorants defining \(\int_X f\chi_A\,d\mu\), and every value in the latter supremum occurs in the former. The two suprema are equal, including when they are infinite. \(\square\)

For a simple \(f\), the theorem and the level-set formula give a finite computation. For a general nonnegative measurable \(f\), the theorem says that restricting the integral is compatible with approximation from below: one may integrate simple minorants only on \(A\). It does not assert that a particular simple minorant reaches the supremum.

Worked Example: A Step Function on a Lebesgue-Measurable Subset

Take \(X=[0,4]\) with its Lebesgue sigma-algebra and Lebesgue measure \(m\). Define \(\varphi=1\) on \([0,1)\), \(\varphi=5\) on \([1,3)\), and \(\varphi=1\) on \([3,4]\) (so the first and last pieces have the same value). Let \(A=[1/2,5/2]\). Compute \(\int_A\varphi\,dm\) by the level-set formula.

The distinct positive values are \(1\) and \(5\), so the increments are \(1-0=1\) and \(5-1=4\). The set \(\{\varphi\ge1\}\) is all of \([0,4]\), and \(A\cap\{\varphi\ge1\}=A\) has measure \(5/2-1/2=2\). The set \(\{\varphi\ge5\}\) is \([1,3)\), and its intersection with \(A\) is \([1,5/2]\), of measure \(5/2-1=3/2\). Therefore

$$ \int_A\varphi\,dm =1\cdot 2+4\cdot\frac32 =2+6=8. $$

Check: On \(A\cap[0,1)=[1/2,1)\), the function has value \(1\) on a set of length \(1/2\). On \(A\cap[1,3)=[1,5/2]\), it has value \(5\) on a set of length \(3/2\). The direct sum is \(1\cdot(1/2)+5\cdot(3/2)=1/2+15/2=8\), agreeing with the level-set calculation.

Worked Example: Counting Measure and a Finite Subset

Let \(X=\mathbb{N}=\{1,2,\ldots\}\) with its power-set sigma-algebra and counting measure \(\mu\), for which \(\mu(E)\) is the number of elements of \(E\) when \(E\) is finite. Set \(\varphi(1)=2\), \(\varphi(2)=4\), \(\varphi(3)=4\), \(\varphi(4)=1\), and \(\varphi(n)=0\) for \(n\ge5\). For \(A=\{1,3,4,6\}\), find the subset integral.

The distinct positive levels are \(1,2,4\), with increments \(1,1,2\), respectively. The intersection \(A\cap\{\varphi\ge1\}\) is \(\{1,3,4\}\), which has three elements. The intersection \(A\cap\{\varphi\ge2\}\) is \(\{1,3\}\), which has two elements. The intersection \(A\cap\{\varphi\ge4\}\) is \(\{3\}\), which has one element. Hence

$$ \int_A\varphi\,d\mu =1\cdot3+1\cdot2+2\cdot1 =3+2+2=7. $$

Check: The values at the points of \(A\), in order, are \(\varphi(1)=2\), \(\varphi(3)=4\), \(\varphi(4)=1\), and \(\varphi(6)=0\). Counting measure therefore gives \(2+4+1+0=7\), the same answer.

Worked Example: A Dirac Measure Detects Set Membership

Take \(X=\mathbb{R}\) with its Borel sigma-algebra and the Dirac measure \(\delta_0\), defined by \(\delta_0(E)=1\) if \(0\in E\) and \(\delta_0(E)=0\) if \(0\notin E\). Let \(\varphi=3\) on \([-1,0]\), \(\varphi=8\) on \((0,2]\), and \(\varphi=1\) elsewhere. Compute the integral over \(A=[0,2]\).

The levels are \(1,3,8\), with increments \(1,2,5\). Since \(0\in A\) and \(\varphi(0)=3\), the atom belongs to \(A\cap\{\varphi\ge1\}\) and \(A\cap\{\varphi\ge3\}\). It does not belong to \(A\cap\{\varphi\ge8\}\), because \(\varphi(0)=3<8\). The first two intersections have Dirac measure \(1\); the third has Dirac measure \(0\). Thus

$$ \int_A\varphi\,d\delta_0 =1\cdot1+2\cdot1+5\cdot0=3. $$

Check: The only point with positive \(\delta_0\)-measure is \(0\), and \(0\in A\), so the integral is \(\varphi(0)=3\). If instead \(A=(0,2]\), then \(0\notin A\), every restricted level set has Dirac measure \(0\), and the subset integral is \(0\). The strict endpoint matters.

Disjoint Subsets and a Common Error

Proposition: Let \((X,\mathcal{M},\mu)\) be any measure space, let \(f:X\to[0,\infty]\) be measurable, and let \(A,B\in\mathcal{M}\) be disjoint. Then \(\displaystyle\int_{A\cup B}f\,d\mu=\int_A f\,d\mu+\int_B f\,d\mu,\) where the sum is in \([0,\infty]\).

Proof. Since \(A\) and \(B\) are disjoint, at each point \(x\) at most one of \(\chi_A(x)\) and \(\chi_B(x)\) is \(1\), and \(\chi_{A\cup B}=\chi_A+\chi_B\). Under the stated convention for products, this gives the pointwise identity \(f\chi_{A\cup B}=f\chi_A+f\chi_B\), also when \(f(x)=\infty\). The additivity of the nonnegative integral for arbitrary nonnegative measurable functions now gives \(\int_X f\chi_{A\cup B}\,d\mu=\int_X f\chi_A\,d\mu+\int_X f\chi_B\,d\mu\). Applying the definition of each subset integral proves the result. \(\square\)

A common mistake is to use the measures of the whole-space level sets in the level-set formula, even though the desired integral is over \(A\). In the first worked example, doing that would give \(1\cdot4+4\cdot2=12\): the whole level set \(\{\varphi\ge1\}\) has length \(4\), and \(\{\varphi\ge5\}\) has length \(2\). This is \(\int_X\varphi\,dm\), not \(\int_A\varphi\,dm\). The correction is to intersect first: the relevant measures are \(2\) and \(3/2\), giving \(1\cdot2+4\cdot(3/2)=8\). The subset determines which points contribute at every level.

Check Your Understanding

In each question, identify the measurable set used in the restriction before computing or proving the statement.

  1. For a nonnegative simple function with distinct positive values \(a_1<\cdots<a_k\), explain why the coefficient of \(\mu(A\cap\{\varphi\ge a_j\})\) is \(a_j-a_{j-1}\).
  2. On \(\mathbb{N}\) with counting measure, let \(\varphi(1)=3\), \(\varphi(2)=1\), and \(\varphi(n)=0\) for \(n\ge3\). Compute \(\int_{\{1,3\}}\varphi\,d\mu\) using restricted level sets, then check by summing the values on the subset.
  3. For a Dirac measure \(\delta_x\), what is \(\int_A\varphi\,d\delta_x\) when \(\varphi\) is nonnegative simple? Treat separately the cases \(x\in A\) and \(x\notin A\).
  4. Use the definition with \(\chi_A\) to justify the supremum formula for \(\int_A f\,d\mu\), including why a simple minorant of \(f\chi_A\) vanishes outside \(A\).
  5. Why does the level-set formula for \(\int_A\varphi\,d\mu\) generally differ from the formula for \(\int_X\varphi\,d\mu\)? State which sets must be measured in each case.
Clinical Biostats