I am trying to find the covariance of two random variables but I am not having any lucky. Just for simplicity lets say that my random variables are :
X = value rolled by a die
Y = 1 if even 0 if odd
Just from intuiting $E(Y) = .5$ and $E(X) = 3.5$
Now how do I find the covariance? I can't find an explanation of how this works anywhere. I see that the formula is
$cov(XY) = E(XY) - E(X)E(Y)$
but no one anywhere thought it would be a good idea and explain what E(XY) is or how to compute it.
Anyways I found some hints and they said to multiply each pair by each other, but then what do I do with them? Add them? I wasn't sure I tried everything I could and never got the correct answer.
Going with what I think is the most correct thing to do I find the E(XY) by taking the value at each point and multiplying it by the probability of each at each point and then summing them all up.
So for $E(X_1, Y_1)$ I get an X value of 1 with probability $1/6$ and a Y value of 0 with probability $1/6$ So my value for that pair is $1/6$ From here would I then do 2, 3, 4, 5, 6 and sum up each one to determine the cross product expected value?
I have tried this a dozen times and it results in not the correct answer for my other problems. Is this simple example correct? Where did I go wrong?