Covariance Using Expected values

Biju George

New Member
Subscriber
Got a basic question on the sample question Provided in Miler Chapter-3

Sample Question:
X is a random variable. X has an equal probability of being −1, 0, or +1.
What is the correlation between X and Y if Y = X2?

The above is solved using the Expected values .

My question : Why this is not solved using the normal formula for
covariance cov(xy)=Sum ((x- mean x) (y- mean y)/n
the answer would have been different in that case ?

Thanks
 

ShaktiRathore

Well-Known Member
Subscriber
covariance cov(xy)=Sum ((x- mean x) (y- mean y)/n =Sum(xy-mean y.x-mean x.y+mean x.mean y)/n=Sum(xy-E(y).x-E(x).y+E(x).E(y)) /n=E(xy)-2E(x)E(y)+E(x)E(y)=E(xy)-E(x)E(y)
Thanks
 

David Harper CFA FRM

David Harper CFA FRM
Subscriber
@RiskGuy Miller just distributes the (1/3), so he actually already is using your formula; e.g., mean(x) = 0 and mean(y) = 2/3. The other way to approach this, which I think is easier, is per @ShaktiRathore solution: just use cov(x,y) = E(xy) - E(x)E(y). As x*y = (-1,0,1), we have: E(X) = 0, E(Y) = 2/3 and E(XY) =0 such that cov(XY) = E(XY) - E(X)E(Y) = 0 - (2/3)*0 = 0.
 
Top