Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

A bag has 10 red, 8 green, and 12 blue balls. I randomly grab 12 balls from the bag without replacement. Let $X$ be the number of red balls grabbed and $Y$ be the number of green balls grabbed. What is the covariance of $X$ and $Y$?

I began by creating a indicator random variable $I_i$ that is 1 if the $i$th ball grabbed is 1 and 0 otherwise as well as $J_i$, which is 1 if the $i$th ball grabbed is green and 0 otherwise. Then,

$$ Covariance(I_1, J_1) = E(I_1 J_1) - E(I_1)E(J_1) = 0 - (\frac{10}{30})(\frac{8}{30}) \\ Covariance(I_1, J_2) = E(I_1 J_2) - E(I_1)E(J_2) = (\frac{10}{30})(\frac{8}{29}) - (\frac{10}{30})(\frac{8}{30} $$

I got stuck here, and read the solutions, which read:

$$ Covariance(X, Y) = 12 Covariance(I_1, J_1) + (12)(11) Covariance(I_1, J_2) = \frac{-96}{145} $$

Where did this last equation come from? Why are we multiplying one of the covariances by 12 and the other one by 12 times 11?

share|cite|improve this question
up vote 1 down vote accepted

Since $X=\sum_{n=1}^N I_n$ and $Y =\sum_{m=1}^N J_m$ $$ \mathbb{Cov}(X,Y) = \sum_{n,m} \mathbb{Cov}(I_n,J_m) = \sum_{n} \mathbb{Cov}(I_n,J_n) + \sum_{n \not= m} \mathbb{Cov}(I_n,J_m) $$ Since $(I_n,J_n)$ are exchangeable random variables, $\mathbb{Cov}(I_n,J_n)$ does not depend on $n$, as well $\mathbb{Cov}(I_n,J_m)$ is the same for all $n \not = m$. Thus $$ \mathbb{Cov}(X,Y) = N \mathbb{Cov}(I_1,J_1) + N(N-1) \mathbb{Cov}(I_1, J_2) $$

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.