How to calculate covariance of X and Y

4.9k Views Asked by At

There are two random variables X and Y which take on value {-1,0,1} and have the following joint distribution

Joint Distribution

How can i calculate Covariance and Correlation between X and Y Note: i don't actually know how to even start calculating. I saw that Cov(X,y) is E[(x - E[x])(Y-E[y])^T]. but, how can i get E[x] and x from that table. How to read that table. and what does the transpose mean, should i transpose the matrix and then calculate the value?

1

There are 1 best solutions below

9
On BEST ANSWER

The table gives you information about the distribution of $(X,Y)$ which includes information about $X$ and $Y$ separately..

For instance you can read that $$P(X=-1)=P(X=-1,Y=-1)+P(X=-1,Y=0)+P(X=-1,Y=1)=0+0+\frac13=\frac13$$

Likewise you can find $P(X=0)$ and $P(X=1)$ and then you can go on with $$\mathbb EX=(-1)\cdot P(X=-1)+0\cdot P(X=0)+1\cdot P(X=1)$$

Again likewise you can find $\mathbb EY$ and also $\mathbb EXY$ (do you see how?).

After that you can find the covariance on base of $$\mathsf{Cov}(X,Y)=\mathbb EXY-\mathbb EX\mathbb EY\tag1$$ Here $(1)$ can be deduced from the definition:$$\mathsf{Cov}(X,Y)=\mathbb E(X-\mathbb EX)(Y-\mathbb EY)$$