Tutorials › Measure Theory › Factorization of Expectations Under Independence

Expectation, Conditional Expectation and Independence · Tutorial 751 of 798

Factorization of Expectations Under Independence

Learn when independence permits product expectations to separate, why the factorization holds, and how to compute it for discrete distributions and densities.

Advanced 10 min read

What You'll Learn

  • State independence using the sigma-algebras generated by random variables
  • Relate independence to the product of the marginal probability laws
  • Prove factorization first for nonnegative functions and then for integrable signed functions
  • Check integrability of a product before computing its expectation
  • Compute product expectations for discrete laws and independent densities
  • Identify the error in factoring expectations of dependent random variables

When Does an Expectation Factor?

If \(X\) and \(Y\) are independent, information about one does not change the law of the other. One important consequence is that, for suitable measurable functions \(f\) and \(g\), the expectation of \(f(X)g(Y)\) is the product of the separate expectations. The hypotheses matter: independence is essential, and the expectations must be defined. We will first derive the result for nonnegative functions, then use positive and negative parts to handle integrable real-valued functions.

Throughout, \((\Omega,\mathcal{F},\mathbb{P})\) is a probability space, hence a finite measure space; it is not assumed complete. The random variables \(X,Y:\Omega\to\mathbb{R}\) are measurable, and functions of real variables below are Borel measurable and real-valued. Expectations are Lebesgue integrals with respect to \(\mathbb{P}\). The variables \(X\) and \(Y\) are independent if the sigma-algebras \(\sigma(X)\) and \(\sigma(Y)\) are independent: for every \(A\in\sigma(X)\) and \(B\in\sigma(Y)\), \(\mathbb{P}(A\cap B)=\mathbb{P}(A)\mathbb{P}(B)\).

Definition: The law of \(X\) is the Borel probability measure \(\mu_X\) on \(\mathbb{R}\) given by \(\mu_X(C)=\mathbb{P}(X\in C)\) for \(C\in\mathcal{B}_{\mathbb{R}}\). The joint law \(\mu_{X,Y}\) is the Borel probability measure on \(\mathbb{R}^2\) given by \(\mu_{X,Y}(D)=\mathbb{P}((X,Y)\in D)\) for \(D\in\mathcal{B}_{\mathbb{R}^2}\).

For Borel sets \(C,D\subseteq\mathbb{R}\), independence gives \(\mu_{X,Y}(C\times D)=\mu_X(C)\mu_Y(D)\). The product probability measure \(\mu_X\times\mu_Y\) has the same value on every such rectangle. Rectangles form a pi-system generating \(\mathcal{B}_{\mathbb{R}^2}\); by the standard uniqueness theorem for probability measures on a generating pi-system, the two measures agree on all Borel sets. Thus \(\mu_{X,Y}=\mu_X\times\mu_Y\). This identifies the joint law; the factorization of expectations follows from integrating functions against it.

Factorization for Nonnegative Functions

Proposition: Let \(X,Y\) be independent real-valued random variables on \((\Omega,\mathcal{F},\mathbb{P})\). If \(u,v:\mathbb{R}\to[0,\infty)\) are Borel measurable and \(\mathbb{E}[u(X)]<\infty\) and \(\mathbb{E}[v(Y)]<\infty\), then \(u(X)v(Y)\) is integrable and $$ \mathbb{E}[u(X)v(Y)]=\mathbb{E}[u(X)]\,\mathbb{E}[v(Y)]. $$

Proof. Write \(\mu_X,\mu_Y\) for the marginal laws. First suppose \(u\) and \(v\) are nonnegative simple functions, with disjoint level sets \(A_i\) and \(B_j\), so \(u=\sum_i a_i\chi_{A_i}\) and \(v=\sum_j b_j\chi_{B_j}\). Using \(\mu_{X,Y}=\mu_X\times\mu_Y\), the integral of \(u(x)v(y)\) against the joint law is

$$ \sum_{i,j}a_i b_j\,\mu_X(A_i)\mu_Y(B_j) =\left(\sum_i a_i\mu_X(A_i)\right) \left(\sum_j b_j\mu_Y(B_j)\right). $$

Each sum in parentheses is the integral of the corresponding simple function against its marginal law. This proves the identity for simple \(u,v\).

