The best way to obtain the covariance is by E(XY)-E(X)E(Y), since here x and y are zero quite often.
In fact E(XY)=1/6 since the only time you don't have a zero is when x=y=1.
The joint p.m.f. of X and Y is f(x,y)=1/6, , where x and y are integers.
a) sketch the support of x and y.
(0,0),(0,1),(0,2),(1,0),(1,1),(2,0)
b) record the marginal pmfs of and in the margins
c) compute cov(x,y)
mean[(x-mean(x))*(y-mean(y)]=1/6[(0-2/3)(0-2/3)+(0-2/3)(1-2/3)+(0-2/3)(2-2/3)+(1-2/3)(0-2/3)+(1-2/3)(1-2/3)+(2-2/3)(0-2/3)]=1/6[-15/9]=-5/18
d) Determine the correlation coefficient
e) Find the best fitting line.
I am hoping my other answers are correct, but I don't know what they mean for this one. Thank you!