# Thread: How to calculate covariance given a probability distribution table.

1. ## How to calculate covariance given a probability distribution table.

Hello all,

The probability distribution table is:-
Code:
                Y
1     2     3

1   .1   .05  .02

X   2   .1   .35  .05

3   .03  .1   .2
Mean of x = 2.16 ; Mean of y = 2.04
Calculation of covariance is; ( ( 1 - 2.16 ) * ( 1 - 2.04 ) + ( 2 - 2.16 ) * ( 2 - 2.04 ) + ( 3 - 2.16 ) * ( 3 - 2.04 ) ) / 3 = 0.67

Even if we multiply probabilities; ( ( 1 - 2.16 ) * ( 1 - 2.04 ) * (.1) + ( 2 - 2.16 ) * ( 2 - 2.04 ) * (.35) + ( 3 - 2.16 ) * ( 3 - 2.04 ) * (.2) ) / 3 = 0.094

However COV(X,Y) in the answers is 0.23. Can someone show me how to correctly calculate covariance using the usual covariance formula.

Thanks

2. 1 you have to do all nine positions.
2 you should use the short cut formula E(XY)-E(X)E(Y)
3 and you do need to multiply by the probabilities

E(XY)=(1)(1)(.1)+..... for all nine possibilities.

,

,

,

,

,

,

,

,

# covariance calculator with probability

Click on a term to search for related topics.