Tutorials › Exam P - Probability › Why Factorization Is Equivalent to Independence

Exam P · Conditional Distributions and Independence · Tutorial 742 of 915

Why Factorization Is Equivalent to Independence

Use sums and integrals to connect independence with factorization of joint pmfs and densities, and recognize when the equivalence applies.

Intermediate 12 min read

What You'll Learn

  • Define independence through probabilities of events determined by each random variable
  • Prove that a factored joint pmf gives the independence relation for arbitrary sets of values
  • Derive the joint-pmf factorization from independence by considering singleton events
  • Extend the equivalence to densities using integration over rectangles and equality almost everywhere
  • Account for supports and identify why one matching probability does not establish independence
  • Apply the results to original discrete and continuous probability models

Why Factorization Characterizes Independence

For two random variables, independence means that learning the value or range of one does not change probabilities concerning the other. A joint probability mass function or density contains the full two-variable model, while the marginal distributions describe each variable separately. Factorization is the precise link between them: when the joint model factors into its marginals, probabilities over sets also factor. Conversely, independence forces that joint-marginal factorization.

This equivalence is useful because independence can be defined in terms of events, but many exam problems provide a joint pmf or density. The result lets us move carefully in either direction: from a factorized formula to independence, or from independence to the correct form of the joint distribution. This tutorial is aligned with the SOA Exam P (Probability) syllabus.

Definition: Random variables \(X\) and \(Y\) are independent if, for every pair of sets \(A\) and \(B\) of possible values, $$ P(X\in A,\;Y\in B)=P(X\in A)P(Y\in B). $$ For discrete random variables, a joint pmf is \(p_{X,Y}(x,y)=P(X=x,Y=y)\). For continuous random variables with a joint density, the joint density is denoted \(f_{X,Y}(x,y)\); the marginal pmfs and densities are denoted \(p_X,p_Y\) and \(f_X,f_Y\), respectively.

The Discrete Equivalence

For discrete variables, independence is equivalent to the joint pmf being the product of the marginal pmfs at every pair of support values. The phrase “every pair” matters: the condition is not just a check at one cell or for one event.

Theorem: If \(X\) and \(Y\) are discrete, then they are independent if and only if $$ p_{X,Y}(x,y)=p_X(x)p_Y(y) $$ for every possible pair \((x,y)\). Values outside the joint support have joint probability zero; the factorization must hold there as well when the marginal pmfs are defined as zero outside their supports.

The reason the forward direction extends from individual values to arbitrary sets is that probabilities of discrete events are sums of point probabilities. If the point probabilities factor, the double sum over \(A\) and \(B\) separates into a product of two sums. In the reverse direction, independence applies in particular to the singleton events \(X=x\) and \(Y=y\), which gives the pointwise factorization.

$$ \begin{aligned} P(X\in A,Y\in B) &=\sum_{x\in A}\sum_{y\in B}p_{X,Y}(x,y)\\ &=\sum_{x\in A}\sum_{y\in B}p_X(x)p_Y(y)\\ &=\left(\sum_{x\in A}p_X(x)\right) \left(\sum_{y\in B}p_Y(y)\right)\\ &=P(X\in A)P(Y\in B). \end{aligned} $$

The separation in the third line is valid because the summand is a product with one factor depending only on \(x\) and the other only on \(y\). For countable supports, the sums are nonnegative probability sums, so the iterated sums give the same result.

Worked Example: Factoring a Discrete Joint Model

Let \(X\) take values \(0\) and \(1\), with \(P(X=0)=1/3\) and \(P(X=1)=2/3\). Let \(Y\) take values \(0,1,2\), with probabilities \(1/2,1/3,1/6\), respectively. A hypothetical model specifies the joint pmf as the product of these two marginal pmfs. Determine whether \(X\) and \(Y\) are independent, and find \(P(X=1,\;Y\in\{0,2\})\). No interest or mortality model is involved.

Method and marginal check. Multiply each \(X\)-probability by each \(Y\)-probability. The resulting joint probabilities are:

\(X\)\(Y=0\)\(Y=1\)\(Y=2\)Row sum
0\(1/6\)\(1/9\)\(1/18\)\(1/3\)
1\(1/3\)\(2/9\)\(1/9\)\(2/3\)

