Home page for accesible maths

Style control - access keys in brackets

Font (2 3) - + Letter spacing (4 5) - + Word spacing (6 7) - + Line spacing (8 9) - +

5.6 Independence

Recall that, formally, we say that two random variables X and Y are independent if the events {XA} and {YB} are independent for all sets A and B, i.e.

𝖯(XA,YB)=𝖯(XA)𝖯(YB)

for all sets A and B.

We have seen that when X and Y are both discrete, they are independent if and only if their joint pmf can be factorised as a product of the marginal pmfs.

pXY(x,y)=pX(x)pY(y).

Similarly, when X and Y are both continuous they are independent if and only if their joint pdf can be factorised as a product of the marginal pdfs.

Theorem 5.6.1.

Two continuous random variables X and Y are independent if and only if

fXY(x,y)=fX(x)fY(y).
Proof.

: If X and Y are independent then whatever the values of x and y, take Ax={s:sx} and By={t:ty}. Then

FXY(x,y)=𝖯(XA,YB)=𝖯(XA)𝖯(YB)=FX(x)FY(y).

This is true for all x,y, and so we may differentiate both sides wrt. x and y to obtain

fXY(x,y)=fX(x)fY(y).

: If the joint pdf factorises we get for arbitrary sets A and B,

𝖯(XA,YB) =sAtBfXY(s,t)dtds
=A(BfX(s)fY(t)dt)ds
=AfX(s)(BfY(t)𝑑t)ds
=𝖯(XA)𝖯(YB).

Factorisation To check for independence: if we have the joint pdf (or pmf) it is enough to check that it can be factorised as a function of x times a function of y:

fXY(x,y)=g(x)h(y),

and that the range of X does not depend on Y (see CW question). We do not have to show that the functions g and h are themselves densities. Also if the range of X does not depend on Y then the range of Y does not depend on X, so we only need to check one of the two possibilities.

If the range of X does not depend on Y (and vice versa) we say that X and Y are variationally independent.

Example 5.6.1.

The figure below illustrates the joint density

fXY(x,y)=1|A|1A(x,y),

where the function 1A(x,y) is one when (x,y)A and zero otherwise, for four different regions A. In which cases are X and Y independent?

Unnumbered Figure: First link, Second Link

Unnumbered Figure: First link, Second Link

Solution.  TL: ind, TR: not ind, BL: not ind., BR: ind.

Given a joint pdf, a standard way to prove independence is to show factorisation and variational independence. To disprove independence, a counterexample to either suffices. This is straightforward for variational independence, but disproving factorisation is less obvious. The following method is recommended. An alternative is to show that a conditional distribution is not the same as a marginal distribution, but that usually involves more work.

Two point method: Note that fXY can be factorised as a function of x times a function of y if and only if for all x1, x2, y1, y2:

fXY(x1,y1)fXY(x2,y2)=fXY(x1,y2)fXY(x2,y1)

Since, in the case of independence, both sides equal fX(x1)fY(y1)fX(x2)fY(y2).

This is particularly useful for proving that a given joint pdf fXY does not factorise as above. Simply find (x1,y1), and (x2,y2), such that the two sides above are different.

Example 5.6.2.

Are the following pairs of random variables independent?

  1. (a)

    fXY(x,y)=12xy(1-y) for 0<x<1,0<y<1,

  2. (b)

    fXY(x,y)=2exp(-x-y) for 0<x<y<,

  3. (c)

    fXY(x,y)=x+y for 0<x<1,0<y<1.

Solution. 

  1. (a)

    Independent: variationally independent and fXY(x,y)=12x×y(1-y), so the joint density factorises.

  2. (b)

    Not independent: fXY=2e-x×e-y factorises BUT the range of X depends on Y.

  3. (c)

    Not independent: variationally independent BUT with x1=y1=1/3 and x2=y2=1/2 we have

    fXY(x1,y1)fXY(x2,y2)=2/3×1=2/325/36=5/6×5/6=fXY(x1,y2)fXY(x2,y1).

    Note: given variational independence, we first try to factorise x+y; when we cannot, we look for a counter-example.

Fewer sets A and B: as in the proof of Theorem 5.6.1, setting Ax={s:sx} and By={t:ty} shows that if X and Y are independent then for all x,y, FX,Y(x,y)=FX(x)FY(y). It turns out (we will not prove this) that for any pair of random variables, whether discrete, continuous or more complicated, ‘FX,Y(x,y)=FX(x)FY(y) for all x,y’ is equivalent to X and Y being independent (i.e. one need only consider a subset of the possible sets A and B).

Setting Ax={s:s>x} and By={t:t>y} shows that the independence of X and Y implies SX,Y(x,y)=SX(x)SY(y) for all x,y; again, it can be shown that independence is equivalent to the factorisation of the survivor functions.

Example 5.6.3.

Let X and Y be independent exponential random variables with parameters β and ϕ respectively. Find 𝖯(X>x,Y>y).

Solution.  By independence, 𝖯(X>x,Y>y)=𝖯(X>x)𝖯(Y>y) for 0<x, 0<y. So

𝖯(X>x,Y>y) =[1-FX(x)][1-FY(y)]
=exp(-βx)exp(-ϕy)=exp(-(βx+ϕy)).