Simple question about calculating covariance with random variables

38 Views Asked by At

Consider two random variables $X,Y$ with $X$ having values in ${2,3}$ and $Y$ in ${4,7}$, each with probability $0.5$. This then means that both random variables are equally distributed. Calculating the expected value gives $$E(X)=0.5(2+3)=2.5, \ E(Y)=0.5(4+7)=5.5.$$ The variance is easy to calulate as well. However when it comes to the covariance I seem to struggle because of the distribution. One knows that $(X-E(X))(Y-E(Y))= 0.75$ with probability $P(X=2,Y=4)=?$. I know that when $X$ and $Y$ are independent, we can just calculate $P(X=2,Y=4)=P(X=2)P(Y=4)=0.25$. However, can I also calculate a value here when they are not independent? Furthermore we have that $(X-E(X))(Y-E(Y))=0.75$ with probability $P(X=3,Y=7)=?$. $$Cov(X,Y)=E((X-E(X)(Y-E(Y))=0.75(P(X=2,Y=4)+P(X=3,Y=7))=?.$$ Any help is greatly appreciated.