3

I have a question regarding a problem and I want to know if I am right:

An urn contains $n$ balls, numbered 1 to $n$ and you remove $k$ of them. What is the expected value value of their sum ?

My suggestion:

Let $X_i$ = the number of the ball taken. $\mathbf{E}(X_i)= \frac{n+1}{2}$

Since you are removing $k$ balls, $\mathbf{E}X = \mathbf{E}X_1+...+\mathbf{E}X_n$

So $\mathbf{E}X=k \cdot \frac{n+1}{2}$ ??

Any help would be appreciated !

Regards,

Alex
  • 19,262
XCoder
  • 482

1 Answers1

3

You've got the right answer. Here is the mathematical explanation. Let $S$ be the sum of the k balls chosen without replacement, $S = X_1 + X_2 + ... + X_k$ $(i=1,...,k)$, where $X_i$ = value of $i^{th}$ ball chosen, then

$$E[S]=E[\sum\limits_{i=1}^{k}X_i] \overset{(a)}{=} \sum\limits_{i=1}^{k}E[X_i] = kE[X_i] = k(n+1)/2$$

In above, (a) follows from the Linearity of Expectation.

Erdos Yi
  • 445
  • Thanks Erdos. One question though: does the fact that the balls are drawn with or without any replacement have any impact on the result or not ? – XCoder Jun 05 '13 at 14:45
  • @XCoder Actually, no matter how the balls are drawn, the expectation would always be $k(n+1)/2$. The only difference is that $X_1,X_2,...,X_k$ are not independent (depend heavily on their order) of each other when the balls are chosen without replacement. The linearity of expectation always holds whether the random varibles are independent or not. – Erdos Yi Jun 06 '13 at 00:19