# Covariance of random balls

#### binjip

##### New Member
Hi,

I have:
10 balls with number 6 on each,
10 balls with n. 7,
10 balls with n. 8.

So it's 30 balls in total and now I take 10 balls at random (X1, ..., X10), without replacement.

The question is cov(X1, X2) = ? (covariance of the first and second ball)

I have computed E(X1) = E(X2) = 2/3

Cov(X1, X2) = E(X1 * X2) - E(X1) * E(X2)

I can calculate E(X1 * X2) the hard way

6*6*P(X1 = 6, X2 = 6) + 2*6*7*P(X1 = 6, X2 = 7) + ... = 48.977

I was however wondering if there is a shortcut to do this? Since I don't think X1 and X2 are independent (and the result suggests the same), I can't come up with a better way.

Many thanks for any help.

Note: E(X1) = E(X2) = 7 and not 2/3 as previously stated. 2/3 is the Var(X1).

Last edited: