Tutorials › VEE Mathematical Statistics › Independence as Factorization of a Joint Law

VEE Mathematical Statistics · Joint Distributions and Marginals · Tutorial 275 of 880

Independence as Factorization of a Joint Law

Use marginal laws to decide whether a joint law factors, and calculate event probabilities when independence holds.

Intermediate 11 min read

What You'll Learn

  • Define independence for events and for random variables
  • Factor a discrete joint probability mass function into its marginals
  • Factor a joint density and handle equality almost everywhere
  • Recognize how factorization applies to a mixed discrete-continuous law
  • Avoid inferring independence from a single matching probability
  • Calculate joint event probabilities using independence

Why Factorization Matters

A joint distribution describes two random variables together; their marginal distributions describe each variable separately. Independence is the special case in which knowing the joint law gives no additional connection between the variables: probabilities for joint events factor into the corresponding marginal probabilities. This relationship is useful both for recognizing an independent model and for simplifying calculations once independence is established.

The key is to compare the whole joint law with the marginals. A single event or outcome can happen to have a probability equal to the product of its marginal probabilities even when the variables are dependent. The factorization must hold throughout the joint distribution, not just at one convenient point.

Definition: Events \(A\) and \(B\) are independent if \(P(A\cap B)=P(A)P(B)\). Random variables \(X\) and \(Y\) are independent if \(P(X\in C,\ Y\in D)=P(X\in C)P(Y\in D)\) for every pair of measurable sets \(C\) and \(D\). Thus, independence of random variables requires independence for every pair of events defined by their values.

For a discrete pair, the measurable sets can be built from possible values of \(X\) and \(Y\). The joint probability mass function is \(p_{X,Y}(x,y)=P(X=x,Y=y)\), and the marginal mass functions are \(p_X(x)=P(X=x)\) and \(p_Y(y)=P(Y=y)\). The factorization condition is

$$ p_{X,Y}(x,y)=p_X(x)p_Y(y) $$

for every pair of possible values \(x,y\), including pairs with zero probability. For a continuous pair with joint density \(f_{X,Y}\) and marginal densities \(f_X\) and \(f_Y\), the corresponding condition is

$$ f_{X,Y}(x,y)=f_X(x)f_Y(y) $$

for almost every \((x,y)\). “Almost every” allows differences on sets of area zero, which do not affect probabilities computed by integration. In either case, the marginals must first be obtained from the joint law; they are not guessed from the factorization one hopes to find.

Why the Joint Mass Function Must Factor

The discrete condition follows directly from the definition of independence. If \(X\) and \(Y\) are independent, take the events \(A=\{X=x\}\) and \(B=\{Y=y\}\). Then \(P(X=x,Y=y)=P(X=x)P(Y=y)\), which is exactly the mass-function factorization.

The converse also holds. Suppose the factorization holds for every pair of possible values. For any sets \(C\) and \(D\), sum the joint probabilities over their values:

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

The sums can be rearranged in this way because all terms are nonnegative. This proves independence for every pair of value sets, rather than only for individual outcomes. The density result has the same structure: when the joint density factors, integrating over \(C\times D\) separates into the product of the two marginal integrals.

Worked Example: Checking a Discrete Factorization

In a hypothetical portfolio review, let \(X\) indicate whether a randomly selected record has a missing field (\(X=1\) for yes, \(X=0\) for no). Let \(Y\) indicate whether the record is flagged for a secondary review (\(Y=1\) for yes, \(Y=0\) for no). The specified joint probability table is:

\(X\)\(Y=0\)\(Y=1\)
\(X=0\)0.280.12
\(X=1\)0.420.18

The table is the full model; no interest rate or mortality assumption enters this probability calculation. Find the marginals, determine whether \(X\) and \(Y\) are independent, and calculate the probability that a record has a missing field or is flagged.

Method. Sum rows and columns to obtain the marginals, then compare each joint cell with the product of its marginal probabilities.

Step 1: Find the marginal probabilities. The row sums give \(P(X=0)=0.28+0.12=0.40\) and \(P(X=1)=0.42+0.18=0.60\). The column sums give \(P(Y=0)=0.28+0.42=0.70\) and \(P(Y=1)=0.12+0.18=0.30\). The four cells sum to \(1.00\), as required for a probability table.

Step 2: Check factorization. For example, \(P(X=1,Y=1)=0.18\), while \(P(X=1)P(Y=1)=0.60(0.30)=0.18\). Checking all cells gives \(0.40(0.70)=0.28\), \(0.40(0.30)=0.12\), \(0.60(0.70)=0.42\), and \(0.60(0.30)=0.18\). Each matches the joint table, so \(X\) and \(Y\) are independent.

Step 3: Calculate the requested probability. Let \(A=\{X=1\}\) and \(B=\{Y=1\}\). “A missing field or flagged” is \(A\cup B\), so

