In: Statistics and Probability
For the following function
x 1 1 2 4
y 3 4 5 6
fXY(x,y) 3/7 1/7 2/7 1/7
b) Are X and Y independent? Explain why or why not.
x 1 1 2 4
y 3 4 5 6
fXY(x,y) 3/7 1/7 2/7 1/7
a.
E(x) = 1*3/7 + 1*1/7 + 2*2/7 + 4*1/7 = 1.7143
E(y) = 3*3/7 + 4*1/7 + 5*2/7 + 6*1/7 = 4.1429
covariance :
cov (x,y) = (1 - 1.7143)*(3 - 4.1429)*(3/7) + (1 - 1.7143)*(4 - 4.1429)*(1/7) + (2 - 1.7143)*(5 - 4.1429)*(2/7) + (4 - 1.7143)*(6 - 4.1429)*(1/7)
cov (x,y) = 1.0408
correlation :
std dev. of x = s(x) = [ (1 - 1.7143)^2*(3/7) + (1 - 1.7143)^2*(1/7) + (2 - 1.7143)^2*(2/7) + (4 - 1.7143)^2*(1/7) ]^0.5
s(x) = 1.0302
std dev. of y = s(y) = [ (3 - 4.1429)^2*(3/7) + (4 - 4.1429)^2*(1/7) + (5 - 4.1429)^2*(2/7) + (6 - 4.1429)^2*(1/7) ]^0.5
s(y) = 1.1249
correlation coeff. = r = cov(x,y) / (s(x)*s(y))
= 1.0408 / (1.0302*1.1249)
= 0.8981
correlation coeff. = 0.8981
b.
for independence :
P(x,y) = P(x)*P(y)
P(x=1) = P(x=1,y=3) + P(x=1,y=4) = 3/7 + 1/7 = 4/7
P(y=3) = P(x=1,y=3) = 3/7
P(x=1)*P(y=3) = (4/7)*(3/7) = 12/7
P(1,3) = 3/7
we can see ,
P(1,3) ≠ P(x=1)*P(y=3)
so they are not independent