# Expected value: random prizes until occurrence of termination 'prize'

I have 10 boxes of which 9 have a coin and 1 is empty.

I can choose boxes and keep the prizes until the empty one appears.

What's the expected value?

First I thought:

$$E$$ must the the mean between the proba of getting the empty in position 1 to 10, and the prize for each case.

$$E=0\cdot\frac{1}{10}+1\cdot\frac{9}{10}\cdot\frac{1}{9}+...+8\cdot\frac{9}{10}\cdot\frac{8}{9}\cdot\frac{7}{8}\cdot\frac{6}{7}\cdot\frac{5}{6}\cdot\frac{4}{5}\cdot\frac{3}{4}\cdot\frac{2}{3}\cdot\frac{1}{2}+9\cdot\frac{9}{10}\cdot\frac{8}{9}\cdot\frac{7}{8}\cdot\frac{6}{7}\cdot\frac{5}{6}\cdot\frac{4}{5}\cdot\frac{3}{4}\cdot\frac{2}{3}\cdot\frac{1}{2}$$

Of course this reduces to $$\frac{0}{10}+\frac{1}{10}+\frac{2}{10}+\frac{3}{10}+\frac{4}{10}+\frac{5}{10}+\frac{6}{10}+\frac{7}{10}+\frac{8}{10}+\frac{9}{10}$$

Now, I am trying to see what's the right way to think about it in a more formal way.

My main though is, defining the random variable $$X$$ as a sequence of 10 outcomes, i.e., $$X=(X_1,X_2,X_3,X_4,X_5,X_6,X_7,X_8,X_9,X_{10})$$

and then, the probability of $$X_i$$ being the empty box, is the same for any $$i$$, hence, it's $$\frac{1}{10}$$.

$$E(X)=\sum_{i=0}^{9}\frac{i}{10}$$

My question is:

Is this the right formal way to put it?

• There's nothing wrong with what you wrote though I think it is clearer to simply remark that, as the probability that the empty box is in any given position is $\frac 1{10}$ the answer is $E=\sum_{i=0}^9\frac i{10}$. For instance...how would you handle it if they payout were, say, the square of the number of non-empty boxes you encountered? – lulu Dec 18 '18 at 13:40