For example, \(p_{X,Y}(1,0)=(2/3)(1/2)=1/3\), and \(p_{X,Y}(1,2)=(2/3)(1/6)=1/9\). The row sums are \(1/3\) and \(2/3\), matching the specified marginal probabilities of \(X\). The column sums are \(1/2,1/3,1/6\), matching the specified marginal probabilities of \(Y\). The total is \(1/3+2/3=1\).

Independence. By construction, every joint probability equals the product of the corresponding marginal probabilities. The theorem therefore gives independence.

Requested event. Add the two joint probabilities for \(X=1\) and \(Y\) in \(\{0,2\}\): \(P(X=1,Y\in\{0,2\})=1/3+1/9=4/9\). As a check, independence gives \(P(X=1)P(Y\in\{0,2\})=(2/3)(1/2+1/6)=(2/3)(2/3)=4/9\). The common mistake avoided here is to use \(P(Y=0)\) alone when the event includes both \(Y=0\) and \(Y=2\).

The Continuous Equivalence

For continuous random variables with a joint density, the corresponding statement is that the joint density equals the product of the marginal densities, except possibly on a set of area zero. Equality almost everywhere is the right condition because changing a density on a set of area zero does not change any probability obtained by integration.

Theorem: Suppose \(X\) and \(Y\) have joint density \(f_{X,Y}\) and marginal densities \(f_X\) and \(f_Y\). They are independent if and only if $$ f_{X,Y}(x,y)=f_X(x)f_Y(y) $$ for almost every \((x,y)\). In particular, integrating the factored density over any product of measurable sets \(A\times B\) gives \(P(X\in A,Y\in B)=P(X\in A)P(Y\in B)\).

To justify the forward implication, suppose the density factors almost everywhere. Integration over \(A\times B\) gives:

$$ \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} $$

For the reverse implication, if \(X\) and \(Y\) are independent, the probability of every rectangle \(A\times B\) is the product of the marginal probabilities. The function \(f_X(x)f_Y(y)\) is a joint density: its integral over the plane is \((\int f_X)(\int f_Y)=1\), and its integral over every rectangle is the required product. Thus \(f_{X,Y}\) and \(f_Xf_Y\) give the same probabilities on all rectangles. Densities defining the same probability distribution agree almost everywhere, which yields the factorization. This last conclusion does not require the two density formulas to have identical values at every individual point.

Worked Example: Integrating a Factored Density Over Events

A hypothetical continuous model has joint density \(f_{X,Y}(x,y)=x\) on \(0<x<1,\;0<y<2\), and zero elsewhere. Find the marginal densities, determine whether the variables are independent, and calculate \(P(X\leq 1/2,\;Y>1)\). No interest or mortality model is involved.

Check that the model is a density. Its total integral is \(\int_0^1\int_0^2 x\,dy\,dx=\int_0^1 2x\,dx=[x^2]_0^1=1\).

Find the marginals. For \(0<x<1\), \(f_X(x)=\int_0^2 x\,dy=2x\). For \(0<y<2\), \(f_Y(y)=\int_0^1 x\,dx=1/2\). Each marginal integrates to one: \(\int_0^1 2x\,dx=1\) and \(\int_0^2(1/2)\,dy=1\).

Check factorization and calculate. On the rectangular support, \(f_X(x)f_Y(y)=(2x)(1/2)=x=f_{X,Y}(x,y)\), so \(X\) and \(Y\) are independent. The event probabilities are \(P(X\leq 1/2)=\int_0^{1/2}2x\,dx=1/4\) and \(P(Y>1)=\int_1^2(1/2)\,dy=1/2\). Therefore \(P(X\leq 1/2,Y>1)=(1/4)(1/2)=1/8=0.1250\). Direct integration confirms it: \(\int_0^{1/2}\int_1^2 x\,dy\,dx=\int_0^{1/2}x\,dx=[x^2/2]_0^{1/2}=1/8\). The common mistake avoided is to forget that the event \(Y>1\) covers an interval of length one, not the entire support of \(Y\).

Supports, Almost-Everywhere Equality, and a Dependence Example

A density has to be integrated over its actual support. If a joint density is zero in part of the plane, a product of marginal densities that is positive there cannot match the joint density almost everywhere. The shape of the support can therefore help diagnose dependence, but the decisive test is still the factorization itself or, equivalently, the defining event relation.

Worked Example: A Triangular Support Does Not Factor

Let \(X,Y\) have joint density \(f_{X,Y}(x,y)=2\) on \(0<y<x<1\), and zero elsewhere. Determine whether they are independent by comparing a joint event probability with the product of its marginal probabilities. No interest or mortality model is involved.

