Tutorials › Probability Theory (Graduate) › Choosing an Integration Order in Joint-Law Problems

Product Measures and Fubini · Tutorial 205 of 946

Choosing an Integration Order in Joint-Law Problems

Use the geometry of a joint law to choose efficient sections, while checking the measure and integrability hypotheses that make the calculation valid.

Intermediate 11 min read

What You'll Learn

  • Choose section bounds that simplify marginal and expectation calculations
  • Compute joint-law integrals over triangular and unbounded regions
  • Find a transformed-variable law by changing coordinates and integrating out a nuisance variable
  • Handle a joint law with counting and Lebesgue reference measures
  • Check sigma-finiteness and integrability before changing integration order

Why the Order of Integration Matters

A joint-law problem can often be written as a double integral, but the same quantity may have very different-looking iterated integrals. One order may give constant or simple section limits; the other may require splitting the region into several pieces. Choosing carefully can turn a difficult calculation into a short one.

The choice is not merely an algebraic convenience. An iterated-integral identity needs appropriate measure-theoretic hypotheses. In the density setting used here, we assume the two reference measures are sigma-finite. For signed or complex integrands, we also check absolute integrability before changing order.

Working setup: Let \((E,\mathcal E,\mu)\) and \((F,\mathcal F,\nu)\) be measure spaces with sigma-finite measures, and use the product measure \(\mu\times\nu\). A joint law with density \(f\) means \(f:E\times F\to[0,\infty]\) is measurable and \(\int f\,d(\mu\times\nu)=1\). Iterated integrals below are justified by Tonelli's theorem for nonnegative integrands and by Fubini's theorem for absolutely integrable ones.

A Practical Choice of Order

For a region \(D\subseteq E\times F\), first describe its sections. For a fixed \(x\), the vertical section is \(D_x=\{y:(x,y)\in D\}\); for a fixed \(y\), the horizontal section is \(D^y=\{x:(x,y)\in D\}\). The bounds of these sections determine the two possible iterated integrals.

A useful decision process is to identify the quantity, compare both section descriptions, and then verify the hypotheses for the chosen order. In particular, a nonnegative integrand can be handled by Tonelli's theorem, even if its integral might be infinite. A signed or complex integrand requires absolute integrability for the unrestricted Fubini order switch.

1
Write the quantity as a joint integral.
For an expectation, the integrand is the desired function of the two coordinates multiplied by the joint density.
2
Describe sections in both directions.
Determine the limits when the first coordinate is fixed and when the second coordinate is fixed. Look for limits that are constant or make the integrand easy to integrate.
3
Check the theorem's hypotheses.
Use sigma-finite reference measures. For a signed integrand, establish that the integral of its absolute value is finite before asserting equality of the two orders.
4
Calculate and check the result.
Use the simpler order, retain the section limits throughout, and verify normalization or other probability constraints where relevant.

Marginals and Expectations

Suppose \(U\) and \(V\) have a joint density \(f\) with respect to \(\mu\times\nu\). Integrating out one coordinate gives a density for the other coordinate. The theorem below states this precisely and explains why the section integral is legitimate.

Theorem: If \(f\geq 0\) is measurable and \(\int f\,d(\mu\times\nu)=1\), then the marginal laws of \(U\) and \(V\) have densities \(f_U(x)=\int_F f(x,y)\,d\nu(y)\) with respect to \(\mu\), and \(f_V(y)=\int_E f(x,y)\,d\mu(x)\) with respect to \(\nu\). These section integrals are defined almost everywhere; they may be assigned arbitrary values on any exceptional null sets.
Proof. For any \(A\in\mathcal E\), the definition of the joint density and Tonelli's theorem give $$ \mathbb P(U\in A) =\int_{E\times F}\mathbf 1_A(x)f(x,y)\,d(\mu\times\nu)(x,y) =\int_A\left(\int_F f(x,y)\,d\nu(y)\right)d\mu(x). $$ Thus the displayed section integral is a density of the law of \(U\). Taking \(A=E\) shows that its integral is \(1\), so it is finite almost everywhere. For any \(B\in\mathcal F\), applying the same argument with \(\mathbf 1_B(y)\) gives $$ \mathbb P(V\in B) =\int_B\left(\int_E f(x,y)\,d\mu(x)\right)d\nu(y), $$ which proves the assertion for \(V\) as well. \(\square\)

