What Counts as a Convincing Independence Check?
An independence claim is a statement about an entire joint distribution, not one convenient feature of it. For two discrete random variables, every joint probability must agree with the product of the corresponding marginal probabilities. For variables with a joint density, the joint density must agree almost everywhere with the product of the marginal densities. For two events, the test is a single intersection identity. These are related checks, but the amount of work they require is different.
A marginal distribution describes one variable at a time. Even when two marginals look reasonable, or a particular joint probability happens to match its product-of-marginals value, dependence may remain elsewhere in the joint distribution. The practical question is therefore: what must be checked completely for this kind of claim?
Discrete Tables: Check Every Cell
Suppose \(X\) takes values \(x_1,\ldots,x_r\) and \(Y\) takes values \(y_1,\ldots,y_s\). Write \(p_{ij}=P(X=x_i,Y=y_j)\), \(p_{i+}=P(X=x_i)\), and \(p_{+j}=P(Y=y_j)\). The marginal probabilities are obtained by summing the joint table across the other variable.
To prove the criterion, first suppose \(X\) and \(Y\) are independent. Apply the definition to the singleton sets \(\{x_i\}\) and \(\{y_j\}\). This gives \(p_{ij}=p_{i+}p_{+j}\) for every cell. Conversely, suppose that factorization holds in every cell. For any sets of possible values \(I\) and \(J\),
The factorization therefore holds for all such sets, which is independence. Checking every cell is sufficient; checking only a selection of cells generally is not.
Worked Example: A Table That Factors Completely
The joint probabilities of \(X\) and \(Y\) are shown below. Decide whether the variables are independent.
| \(Y=0\) | \(Y=1\) | \(Y=2\) | Row total | |
|---|---|---|---|---|
| \(X=0\) | 0.10 | 0.06 | 0.04 | 0.20 |
| \(X=1\) | 0.40 | 0.24 | 0.16 | 0.80 |
| Column total | 0.50 | 0.30 | 0.20 | 1.00 |
The row and column totals are the marginal probabilities. Check each cell against the product of its row and column totals:
All six joint probabilities factor. Thus \(X\) and \(Y\) are independent. The verification is complete because the table has only six cells and each one has been checked.
Worked Example: One Matching Cell Does Not Settle a Larger Table
Consider a joint table with row totals \(0.50,0.30,0.20\) and column totals \(0.40,0.60\):
| \(Y=0\) | \(Y=1\) | Row total | |
|---|---|---|---|
| \(X=1\) | 0.20 | 0.30 | 0.50 |
| \(X=2\) | 0.05 | 0.25 | 0.30 |
| \(X=3\) | 0.15 | 0.05 | 0.20 |
| Column total | 0.40 | 0.60 | 1.00 |
The cell for \(X=1,Y=0\) matches its product of marginals: \(0.20=(0.50)(0.40)\). But another cell does not: \(P(X=2,Y=0)=0.05\), whereas \(P(X=2)P(Y=0)=(0.30)(0.40)=0.12\). Since even one cell fails, \(X\) and \(Y\) are dependent.
This is a useful warning about partial checks. In a table with at least three categories for one variable, a single matching cell does not establish independence. In a \(2\)-by-\(2\) table, however, matching one cell together with the marginal totals forces the other three to match as well. Do not assume that shortcut applies to a larger table.
Joint Densities: Factorization Almost Everywhere
For continuous random variables, the corresponding check concerns densities. Suppose \((X,Y)\) has a joint density \(f_{X,Y}\) with respect to two-dimensional Lebesgue measure. Its marginal densities are \(f_X(x)=\int_{\mathbb R} f_{X,Y}(x,y)\,dy\) and \(f_Y(y)=\int_{\mathbb R} f_{X,Y}(x,y)\,dx\), for almost every \(x\) and \(y\). These integrals exist as marginal densities because the joint density is nonnegative and integrates to one.
For the forward direction, independence means that the joint distribution is the product of the two marginal distributions. A density for that product distribution is \(f_X(x)f_Y(y)\). The joint distribution also has density \(f_{X,Y}\). Densities of the same distribution are equal almost everywhere, so the stated factorization follows. For the reverse direction, suppose the factorization holds almost everywhere. For any measurable sets \(A,B\subseteq\mathbb R\), integration over their product gives
The product integration is valid for these nonnegative densities by Tonelli's theorem. This proves independence and establishes the criterion. The phrase “almost everywhere” matters: changing a density on a set of Lebesgue measure zero does not change the distribution, so independence does not require a pointwise identity at every point.
Worked Example: A Triangular Support Rules Out Independence
Let the joint density be \(f_{X,Y}(x,y)=2\) when \(0<x<1\), \(0<y<1-x\), and zero otherwise. First check its total integral:
For \(0<x<1\), the marginal density of \(X\) is \(f_X(x)=\int_0^{1-x}2\,dy=2(1-x)\), and it is zero outside that interval. By symmetry, \(f_Y(y)=2(1-y)\) for \(0<y<1\), and zero otherwise.
On the square \(0<x<1,\ 0<y<1\), the product \(f_X(x)f_Y(y)=4(1-x)(1-y)\) is positive. But on the region \(x+y>1\) inside that square, the joint density is zero. This discrepancy is not confined to a measure-zero boundary: for example, the rectangle \(0.7<x<0.8,\ 0.7<y<0.8\) has positive area, and throughout it the joint density is zero while the product of marginal densities is positive. The factorization fails on a set of positive area, so \(X\) and \(Y\) are dependent.
Event Pairs: Test the Intersection
For two events, there is no table or density to factor across every possible value. The definition itself gives the complete test: compare the probability of their intersection with the product of their individual probabilities. Both sides must be calculated from the same probability model.
Worked Example: Two Events on a Fair Die
Roll a fair six-sided die. Let \(C\) be the event that the result is even and \(D\) the event that the result exceeds \(3\). Then \(C=\{2,4,6\}\), so \(P(C)=3/6=1/2\), and \(D=\{4,5,6\}\), so \(P(D)=3/6=1/2\). Their intersection is \(\{4,6\}\), giving \(P(C\cap D)=2/6=1/3\). Since
the events are dependent. The fact that both events have probability \(1/2\) says nothing by itself about whether they are independent; it is the intersection probability that decides this claim.
Common Mistakes and a Reliable Checklist
Some checks can quickly disprove independence, but they are not substitutes for the relevant complete criterion. For example, a zero-probability joint cell with positive marginal probabilities disproves independence immediately, because the product of those marginals is positive. Likewise, one failed density comparison on a positive-measure region disproves independence. A successful partial check, by contrast, usually cannot establish the claim.
- Wrong: “One table cell equals the product of its marginals, so the variables are independent.” Correction: For a general discrete table, check every cell. One failure is enough to conclude dependence; one match is not enough to conclude independence.
- Wrong: “The marginal distributions look unrelated, so the variables are independent.” Correction: Independence is a property of the joint distribution. Marginals alone do not reveal whether the joint probabilities or density factor completely.
- Wrong: “The density factorization fails at one point, so the variables are dependent.” Correction: Densities are defined only up to changes on null sets. For a density-based independence check, a failure must occur on a set of positive Lebesgue measure.
- Wrong: “Two events each have probability one-half, so they are independent.” Correction: Calculate \(P(C\cap D)\) and compare it with \(P(C)P(D)\).
A practical workflow is to identify the object being tested first: a pair of events, a discrete joint table, or a joint density. Then calculate the relevant marginals, state the factorization condition, and check it at the right level of completeness. This keeps a tempting numerical coincidence from being mistaken for evidence of independence.
Check Your Understanding
For each question, identify what must be checked before making an independence claim.
- A discrete joint table has five rows and two columns. How many cells must factor as the product of their marginal probabilities to establish independence?
- In a table with three categories for \(X\) and two for \(Y\), one cell matches its product of marginals. Does that establish independence? Explain.
- A joint density and the product of its marginal densities differ only at one point. Does that alone disprove independence? Why or why not?
- Two events have probabilities \(0.3\) and \(0.4\), and their intersection has probability \(0.12\). Are they independent? Show the comparison.
- For the triangular density in the worked example, why does the zero joint density on a region above the line \(x+y=1\) disprove independence?