Validate and find the marginals. The total integral is \(\int_0^1\int_0^x2\,dy\,dx=\int_0^1 2x\,dx=1\). For \(0<x<1\), \(f_X(x)=\int_0^x2\,dy=2x\). For \(0<y<1\), \(f_Y(y)=\int_y^1 2\,dx=2(1-y)\). Both integrate to one.

Compare event probabilities. Set \(A=\{X\leq 1/2\}\) and \(B=\{Y\leq 1/2\}\). The marginal probabilities are \(P(X\leq 1/2)=\int_0^{1/2}2x\,dx=1/4\) and \(P(Y\leq 1/2)=\int_0^{1/2}2(1-y)\,dy=[2y-y^2]_0^{1/2}=1-1/4=3/4\). Their product is \((1/4)(3/4)=3/16=0.1875\).

On the event \(X\leq 1/2\), the support already requires \(0<Y<X\), so \(Y\leq 1/2\) automatically. Thus \(P(X\leq 1/2,Y\leq 1/2)=P(X\leq 1/2)=1/4=0.2500\). The joint probability differs from the product, so the variables are dependent.

The common mistake is to multiply marginal probabilities without checking whether the joint event actually has the product probability. Here the triangular support makes the two events behave differently from independent events. In density terms, at \(x=1/2,y=3/4\), the joint density is zero while the product of the marginal density formulas is \(1\cdot(1/2)=1/2\); the formulas do not factor on the positive-area region above the diagonal.

Common Exam Traps

  • Checking only one probability. Agreement for one selected pair of events does not establish independence. Independence requires the product relation for every pair of events; for discrete variables, the pointwise factorization must hold at every support pair.
  • Using the joint formula outside its support. A density formula is not valid everywhere simply because its algebraic expression can be evaluated there. Set it to zero outside the stated support before comparing it with the marginal-density product.
  • Demanding pointwise density equality. Densities are defined only up to changes on sets of area zero. For continuous variables, factorization almost everywhere is sufficient and is the standard statement.
  • Confusing marginal multiplication with joint probability automatically. \(P(X\in A)P(Y\in B)\) equals the joint probability only when independence has been established; otherwise it is just a product of two marginal probabilities.
Key takeaway: Independence is an event-level condition. For discrete variables, it is equivalent to \(p_{X,Y}=p_Xp_Y\) at every support pair. For variables with a joint density, it is equivalent to \(f_{X,Y}=f_Xf_Y\) almost everywhere. Factorization proves independence by summing or integrating over arbitrary sets; independence gives factorization by considering singleton events or the resulting joint distribution.

Check Your Understanding

For each problem, use the event definition or the appropriate factorization theorem. Answers are provided for checking.

  1. Let \(X\) take values \(a,b\) with probabilities \(1/4,3/4\), and let \(Y\) take values \(0,1\) with probabilities \(2/5,3/5\). Suppose the joint pmf is the product of these marginals. Find \(P(X=b,Y=0)\) and state whether the variables are independent. (Answer: \(3/10\); yes, independent.)
  2. Suppose independent variables have densities \(f_X(x)=3x^2\) for \(0<x<1\) and \(f_Y(y)=1/2\) for \(0<y<2\), each zero elsewhere. Find \(f_{X,Y}(x,y)\) on its support and \(P(X\leq 1/2,\;1/2<Y<3/2)\). (Answer: \(f_{X,Y}(x,y)=3x^2/2\) on the rectangle; \(1/16=0.0625\).)
  3. A discrete joint pmf on \(X,Y\in\{0,1\}\) has row \(X=0\) equal to \((0.1,0.2)\) and row \(X=1\) equal to \((0.3,0.4)\), with columns ordered \(Y=0,1\). Are the variables independent? Check one cell using the marginals. (Answer: No; \(p_{X,Y}(0,0)=0.1\), but \(p_X(0)p_Y(0)=(0.3)(0.4)=0.12\).)
  4. For the density \(2\) on \(0<y<x<1\), zero elsewhere, calculate \(P(X\leq 1/2,Y\leq 1/2)\) and compare it with the product of the marginal probabilities. (Answer: joint probability \(1/4\); product \(3/16\); the variables are dependent.)
  5. Suppose a joint density and the product of its marginal densities differ only at a single point. Does that difference by itself rule out independence? (Answer: No. A single point has area zero, so the densities can still be equal almost everywhere and the variables can be independent.)
Clinical Biostats