$$ P(A\cup B)=P(A)+P(B)-P(A\cap B) =0.60+0.30-0.18=0.72. $$

The result is \(0.7200\) to four decimal places. Check: adding the three table cells in \(A\cup B\) gives \(0.42+0.12+0.18=0.72\), the same answer. The common mistake avoided here is adding \(P(A)\) and \(P(B)\) without subtracting their overlap.

Factorization for Continuous and Mixed Laws

For continuous random variables, a density value is not itself a probability. Probabilities come from integrating the density over a region. If the joint density factors into the product of its marginal densities, then for measurable sets \(C,D\),

$$ \begin{aligned} P(X\in C,Y\in D) &=\int_C\int_D f_{X,Y}(x,y)\,dy\,dx\\ &=\int_C\int_D f_X(x)f_Y(y)\,dy\,dx\\ &=\left(\int_C f_X(x)\,dx\right) \left(\int_D f_Y(y)\,dy\right). \end{aligned} $$

The last expression is \(P(X\in C)P(Y\in D)\), establishing independence. Conversely, independence implies this product form for the joint density, apart from sets of area zero. A pointwise comparison at one pair \((x,y)\) is not enough: densities can be changed at individual points without changing any probability.

A joint law can also combine a discrete variable and a continuous variable. In that case, the joint law is described by a mass-density function: for each discrete value \(x\), the function \(g_x(y)\) gives joint probability per unit of continuous \(y\). Independence means this function factors as \(p_X(x)f_Y(y)\) for each discrete value and almost every \(y\). Summing these functions over \(x\) gives the marginal density of \(Y\).

Worked Example: Verifying a Continuous Density Product

Suppose a hypothetical pair of nonnegative operational measurements has joint density \(f_{X,Y}(x,y)=6xy\) for \(0<x<1\) and \(0<y<1\), and zero elsewhere. Find the marginal densities, determine independence by factorization, and calculate \(P(X\leq 1/2,\ Y>1/2)\). This is a continuous model with support parameters \(0<x<1,\ 0<y<1\); interest and mortality assumptions are not involved.

Method. Integrate the joint density over the other variable to obtain each marginal, then multiply the marginal probabilities for the requested rectangle if factorization holds.

Step 1: Find \(f_X(x)\). For \(0<x<1\),

$$ f_X(x)=\int_0^1 6xy\,dy =6x\left[\frac{y^2}{2}\right]_0^1 =3x. $$

Outside \(0<x<1\), \(f_X(x)=0\). Similarly, for \(0<y<1\),

$$ f_Y(y)=\int_0^1 6xy\,dx =6y\left[\frac{x^2}{2}\right]_0^1 =3y, $$

and \(f_Y(y)=0\) outside that interval. Each marginal integrates to one: \(\int_0^1 3x\,dx=3/2\) is not one, so this proposed density needs careful normalization before it can be used.

Indeed, integrating the stated joint function gives \(\int_0^1\int_0^1 6xy\,dy\,dx=6(1/2)(1/2)=1.5\), not \(1\). Thus \(6xy\) is not a valid joint density. This is an important model check: a product-looking expression does not become a probability density unless it is normalized.

Correct the model and continue. Replace the coefficient \(6\) by \(4\), so the specified joint density is \(f_{X,Y}(x,y)=4xy\) on the unit square and zero elsewhere. Its total integral is \(4(1/2)(1/2)=1\). The marginals are now \(f_X(x)=2x\) and \(f_Y(y)=2y\) on \((0,1)\), each integrating to one. Their product is \(4xy=f_{X,Y}(x,y)\), so the corrected pair is independent.

Step 2: Calculate the event probability. The marginal probability \(P(X\leq 1/2)\) is

$$ \int_0^{1/2}2x\,dx=\left[x^2\right]_0^{1/2}=\frac14. $$

The other marginal probability is

$$ P(Y>1/2)=\int_{1/2}^1 2y\,dy =\left[y^2\right]_{1/2}^1=1-\frac14=\frac34. $$

By independence, the joint probability is \((1/4)(3/4)=3/16=0.1875\). Direct integration checks the result: \(\int_0^{1/2}\int_{1/2}^1 4xy\,dy\,dx=(1/4)(3/4)=3/16\). The trap avoided is using a non-normalized function as though it were a valid density; always check its total integral first.

Worked Example: Factorization in a Mixed Law

Let \(X\) record one of two processing routes, \(0\) or \(1\), and let \(Y\) be a continuous completion time measured in hours. The model assigns the joint mass-density functions \(g_0(y)=0.10\) and \(g_1(y)=0.30\) for \(0<y<2\), with both functions zero otherwise. Determine whether \(X\) and \(Y\) are independent, then find the probability that the route is \(1\) and completion time is between \(0.5\) and \(1.5\) hours. These are hypothetical model probabilities; no interest or mortality assumption applies.

