# variance of a sum

We draws 10 from a finite population of 30, without replacement! 15 members out of 30 have the number 1, 10 members have the number 2 and 5 members have the number 3.

The Expected value is $$\mathbb E(X)= 1 \cdot \frac12+2 \cdot \frac13+3 \cdot \frac 16 = \frac 53$$

Variance $$V(X)= \left( 1 -\frac53 \right)^2 \cdot \frac12+ \left( 2-\frac53 \right)^2 \cdot \frac13+ \left( 3-\frac53 \right)^2 \cdot \frac16 = \frac59$$

I need the Variance of $$X_{1}+...+X_{10}$$ and $$Var( \frac1{10}( X_{1}+...+X_{10}))$$

I found this formula $$V(X_{1}+...+X_{10})= \sum\limits_{i=1}^{10} \operatorname{Var}(X_i)+\sum\limits_{i\neq j}^{} \operatorname{Cov}(X_i,X_j)$$

But how i can solve this? With Wolframalpha?

thx

-
I just need clarification on what you're trying to write. What does the $15 - havethenumber \to 1$ stand for?? EDIT : Oh. Does that mean that $15$ members of the population have the number 1, 10 have number 2 and 5 have number 3? If this is the case perhaps an edit could be appropriate. – Patrick Da Silva Nov 22 '11 at 21:49
Yes i mean that 15 members of the polulation have the number 1... – corium Nov 22 '11 at 22:01
You should edit your question and write those informations textually, it is more understandable in this way. I was confused at first with this way of saying this, like I did. – Patrick Da Silva Nov 22 '11 at 22:08

## 2 Answers

It is simpler to work it out directly. Since the total of the sample $Z = X_1+\ldots+X_{10}$ does depend on the order of sampling of each individual components, the distribution of $Z$ would be the same if, instead of sampling without replacement, we sampled 10 elements at once.

Suppose a sample contains $k_1$ balls with number 1, $k_2$ balls with number 2, and $k_3$ balls with number 3. The probability of obtaining such a configuration is: $$p(k_1, k_2, k_3) = \mathbb{P}(K_1=k1,K_2=k_2,K_3=k_3) = \frac{ \binom{15}{k_1} \binom{10}{k_2} \binom{5}{k_3}}{ \binom{30}{10} } \mathsf{1}_{k_1+k_2+k_3=10}$$ The triple $(K_1,K_2,K_3)$, thus follows the multi-variate hypergeometric distribution.

The mean is $$\mathbb{E}(Z) = \mathbb{E}(K_1 + 2K_2+3K_3) = \mathbb{E}(K_1) + 2 \mathbb{E}(K_2) + 3 \mathbb{E}(K_3) = 1 \cdot \frac{10}{30} 15 + 2 \cdot \frac{10}{30} 10 + 3 \cdot \frac{10}{30} 5 = \frac{50}{3}$$

The variance then $$\begin{eqnarray} \mathbb{Var}(Z) &=& \mathbb{Var}(K_1) + 4 \mathbb{Var}(K_2) + 9 \mathbb{Var}(K_3) + 4 \mathbb{Cov}(K_1,K_2) + 6 \mathbb{Cov}(K_1,K_3) + 12 \mathbb{Cov}(K_2,K_3) \\ &=& \frac{50}{29} + 4 \cdot \frac{400}{261} + 9 \cdot \frac{250}{261} + 4 \cdot \left( -\frac{100}{87}\right) + 6 \cdot \left( - \frac{50}{87} \right) + 12 \cdot \left( -\frac{100}{261} \right) = \frac{1000}{261} \end{eqnarray}$$

-
And $$Var( \frac1{10}(Z)) = \frac{100}{261}$$ ? – corium Nov 23 '11 at 16:43
@corrium Sorry, for some reason I left the factor $\frac{1}{10}$ out. Be careful, $\mathbb{Var}\left( \frac{1}{10} Z \right) = \frac{1}{10^2} \mathbb{Var}(Z)$. – Sasha Nov 23 '11 at 16:51

We want the variance of $X_1+\cdots+X_{10}$. The calculation will be done "by hand," using basic ideas only. Recall the useful formula $$\text{Var}(Y)=E(Y^2)-(E(Y))^2.$$ This is not difficult to derive from the usual official definition $\text{Var}(Y)=E(Y-\mu_Y)^2$, and is often easier to compute with.

The expectation of $X_1+\cdots +X_{10}$ is easy, for in general the expectation of a sum is the sum of the expectations. It follows that $$E(X_1+\cdots+X_{10})=\frac{50}{3}.$$

The expectation of $(X_1+\cdots+X_{10})^2$ is more complicated. Expand the square. We get $$\sum_{i=1}^{10}X_i^2 +2\sum_{1\le i<j\le 10} X_iX_j.\qquad\qquad(\ast)$$ We want the expectation of the complicated expression above. First, we compute $E(X_i^2)$. This random variable takes on values $1^2$, $2^2$, and $3^2$ with probabilities respectively equal to $\frac{15}{30}$, $\frac{10}{30}$, and $\frac{5}{30}$. It follows that $$E(X_i^2)=\frac{15}{30}\cdot 1 +\frac{10}{30}\cdot 4+\frac{5}{30}\cdot 9.$$ This simplifies to $\frac{10}{3}$. It follows that $$\sum_{i=1}^{10}E(X_i^2)=\frac{100}{3}.$$ Finally, we need to evaluate the expectation of a typical "mixed" term $X_iX_j$. This requires some calculation. If $X_i=1$, (probability $\frac{15}{30}$), $X_j$ is $1$, $2$, and $3$ with probabilities respectively equal to $\frac{14}{29}$, $\frac{10}{29}$, and $\frac{5}{29}$. Thus we get a contribution to $E(X_iX_j)$ equal to

$\frac{15}{30}\left(\frac{14}{29}\cdot 1+\frac{10}{29}\cdot 2+\frac{5}{29}\cdot 3\right)$.

When $X_i=2$ (probability $\frac{10}{30}$), we get contribution to $E(X_iX_j)$ equal to

$\frac{10}{30}\left(\frac{15}{29}\cdot 2+\frac{9}{29}\cdot 4+\frac{5}{29}\cdot 6\right)$.

Finally, when $X_i=3$, the contribution to the expectation is

$\frac{55}{30}\left(\frac{15}{29}\cdot 3+\frac{10}{29}\cdot 6+\frac{4}{29}\cdot 9\right)$.

Add up all these terms. After simplifying, we get $$E(X_iX_j)=\frac{80}{29}.$$ There are $\binom{10}{2}$ terms $X_1X_j$. It follows that $$E(2\sum_{1\le i<j\le 10} X_iX_j)=2\binom{10}{2}\frac{80}{29}=\frac{7200}{29}.$$ Finally, we put the various pieces together: $$\text{Var}\left(\sum_{i=1}^{10} X_i\right)=\frac{100}{3}+\frac{7200}{29}-\left(\frac{50}{3}\right)^2.$$ This turns out to be approximately $3.83$.

For the variance of $\frac{1}{10}(X_1+\cdots +X_{10})$, we can use the general fact that $\text{Var}(kY)=k^2\text{Var}(Y)$ for any constant $k$.

-