# Math Help - marginal pmfs

1. ## marginal pmfs

The joint p.m.f. of X and Y is f(x,y)=1/6, $0 \le x+y \le2$, 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 $f_{1}(x)$ and $f_{2}(y)$in the margins

$f_{1}(0)=1/6+1/6+1/6=1/3$
$f_{1}(1)=1/6+1/6=1/3
$

$f_{1}(2)=1/6$
$f_{2}(0)=1/2$
$f_{2}(1)=1/3$
$f_{2}(2)=1/6$

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

$=\frac{-5/18}{\sqrt{5}/3*\sqrt{5}/3}=-1/2$

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!

2. 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.