Method. Integrate each mass-density function to obtain the discrete marginal, add them to obtain the continuous marginal, and check their product.

Step 1: Obtain the marginal distribution of \(X\).

$$ P(X=0)=\int_0^2 0.10\,dy=0.20,\qquad P(X=1)=\int_0^2 0.30\,dy=0.60. $$

These probabilities sum to \(0.80\), not \(1\). Therefore the stated functions do not define a valid joint probability law. The calculation cannot proceed as if they were a probability model.

Correct the model. For a valid mixed law, use \(g_0(y)=0.20\) and \(g_1(y)=0.30\) on \(0<y<2\), and zero otherwise. Then \(P(X=0)=0.20(2)=0.40\) and \(P(X=1)=0.30(2)=0.60\); these sum to one. The marginal density of \(Y\) is \(f_Y(y)=g_0(y)+g_1(y)=0.50\) on \((0,2)\), which also integrates to one.

Step 2: Check factorization. For \(X=0\), \(P(X=0)f_Y(y)=0.40(0.50)=0.20=g_0(y)\). For \(X=1\), \(P(X=1)f_Y(y)=0.60(0.50)=0.30=g_1(y)\). Thus the mixed joint law factors, and \(X\) and \(Y\) are independent.

Step 3: Calculate the requested probability. The interval from \(0.5\) to \(1.5\) has length \(1\), so

$$ P(X=1,\ 0.5<Y<1.5) =\int_{0.5}^{1.5}g_1(y)\,dy =0.30(1)=0.30. $$

Equivalently, \(P(X=1)P(0.5<Y<1.5)=0.60(0.50)=0.30\). The result is \(0.3000\) to four decimal places. The common mistake avoided is failing to check that all mass-density components together integrate to one.

What Factorization Does—and Does Not—Tell You

Factorization is a statement about the entire joint law, not just about whether the marginal distributions look familiar or have convenient formulas. Two variables may have simple marginals and still be dependent. Likewise, one cell of a discrete table can match its marginal product by coincidence while other cells do not.

A useful exam procedure is to state the model, compute the marginals, and then check the appropriate factorization. For a discrete model, check every possible pair of values. For a continuous model, verify a valid joint density, derive both marginal densities, and compare the joint density with their product over the support, allowing differences only on sets of area zero. For a mixed model, check the mass-density factorization for every discrete value.

1
Validate the joint law.
Check that probabilities sum to one or that the joint density integrates to one.
2
Find the marginals.
Sum over the other variable for a discrete law, integrate it out for a density, or sum/integrate the mixed components as appropriate.
3
Compare across the full law.
Check whether each joint mass or density equals the product of the corresponding marginals.

Once independence has been established, events defined separately by \(X\) and \(Y\) can be multiplied to obtain their joint probability. Without that evidence, multiplying marginal probabilities is an assumption, not a calculation. In particular, a matching product for one selected cell does not prove independence.

Check Your Understanding

For each model, use the full factorization condition rather than relying on a single matching outcome.

  1. A discrete pair has joint table \(p(0,0)=0.08,\ p(0,1)=0.32,\ p(1,0)=0.12,\ p(1,1)=0.48\). Find \(P(X=0\text{ or }Y=0)\) and state whether the variables are independent. (Answer: \(0.5200\); yes.)
  2. A discrete pair has table entries \(p(0,0)=0.15,\ p(0,1)=0.25,\ p(1,0)=0.35,\ p(1,1)=0.25\). Decide whether the variables are independent, using the \((0,0)\) cell. (Answer: No; \(P(X=0)=0.40\), \(P(Y=0)=0.50\), and \(0.15\ne0.40(0.50)=0.20\).)
  3. A joint density is \(f_{X,Y}(x,y)=4xy\) on \(0<x<1,\ 0<y<1\), zero elsewhere. Find \(P(X>1/2,\ Y<1/2)\) and state whether the variables are independent. (Answer: Yes; \(P= (3/4)(1/4)=0.1875\).)
  4. A mixed law has \(g_0(y)=0.15\) and \(g_1(y)=0.35\) for \(0<y<2\), zero elsewhere. Find \(P(X=1,\ 0.5<Y<1.5)\) and determine independence. (Answer: \(0.3500\); yes, since \(P(X=0)=0.30,\ P(X=1)=0.70,\ f_Y(y)=0.50\), and \(g_x(y)=P(X=x)f_Y(y)\).)
  5. A discrete model has \(X\in\{0,1\}\) and \(Y\in\{A,B,C\}\), with row \(X=0\) equal to \((0.125,0.300,0.075)\) and row \(X=1\) equal to \((0.125,0.200,0.175)\). Does the matching cell \(p(0,A)=P(X=0)P(Y=A)\) establish independence? (Answer: No; \(p(0,B)=0.300\), whereas \(P(X=0)P(Y=B)=0.50(0.50)=0.250\).)
Clinical Biostats