# What is the expected value of this sum?

Let's say I have a bag with numbered slips of paper from 0 to 10. If I draw a 0 then I stop adding to the sum and return the sum. Else I add the number I draw to the current sum and place the slip back in the bag. I keep doing this until I draw the 0 slip. (The initial sum is 0).

What would be the expected value of the sum?

So this is what I've been trying to do.

I let $S$ = the total sum, $X_i$ = the ith slip drawn.

$$\operatorname{E}[S] = \operatorname{E}[\operatorname{E}[S\mid X_1]]$$

$$\operatorname{E}[S] = \sum\limits_{i=1}^{10} \operatorname{E}[S \mid X_1 = i] * \operatorname{P}(X_1 = i)$$

This is the part where I'm a bit confused.

Am I correct to say that $\operatorname{E}[S\mid X_1 = 1]$ is equal to $1 + \operatorname{E}[S]$ and so on?

-
Edited with my attempt – user1698555 Nov 2 '12 at 0:51

You are correct to say that "$\operatorname{E}[S\mid X_1 = 1]$ is equal to $1 + \operatorname{E}[S]$ and so on".

You have a chance of $\frac{10}{11}$ of getting a positive number, and if you do then you expect to add an average of $\frac{11}{2}$ and trying again. So

$$\operatorname{E}[S]=\frac{10}{11}\left(\frac{11}{2}+\operatorname{E}[S]\right)$$

which is easy to solve.

-
Thanks, I just wanted to make sure my reasoning was correct. – user1698555 Nov 2 '12 at 1:05

Hint: Let $X_n$ be the $n$'th number drawn (or $0$ if you stop before drawing $n$ numbers). The expected value of the sum is $\sum_{n=1}^\infty E[X_n]$.

-