More generally, for a measurable function \(h\), the expectation is calculated from \(\mathbb E[h(U,V)]=\int h(x,y)f(x,y)\,d(\mu\times\nu)(x,y)\), whenever the expectation is defined. For \(h\geq0\), Tonelli permits either order. For a real- or complex-valued \(h\), the standard sufficient condition for changing order is \(\int |h|f\,d(\mu\times\nu)<\infty\).

Worked Example: Marginals on a Triangle

Let the joint density with respect to two-dimensional Lebesgue measure be \(f(x,y)=2\) on \(0<x<y<1\), and \(0\) elsewhere. To check normalization, integrate over the triangle using \(x\) as the inner variable:

$$ \int_0^1\int_0^y 2\,dx\,dy =\int_0^1 2y\,dy =1. $$

For the marginal density of \(V\), fixing \(y\) leaves \(0<x<y\), so \(f_V(y)=2y\) for \(0<y<1\). For the marginal density of \(U\), fixing \(x\) leaves \(x<y<1\), so

$$ f_U(x)=\int_x^1 2\,dy=2(1-x),\qquad 0<x<1. $$

The second order is the simpler one for the expectation of \(U\), since its marginal is already available:

$$ \mathbb E[U] =\int_0^1 x\,2(1-x)\,dx =2\left(\frac12-\frac13\right) =\frac13. $$

The section limits differ: \(0<x<y\) when \(y\) is fixed, but \(x<y<1\) when \(x\) is fixed. Writing the limits explicitly prevents confusing the two marginals.

Choosing an Order for a Transformed Variable

A transformed variable \(T(U,V)\) can be studied through its law: for a measurable set \(C\), its probability is the joint integral of the indicator that \(T(x,y)\in C\). Often the most useful order is the one that makes this preimage simple. A coordinate change can make the same idea especially transparent, provided the transformed region and Jacobian are both handled correctly.

Theorem: Let \(T:E\times F\to G\) be measurable and let \(h:G\to[0,\infty]\) be measurable. If \((U,V)\) has joint density \(f\), then $$ \mathbb E[h(T(U,V))] =\int_{E\times F}h(T(x,y))f(x,y)\,d(\mu\times\nu)(x,y). $$ The identity also holds for real- or complex-valued \(h\) when the corresponding absolute expectation is finite.
Proof. Define the law of \(T(U,V)\) by \(Q(C)=\mathbb P(T(U,V)\in C)\) for measurable \(C\subseteq G\). For an indicator \(h=\mathbf 1_C\), the claimed identity is exactly the definition of the joint density applied to the measurable preimage \(T^{-1}(C)\). By linearity it follows for nonnegative simple functions. Every nonnegative measurable \(h\) is an increasing limit of nonnegative simple functions; the monotone convergence theorem on both sides gives the identity for \(h\). For an integrable real- or complex-valued \(h\), apply the nonnegative result to its positive and negative parts, or to its real and imaginary parts, and use the assumed absolute integrability. \(\square\)

Worked Example: The Difference on an Unbounded Region

Let \(f(x,y)=e^{-x}\) on the region \(0<y<x<\infty\), and let it be zero elsewhere. Its total integral is

$$ \int_0^\infty\int_0^x e^{-x}\,dy\,dx =\int_0^\infty x e^{-x}\,dx =1. $$

The last integral equals \(1\) by integration by parts: its boundary term \(-xe^{-x}\) vanishes at both endpoints, and the remaining integral is \(\int_0^\infty e^{-x}\,dx=1\). Consider \(S=U-V\), which is positive on the support. For a measurable \(C\subseteq(0,\infty)\), use the coordinates \(u=x-y\), \(v=y\). Then \(x=u+v\), \(y=v\), the Jacobian determinant has absolute value \(1\), and the region becomes \(u>0,v>0\). Therefore

$$ \mathbb P(S\in C) =\int_C\int_0^\infty e^{-(u+v)}\,dv\,du =\int_C e^{-u}\,du. $$

