Tutorials › Statistical Theory I - Probability and Distribution Theory › Independence in Absolutely Continuous Laws

Independence and Dependence · Tutorial 226 of 994

Independence in Absolutely Continuous Laws

Use marginalization and an almost-everywhere density factorization criterion to decide whether a pair of continuous random variables is independent.

Intermediate 9 min read

What You'll Learn

  • Derive marginal densities from a joint density by integration.
  • State the independence criterion for absolutely continuous pairs.
  • Account for the joint and marginal supports when checking factorization.
  • Distinguish equality almost everywhere from equality at individual points.
  • Diagnose independence in triangular-support and full rectangular-support examples.

Why Density Factorization Tests Independence

For discrete random variables, independence can be checked by comparing joint probabilities with products of marginal probabilities. For an absolutely continuous pair, the corresponding objects are densities. The comparison must be made with care: a joint density is defined only up to changes on sets of Lebesgue measure zero, and its support may not match the region where the product of the marginal densities is positive.

The practical procedure is to integrate the joint density to obtain the marginals, form their product, and check whether it agrees with the joint density almost everywhere. Support restrictions are part of that comparison, not an afterthought.

Definition: A pair \((X,Y)\) is absolutely continuous if its joint distribution has a density \(f_{X,Y}\) with respect to two-dimensional Lebesgue measure. Thus, for every Borel set \(C\subseteq\mathbb{R}^2\), $$ P\big((X,Y)\in C\big)=\int_C f_{X,Y}(x,y)\,dx\,dy, $$ where \(f_{X,Y}\geq 0\) and its integral over \(\mathbb{R}^2\) is 1. A statement about two densities holding almost everywhere means it can fail only on a set of Lebesgue measure zero.

Marginal Densities from a Joint Density

Suppose \(f_{X,Y}\) is a joint density. The marginal densities are obtained by integrating out the other coordinate. These formulas follow from Tonelli's theorem, which permits changing the order of integration for nonnegative measurable functions.

Theorem: If \((X,Y)\) has joint density \(f_{X,Y}\), then versions of its marginal densities are $$ f_X(x)=\int_{\mathbb{R}} f_{X,Y}(x,y)\,dy, \qquad f_Y(y)=\int_{\mathbb{R}} f_{X,Y}(x,y)\,dx. $$ These functions are nonnegative and integrate to 1.

For example, for every Borel set \(A\subseteq\mathbb{R}\), Tonelli's theorem gives

$$ P(X\in A) =\int_{A\times\mathbb{R}} f_{X,Y}(x,y)\,dx\,dy =\int_A\left(\int_{\mathbb{R}}f_{X,Y}(x,y)\,dy\right)dx. $$

This identifies the displayed formula for \(f_X\) as a density of \(X\); the argument for \(f_Y\) is the same. Applying Tonelli over the whole plane shows that each marginal density integrates to the total joint probability, 1. Values on exceptional null sets can be chosen arbitrarily without changing the marginal distribution.

The Density Factorization Criterion

Theorem: Suppose \((X,Y)\) is absolutely continuous, with joint density \(f_{X,Y}\) and marginal densities \(f_X\) and \(f_Y\). Then \(X\) and \(Y\) are independent if and only if $$ f_{X,Y}(x,y)=f_X(x)f_Y(y) \quad\text{for Lebesgue-almost every }(x,y)\in\mathbb{R}^2. $$

Here independence means that \(P(X\in A,Y\in B)=P(X\in A)P(Y\in B)\) for every pair of Borel sets \(A,B\subseteq\mathbb{R}\). The almost-everywhere qualification matters because densities are not unique at individual points.

Proof. First suppose the densities factor almost everywhere. For Borel sets \(A\) and \(B\), the rectangle \(A\times B\) then has probability

$$ \begin{aligned} P(X\in A,Y\in B) &=\int_A\int_B f_{X,Y}(x,y)\,dy\,dx\\ &=\int_A\int_B f_X(x)f_Y(y)\,dy\,dx\\ &=\left(\int_A f_X(x)\,dx\right) \left(\int_B f_Y(y)\,dy\right)\\ &=P(X\in A)P(Y\in B). \end{aligned} $$

The iterated integration and product separation are valid by Tonelli's theorem, since the integrands are nonnegative. Thus \(X\) and \(Y\) are independent.

Conversely, suppose \(X\) and \(Y\) are independent. Define \(g(x,y)=f_X(x)f_Y(y)\). Tonelli's theorem shows that \(g\) integrates to 1 and that the probability measure with density \(g\) assigns each rectangle \(A\times B\) probability \(P(X\in A)P(Y\in B)\). By independence, this equals the probability assigned to that rectangle by the joint distribution. Rectangles form a generating class for the Borel sets of \(\mathbb{R}^2\), so uniqueness of finite measures implies that the joint distribution and the measure with density \(g\) agree on every Borel set. Uniqueness of densities with respect to Lebesgue measure then gives \(f_{X,Y}=g\) almost everywhere. \(\square\)

Worked Examples

Worked Example: Factorization for Independent Exponential Variables

Suppose a pair has joint density $$ f_{X,Y}(x,y)= \begin{cases} 6e^{-2x-3y},&x>0,\ y>0,\\ 0,&\text{otherwise}. \end{cases} $$ Determine whether \(X\) and \(Y\) are independent.

