Home page for accesible maths 5.6 Independence

Style control - access keys in brackets

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

5.7 Conditional Distributions

Suppose we know the joint distribution of (X,Y) but then we find out the value of one of the random variables. What can we say about the other random variable?

We consider the conditional distributions XY=y, i.e. the distribution of X given that Y=y, and YX=x, i.e. the distribution of Y given that X=x.

Recall that when X and Y were discrete random variables the conditional pmfs were:

pXY(xy)=pXY(x,y)pY(y),pYX(yx)=pXY(x,y)pX(x).

Similarly when X and Y are continuous random variables the conditional pdfs are

fXY(xy)=fXY(x,y)fY(y),fYX(yx)=fXY(x,y)fX(x).

Note that since we can only condition on possible values, we don’t have to worry about zero’s in the denominators: the marginal pmf/pdf has to be positive for the value to occur.

Also note that the conditional pdfs are themselves valid pdfs: they are non-negative and they integrate to 1. For instance,

s=-fXY(sy)ds =s=-fXY(s,y)fY(y)ds
=1fY(y)s=-fXY(s,y)ds
=1fY(y)fY(y)=1.

Similarly, conditional pmfs sum to 1.

When the variables (X,Y) are independent discrete RVs then for all x, y, recall that

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

  2. pYX(yx)=pX(x)pY(y)pX(x)=pY(y).

Similarly if (X,Y) are independent continuous RVs then for all x, y,

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

  2. fYX(yx)=fX(x)fY(y)fX(x)=fY(y).

These results conform with intuition as when X and Y are independent knowing the value of X should tell us nothing about Y and vice versa.

The converse is also true: If the conditional distribution of X given Y=y is independent of y or, equivalently, the conditional distribution of Y given X=x is independent of x, then X and Y are independent.

Example 5.7.1.

A piece of string of unit length is tied at one end to a hook. The string is cut at a (uniform) random distance X from the hook. The piece remaining is then cut again at a (uniform) random distance Y from the hook. Given that the remaining length tied to the hook has length y, find the pdf of the position of the first cut.

Unnumbered Figure: Link

Solution.  Model with X𝖴𝗇𝗂𝖿(0,1) and Y|X𝖴𝗇𝗂𝖿(0,x). We know fX(x)=1 for 0x1, and fYX(y|x)=1/x for 0<y<x<1.

Now fX|Y(x|y)=fXY(x,y)/fY(y).

We know fXY(x,y)=fX(x)fY|X(y|x)=1/x(0<y<x<1) and 0 otherwise.

So we need fY(y).

fY(y) =s=y1fXY(s,y)ds
=s=y11sds
=[logs]s=y1
=-log(y)

for 0<y<1. Hence fX|Y(x|y)=-1/(xlog(y)),y<x<1.

Example 5.7.2.

Continuous random variables X and Y have joint pdf

fXY(x,y)={exp(-x/y)exp(-y)/y0<x<, 0<y<0otherwise

Find

  1. 1.

    the conditional pdf of X given Y=y,

  2. 2.

    𝖯(X>1Y=1).

Solution. 

  1. 1.

    Since fX|Y(x|y)=fXY(x,y)/fY(y) we need the marginal pdf fY(y).

    fY(y) =s=0exp(-s/y)exp(-y)/yds
    =[-exp(-s/y-y)]s=0
    =exp(-y).

    for y>0. Hence for x>0

    fX|Y(x|y)=exp(-x/y)exp(-y)/yexp(-y)=exp(-x/y)/y.
  2. 2.

    When Y=1 we have fX|Y(x|Y=1)=exp(-x), so

    𝖯(X>1|Y=1)=1exp(-s)ds=[-exp(-s)]1=e-1.