The inner integral is \(\int_0^\infty e^{-v}\,dv=1\). Thus \(S\) has density \(e^{-u}\) on \(u>0\). Integrating in \(v\) first is natural because it separates the exponential into \(e^{-u}e^{-v}\) and leaves a constant inner integral. The change of variables is legitimate here on the open quadrant, where it is one-to-one with Jacobian determinant \(1\).

Mixed Counting-and-Lebesgue Integrals

Not every joint law has two continuous coordinates. If one coordinate takes values in a countable set, counting measure provides a reference measure for that coordinate. Counting measure on a countable set is sigma-finite, so it can be combined with Lebesgue measure in the product setup above. The order choice then amounts to deciding whether to sum first or integrate first.

Worked Example: A Countable Coordinate and a Continuous Coordinate

On \(\mathbb N_0\times[0,1]\), use counting measure on \(\mathbb N_0\) and Lebesgue measure on \([0,1]\). Define \(f(n,u)=2^{-(n+1)}\) for \(n\in\mathbb N_0\) and \(0\leq u\leq1\). This is a probability density because

$$ \sum_{n=0}^{\infty}\int_0^1 2^{-(n+1)}\,du =\sum_{n=0}^{\infty}2^{-(n+1)} =1. $$

For the expectation of \(NU\), the integrand \(nu f(n,u)\) is nonnegative, so Tonelli's theorem allows either order. Integrating in \(u\) first gives

$$ \sum_{n=0}^{\infty}n2^{-(n+1)}\int_0^1u\,du =\frac12\sum_{n=0}^{\infty}\frac{n}{2^{n+1}} =\frac12. $$

Here \(\sum_{n=0}^{\infty}n/2^{n+1}=1\), as follows by differentiating the geometric series \(\sum_{n=0}^{\infty}r^n=(1-r)^{-1}\) for \(0<r<1\) and setting \(r=1/2\). Alternatively, summing first gives

$$ \int_0^1 u\left(\sum_{n=0}^{\infty}n2^{-(n+1)}\right)du =\int_0^1u\,du =\frac12. $$

Both calculations agree. The use of Tonelli is justified: counting measure on \(\mathbb N_0\) is sigma-finite, Lebesgue measure on \([0,1]\) is finite, and the integrand is nonnegative.

What Must Be Checked Before Switching

The phrase “change the order of integration” is not a license to interchange arbitrary iterated integrals. Two checks matter especially in joint-law calculations.

  • Reference measures: In the product-measure results used here, both reference measures are sigma-finite. Countable counting measure and Lebesgue measure are sigma-finite; counting measure on an uncountable set is not. A probability density on a product must not be used to justify a Tonelli or Fubini conclusion if the stated measure hypotheses fail.
  • Integrand: A nonnegative measurable integrand satisfies Tonelli's order identity, with infinite values allowed. For a signed or complex integrand, verify absolute integrability before using Fubini to equate the iterated integrals.
  • Sections: Set the limits from the region, not from a sketch alone. On a triangle, fixing \(x\) and fixing \(y\) usually produce different limits; on an unbounded region, the limits may extend to infinity.

In probability applications, the density \(f\) itself is nonnegative and has integral \(1\), so it is integrable. But an expectation adds another factor \(h\). If \(h\) is unbounded or changes sign, finiteness of the probability integral alone does not establish \(\int |h|f<\infty\). The absolute-integrability check is the safeguard that makes an order switch valid.

Takeaway: Choose the order that simplifies the sections, but make the choice only after identifying the product measures and classifying the integrand as nonnegative or absolutely integrable.

Check Your Understanding

For each question, identify both the useful computational idea and the condition that justifies it.

  1. For a density supported on \(0<x<y<1\), what are the section limits when computing the marginal density of \(U\)?
  2. Which theorem permits either order for a nonnegative measurable integrand, and what measure-space hypothesis is being used here?
  3. For a signed expectation, what integrability condition should be checked before switching the order?
  4. In the difference example, why do the coordinates \(u=x-y\) and \(v=y\) simplify the region and integrand?
  5. Why does countable counting measure combined with Lebesgue measure satisfy the sigma-finiteness condition?
Clinical Biostats