For general nonnegative Borel \(u,v\), choose nonnegative simple Borel functions \(u_n\uparrow u\) and \(v_n\uparrow v\). Such sequences are obtained by rounding values down to dyadic levels and truncating at increasing finite bounds. Since both sequences are nondecreasing, \(u_nv_n\uparrow uv\) pointwise. The Monotone Convergence Theorem applies to each sequence of integrands on the respective probability spaces, including the joint-law space. Therefore, $$ \int_{\mathbb{R}^2}u(x)v(y)\,d(\mu_X\times\mu_Y) =\lim_n\int_{\mathbb{R}^2}u_n(x)v_n(y)\,d(\mu_X\times\mu_Y) =\left(\int u\,d\mu_X\right)\left(\int v\,d\mu_Y\right). $$ The last equality follows by taking limits of the simple-function identity; both marginal integrals are finite by hypothesis. The left side is consequently finite. By the definition of the laws and integration of nonnegative measurable functions, this is exactly the asserted expectation and integrability. \(\square\)

Theorem (Factorization for integrable functions): Let \(X,Y\) be independent real-valued random variables on \((\Omega,\mathcal{F},\mathbb{P})\). If \(f,g:\mathbb{R}\to\mathbb{R}\) are Borel measurable, \(\mathbb{E}[|f(X)|]<\infty\), and \(\mathbb{E}[|g(Y)|]<\infty\), then \(f(X)g(Y)\) is integrable and $$ \mathbb{E}[f(X)g(Y)]=\mathbb{E}[f(X)]\,\mathbb{E}[g(Y)]. $$

Proof. Apply the proposition to \(u=|f|\) and \(v=|g|\). Its hypotheses hold by the stated integrability assumptions, and it gives $$ \mathbb{E}[|f(X)g(Y)|] =\mathbb{E}[|f(X)|]\mathbb{E}[|g(Y)|]<\infty. $$ Thus the product is integrable. Define \(f^+=\max(f,0)\), \(f^-=\max(-f,0)\), and likewise \(g^+,g^-\). All four functions are nonnegative and have finite expectation after composition with the appropriate random variable, since \(f^+,f^-\le |f|\) and \(g^+,g^-\le |g|\). Applying the proposition to each of the four pairs and using linearity for integrable random variables gives $$ \begin{aligned} \mathbb{E}[f(X)g(Y)] &=\mathbb{E}[f^+(X)g^+(Y)]-\mathbb{E}[f^+(X)g^-(Y)]\\ &\quad-\mathbb{E}[f^-(X)g^+(Y)]+\mathbb{E}[f^-(X)g^-(Y)]\\ &=(\mathbb{E}[f^+(X)]-\mathbb{E}[f^-(X)]) (\mathbb{E}[g^+(Y)]-\mathbb{E}[g^-(Y)])\\ &=\mathbb{E}[f(X)]\mathbb{E}[g(Y)]. \end{aligned} $$ The decomposition and linearity are valid because the absolute expectation of the product is finite, as shown above. \(\square\)

Computations from Discrete Laws and Densities

Worked Example: Two Independent Bernoulli Variables

Let \(X,Y\) be independent, with \(\mathbb{P}(X=1)=1/3\), \(\mathbb{P}(X=0)=2/3\), \(\mathbb{P}(Y=1)=1/2\), and \(\mathbb{P}(Y=0)=1/2\). Compute \(\mathbb{E}[(2X-1)Y]\) by factorization and directly from the joint law.

Both variables have finite support, so every function used here is integrable. First, $$ \mathbb{E}[2X-1]=2\cdot\frac13-1=-\frac13,\qquad \mathbb{E}[Y]=1\cdot\frac12+0\cdot\frac12=\frac12. $$ The factorization theorem gives \(\mathbb{E}[(2X-1)Y]=(-1/3)(1/2)=-1/6\).

For a direct check, independence gives joint probabilities \(1/6,1/6,1/3,1/3\) at \((1,1),(1,0),(0,1),(0,0)\), respectively. The product \((2x-1)y\) at these points is \(1,0,-1,0\). Hence the expectation is $$ 1\cdot\frac16+0\cdot\frac16+(-1)\cdot\frac13+0\cdot\frac13 =\frac16-\frac13=-\frac16. $$ The direct computation agrees with the factorization.

Worked Example: Independent Variables with Densities

Suppose \(X,Y\) are independent and each has the uniform density \(1\) on \([0,1]\), zero outside. Compute \(\mathbb{E}[X^2(1+Y)]\).