First integrate over \(y\) to find the marginal density of \(X\). For \(x>0\), $$ f_X(x)=\int_0^\infty 6e^{-2x-3y}\,dy =6e^{-2x}\left[\frac{-e^{-3y}}{3}\right]_0^\infty =2e^{-2x}. $$ For \(x\leq 0\), \(f_X(x)=0\). Similarly, for \(y>0\), $$ f_Y(y)=\int_0^\infty 6e^{-2x-3y}\,dx =6e^{-3y}\left[\frac{-e^{-2x}}{2}\right]_0^\infty =3e^{-3y}, $$ and \(f_Y(y)=0\) for \(y\leq 0\).

On the positive quadrant, the product is $$ f_X(x)f_Y(y)=(2e^{-2x})(3e^{-3y})=6e^{-2x-3y}=f_{X,Y}(x,y). $$ Outside that quadrant, both marginals vanish in the relevant coordinate, so their product is zero, matching the joint density there. The factorization holds almost everywhere, and the criterion proves that \(X\) and \(Y\) are independent. The joint density is valid as well: its integral is \((\int_0^\infty 2e^{-2x}\,dx)(\int_0^\infty 3e^{-3y}\,dy)=1\).

Worked Example: Triangular Support Rules Out Independence

Let the joint density be $$ f_{X,Y}(x,y)= \begin{cases} 2,&0<x<y<1,\\ 0,&\text{otherwise}. \end{cases} $$ Find the marginals and decide whether the variables are independent.

For \(0<x<1\), the allowed values of \(y\) run from \(x\) to 1, so $$ f_X(x)=\int_x^1 2\,dy=2(1-x). $$ It is zero outside \(0<x<1\). For \(0<y<1\), the allowed values of \(x\) run from 0 to \(y\), giving $$ f_Y(y)=\int_0^y 2\,dx=2y. $$ It is zero outside \(0<y<1\). These are valid marginals; for instance, \(\int_0^1 2(1-x)\,dx=1\) and \(\int_0^1 2y\,dy=1\).

If the variables were independent, the joint density would equal \(4(1-x)y\) almost everywhere on the unit square. But on the region \(0<y<x<1\), the actual joint density is zero while \(4(1-x)y\) is strictly positive. This region has positive area, so the two densities disagree on a set of positive measure. Therefore \(X\) and \(Y\) are not independent. The triangular support exposes the mismatch: the joint law excludes a region where the product of the marginal densities assigns positive density.

Worked Example: Dependence Despite a Rectangular Support

On the unit square, define $$ f_{X,Y}(x,y)=1+\frac12(2x-1)(2y-1),\qquad 0<x<1,\ 0<y<1, $$ and set the density to zero elsewhere. Check whether \(X\) and \(Y\) are independent.

Since each factor \(2x-1\) and \(2y-1\) lies between \(-1\) and \(1\), the density is at least \(1-\frac12=\frac12\), so it is nonnegative. For \(0<x<1\), its marginal is $$ f_X(x)=\int_0^1\left[1+\frac12(2x-1)(2y-1)\right]dy =1+\frac12(2x-1)\int_0^1(2y-1)\,dy=1, $$ because \(\int_0^1(2y-1)\,dy=0\). By the same calculation, \(f_Y(y)=1\) on \(0<y<1\). Both marginals are uniform densities on \((0,1)\), and the joint density integrates to 1.

The product of the marginal densities is 1 throughout the unit square. However, on \(0<x<1/4\) and \(0<y<1/4\), both \(2x-1\) and \(2y-1\) are less than \(-1/2\). Their product is greater than \(1/4\), so \(f_{X,Y}(x,y)>1+1/8=9/8\) throughout that rectangle. This positive-area discrepancy rules out almost-everywhere factorization. The variables are dependent, even though the joint support is the full unit square and the marginals are both uniform.

Reading Supports and Avoiding Common Errors

A useful support check is to identify where each marginal density is positive, ignoring null-set choices, and compare that with where the joint density is positive. If the joint density vanishes on a region where \(f_X(x)f_Y(y)>0\) on a set of positive area, independence is impossible. The triangular example has exactly this feature. Independence requires the joint density to equal the product across the plane almost everywhere, including outside any proposed joint support.

A support comparison alone does not prove independence. The third example has a rectangular support compatible with the marginal supports, but its density does not factor. Even matching marginal distributions cannot settle the question: the dependence is in the joint density's variation across the square.

  • Pointwise comparison is not the criterion. Two versions of a density may differ at a single point, or on any null set, without representing different probability laws. Compare densities almost everywhere.
  • Do not compare only where the joint density is positive. If the product of the marginals is positive on a positive-area region where the joint density is zero, factorization fails.
  • Do not infer independence from the shape of the support. A rectangular support is not enough; the actual density must factor.
  • Do not use the joint density as a marginal density. Integrate over the other coordinate first, using the support to choose the correct integration limits.

The criterion is useful because it turns independence into a concrete calculation: marginalize, multiply, and compare. It also makes clear why constraints such as \(X<Y\) often induce dependence: they remove portions of the plane that the product of the marginal densities may still cover.

Check Your Understanding

Use the almost-everywhere factorization criterion in each question.

  1. For a joint density supported on \(x>0,y>0\), what two marginal integrations are needed before testing independence?
  2. Why can two density functions that differ at one point still represent the same distribution?
  3. For the density \(2\) on \(0<x<y<1\), identify a positive-area region where the joint density and the product of the marginals disagree.
  4. Does a rectangular joint support establish independence? Explain what additional comparison is required.
  5. If \(f_{X,Y}=f_Xf_Y\) almost everywhere, how does integration over a rectangle \(A\times B\) establish independence?