The random variable X has a range of {0,1,2} and the random variable Y has a range of {1,2}.

The joint distribution of X and Y is given by the following table:
x y Ρ = ( X =x, Y= y , )
0 1 0.2
0 2 0.1
1 1 0.0
1 2 0.2
2 1 0.3
2 2 0.2
(a) Write down tables for the marginal distribution of X and of Y, i.e. give the values of
Ρ = ( X x) for all x , and of Ρ = (Y y) for all y .
(b) Write down a table for the conditional distribution of X given that Y = 2 , i.e. give the
values of Ρ = = ( X x Y/ 2)for all x .
(c) Compute E X( ) and E Y( )
(d) Compute E XY ( )
(e) Are X and Y independent? Explain why or why not
(f) Compute the covariance for X and Y
(g) Compute the correlation for X and Y
(h) What is Ρ = = ( X Y 1, 1)
(i) What is Ρ = ( X Y )

(a)

Marginal distribution of X:
X=0: P(X=0) = P(X=0, Y=1) + P(X=0, Y=2) = 0.2 + 0.1 = 0.3
X=1: P(X=1) = P(X=1, Y=1) + P(X=1, Y=2) = 0 + 0.2 = 0.2
X=2: P(X=2) = P(X=2, Y=1) + P(X=2, Y=2) = 0.3 + 0.2 = 0.5

Marginal distribution of Y:
Y=1: P(Y=1) = P(X=0, Y=1) + P(X=1, Y=1) + P(X=2, Y=1) = 0.2 + 0 + 0.3 = 0.5
Y=2: P(Y=2) = P(X=0, Y=2) + P(X=1, Y=2) + P(X=2, Y=2) = 0.1 + 0.2 + 0.2 = 0.5

(b)

Conditional distribution of X given Y=2:
P(X=0|Y=2) = P(X=0, Y=2) / P(Y=2) = 0.1 / 0.5 = 0.2
P(X=1|Y=2) = P(X=1, Y=2) / P(Y=2) = 0.2 / 0.5 = 0.4
P(X=2|Y=2) = P(X=2, Y=2) / P(Y=2) = 0.2 / 0.5 = 0.4

(c)

E[X] = 0*0.3 + 1*0.2 + 2*0.5 = 1
E[Y] = 1*0.5 + 2*0.5 = 1.5

(d)

E[XY] = 0*1*0.1 + 0*2*0.2 + 1*1*0 + 1*2*0.2 + 2*1*0.3 + 2*2*0.2 = 1

(e)

X and Y are not independent because the joint distribution of X and Y does not factorize as the product of the marginal distributions of X and Y.

(f)

Cov(X,Y) = E[XY] - E[X]*E[Y] = 1 - 1*1.5 = -0.5

(g)

Correlation = Cov(X,Y) / (σ(X)*σ(Y))
Since X and Y both have finite ranges, we can use the formula for covariance to compute the correlation.

(h)

P(X=1, Y=1) = 0

(i)

P(X,Y) = sum of all joint probabilities = 0.2+0.1+0+0.2+0.3+0.2 = 1.