The functions \(f(x)=x^2\) and \(g(y)=1+y\) are bounded on \([0,1]\), so their compositions are integrable. Direct one-dimensional integration gives $$ \mathbb{E}[X^2]=\int_0^1x^2\,dx=\left[\frac{x^3}{3}\right]_0^1=\frac13, \qquad \mathbb{E}[1+Y]=\int_0^1(1+y)\,dy =\left[y+\frac{y^2}{2}\right]_0^1=\frac32. $$ Thus the product expectation is \((1/3)(3/2)=1/2\).

To check by the joint density, independence makes the joint density equal to \(1\) on \([0,1]^2\). Integrating the product there, $$ \int_0^1\int_0^1 x^2(1+y)\,dy\,dx =\int_0^1 x^2\left[y+\frac{y^2}{2}\right]_0^1dx =\int_0^1\frac32x^2\,dx =\frac32\cdot\frac13=\frac12. $$ Both computations give the same value.

Worked Example: A Discrete Law with a Signed Function

Let \(X,Y\) be independent. Give \(X\) probabilities \(1/2,1/3,1/6\) at \(0,1,2\), respectively; give \(Y\) probabilities \(1/4,3/4\) at \(-1,2\), respectively. Find \(\mathbb{E}[X\,Y^2]\).

All values are finite, so \(X\), \(Y^2\), and their product are integrable. The marginal expectations are $$ \mathbb{E}[X]=0\cdot\frac12+1\cdot\frac13+2\cdot\frac16=\frac23, \qquad \mathbb{E}[Y^2]=(-1)^2\cdot\frac14+2^2\cdot\frac34 =\frac14+3=\frac{13}{4}. $$ Factorization gives \(\mathbb{E}[XY^2]=(2/3)(13/4)=13/6\).

For a direct check, the joint probabilities for \(X=1\) paired with \(Y=-1,2\) are \(1/12,1/4\); for \(X=2\) they are \(1/24,1/8\). The two points with \(X=0\) contribute zero. The corresponding values \(xy^2\) are \(1,4,2,8\), so the nonzero contributions are $$ 1\cdot\frac1{12}+4\cdot\frac14+2\cdot\frac1{24}+8\cdot\frac18 =\frac1{12}+1+\frac1{12}+1=\frac{13}{6}. $$ This verifies the answer using the joint probabilities.

Why Independence Cannot Be Omitted

A common mistake is to factor an expectation simply because the integrand is a product. The theorem requires independence of the random variables, not merely integrability of each factor. For a concrete counterexample, let \(X=Y\) be a single random variable with \(\mathbb{P}(X=1)=\mathbb{P}(X=-1)=1/2\). Then both variables are integrable, but they are not independent: for example, \(\mathbb{P}(X=1,Y=1)=1/2\), whereas \(\mathbb{P}(X=1)\mathbb{P}(Y=1)=1/4\).

The incorrect calculation would be $$ \mathbb{E}[XY]=\mathbb{E}[X]\mathbb{E}[Y]=0\cdot0=0. $$ But \(XY=X^2=1\) at both possible outcomes, so the correct value is \(\mathbb{E}[XY]=1\). This example also checks that all expectations exist; the failure is specifically the missing independence hypothesis.

There is a second issue to check before applying the theorem: finiteness. An expectation of a signed random variable is defined as a finite Lebesgue integral only when its absolute value has finite expectation. The theorem's separate assumptions \(\mathbb{E}|f(X)|<\infty\) and \(\mathbb{E}|g(Y)|<\infty\) guarantee both that the product is integrable and that the displayed factorization is an equality of finite real numbers. For nonnegative functions, the proposition likewise assumes both separate expectations finite, avoiding any ambiguous product involving zero and infinity.

Check Your Understanding

For each question, identify the independence and integrability conditions that justify the calculation.

  1. If \(X,Y\) are independent with \(\mathbb{E}|X|<\infty\) and \(\mathbb{E}|Y|<\infty\), what does the factorization theorem say about \(\mathbb{E}[XY]\)?
  2. Suppose \(X,Y\) are independent and nonnegative, with \(\mathbb{E}[X]=2\) and \(\mathbb{E}[Y]=5\). Find \(\mathbb{E}[XY]\) and state why the product is integrable.
  3. For independent uniform random variables on \([0,1]\), compute \(\mathbb{E}[X(1+Y)]\).
  4. In the example where \(X=Y\) takes values \(-1\) and \(1\) with equal probabilities, compute \(\mathbb{E}[XY]\) and explain why factoring is invalid.
  5. Why are separate absolute-integrability assumptions used for the signed-function theorem?