Skip to content
Part IA Easter Term

Independence of Random Variables

Definition

Random variables XX and YY are independent if:

F(x,y)=FX(x)FY(y)for all x,yF(x, y) = F_X(x) \cdot F_Y(y) \quad \text{for all } x, y

Equivalently (for the usual cases):

Discrete: p(x,y)=pX(x)pY(y)for all x,yp(x, y) = p_X(x) \cdot p_Y(y) \quad \text{for all } x, y

Continuous: f(x,y)=fX(x)fY(y)for all x,yf(x, y) = f_X(x) \cdot f_Y(y) \quad \text{for all } x, y

Intuition

XX and YY are independent if knowing XX gives no information about YY (and vice versa). The joint distribution factors into the product of marginals.

Checking Independence

Method 1: Factor Joint into Marginals

Compute pX(x)p_X(x) and pY(y)p_Y(y), then verify p(x,y)=pX(x)pY(y)p(x, y) = p_X(x) p_Y(y) everywhere.

Example: p(x,y)=exyp(x, y) = e^{-x-y} for x,y>0x, y > 0.

pX(x)=exp_X(x) = e^{-x} (marginal) pY(y)=eyp_Y(y) = e^{-y} (marginal)

pX(x)pY(y)=exey=exy=p(x,y)p_X(x) p_Y(y) = e^{-x} e^{-y} = e^{-x-y} = p(x, y)

Independent.

Method 2: Check if Support is Rectangular

If the support of (X,Y)(X, Y) is not a rectangle (or hyper-rectangle for n>2n > 2), then XX and YY cannot be independent.

Example: f(x,y)=6xyf(x, y) = 6xy on 0x10 \leq x \leq 1, 0yx0 \leq y \leq \sqrt{x}.

The support is triangular, not rectangular, so XX and YY are NOT independent.

Independence Implies

If XX and YY are independent:

1. Joint Probability Factors

P(XA,YB)=P(XA)P(YB)P(X \in A, Y \in B) = P(X \in A) \cdot P(Y \in B)

2. Expectation of Product

E[XY]=E[X]E[Y]E[XY] = E[X] E[Y]

Proof: E[XY]=xyxyp(x,y)=xyxypX(x)pY(y)=(xxpX(x))(yypY(y))=E[X]E[Y]E[XY] = \sum_x \sum_y xy \cdot p(x,y) = \sum_x \sum_y xy \cdot p_X(x) p_Y(y) = \left(\sum_x x p_X(x)\right)\left(\sum_y y p_Y(y)\right) = E[X]E[Y]

3. Variance of Sum

Var(X+Y)=Var(X)+Var(Y)\text{Var}(X + Y) = \text{Var}(X) + \text{Var}(Y)

This follows from E[XY]=E[X]E[Y]E[XY] = E[X]E[Y] for independent variables.

4. Functions of Independent Variables

If XX and YY are independent, then g(X)g(X) and h(Y)h(Y) are also independent for any functions g,hg, h.

Independence Does NOT Imply

Common misconceptions:

  • Zero correlation \neq independence: Independent implies zero correlation, but the converse is false
  • Uncorrelated \neq independent: Zero covariance doesn’t guarantee independence

Counterexample

Let XX be uniform on {1,0,1}\{-1, 0, 1\} and Y=X2Y = X^2.

Cov(X,Y)=E[XX2]E[X]E[X2]=E[X3]0=0\text{Cov}(X, Y) = E[X \cdot X^2] - E[X] E[X^2] = E[X^3] - 0 = 0

But XX and YY are clearly not independent: knowing XX completely determines YY.

Estimates from Data

If we observe (Xi,Yi)(X_i, Y_i) pairs, we estimate:

  • Marginal of XX: distribution of XiX_i values alone
  • Marginal of YY: distribution of YiY_i values alone
  • Independence: check if joint empirical distribution factorises

Mutual Independence

X1,X2,,XnX_1, X_2, \ldots, X_n are mutually independent if:

F(x1,,xn)=FX1(x1)FXn(xn)F(x_1, \ldots, x_n) = F_{X_1}(x_1) \cdots F_{X_n}(x_n)

For all subsets, the joint factors into the product of marginals.

Pairwise independence does NOT imply mutual independence.

Summary

ConditionStatement
IndependenceJoint = product of marginals
ImpliesE[XY]=E[X]E[Y]E[XY] = E[X]E[Y]
ImpliesVar(X+Y)=Var(X)+Var(Y)\text{Var}(X+Y) = \text{Var}(X) + \text{Var}(Y)
Zero correlationDoes NOT imply independence