# Probability problem! Extract one coin with probability 10%

If we have a box full of coins, with one gold coin with probability 10% to get extracted.

Given this, is it possible to find out how many times in average I have to try extracting a coin until I get the gold coin?

Note: if I extract a coin and it's not the desired one I have to put it again in the box. And I can extract ONE coin at a time.

• What are your thoughts, attempts? You should include these in every post. Also, phrases like "Probability problem!" in the title are not very informative, and it's not that exciting. Hehe. – Em. Jun 6 '16 at 21:02
• Also, since it has been answered, you are describing a geometric distribution on the integers greater than $0$. – Em. Jun 6 '16 at 21:20
• @probablyme To answer your request, this isn't actually a homework, this question came to my mind while I was playing a game where to get a secret object I had only 10% of chance.. I know it's pretty strange, but I was wondering how many times I needed to try and If there was actually a "realistic" probabilistic average of tries! – Ergo Jun 29 '16 at 21:58

With probability $0.1$, you'll get the coin in $1$ try (one success).

With probability $0.9\cdot0.1$, you'll get the coin in $2$ tries (one failure, one success).

With probability $0.9\cdot0.9\cdot0.1$, you'll get the coin in $3$ tries (two failures, one success).

$$\vdots$$

The expected number of tries is thus:

$$\sum_1^\infty 0.9^{n-1}\cdot0.1\cdot n = 10$$

(In $n$ tries we have failed $n-1$ times ($0.9^{n-1}$) and succeeded once ($0.1$), and we need to sum over all possible values of $n$.)

This lines up with our intuition: if we flip a coin, we expect on average $2$ flips before we get tails, since the probability of tails of $\frac 12$. Here, since the probability of the gold coin is $\frac{1}{10}$, we intuit an expected waiting time of $10$.

Just to make this post self-contained, I'll show an evaluation of the sum here. Note that this is probably not the easiest way to evaluate the sum, so if anyone would like to edit this post with a more tangible way, feel free (this is just the first method that came to mind).

$$f(x) = \sum_1^\infty{x^n} = \frac{1}{1-x}, \ \ |x|<1$$ $$f'(x) = \sum_1^\infty{n x^{n-1}} = \frac{1}{(1-x)^2}, \ \ |x|<1$$

We want to evaluate:

$$0.1 \cdot \sum_1^\infty{n\cdot 0.9^{n-1}}$$

Plugging in to the second equation, we get:

$$0.1 \cdot \frac{1}{(1-0.9)^2} = 0.1 \cdot 100 = 10$$

• Why are you saying that with probability 0.1 you'll get the coin in 1 try? Isn't that 10/100 so we have 10%, shouldn't it be 10 tries? – Ergo Jun 6 '16 at 21:10
• Everything you said is correct, so I'm not sure where your confusion is. There is a 10% (=$0.1$) chance we'll get the gold coin on try number one. If we don't (90%), there is a 10% chance we'll get the gold coin on try number two. We need to sum up over all possible values - in theory it might take infinitely many tries to get the golden coin. When we sum up over all values, the sum converges to $10$, meaning on average it will take $10$ tries to get the gold coin. – anonymouse Jun 6 '16 at 21:12
• Ahh okay. There is still something else I don't understand why do we have to multiply by n in the sum? And how do you evaluate the limit of the sum? – Ergo Jun 6 '16 at 21:17
• To your first question, we looking for the expected number of tries. So in the case of $2$ tries, the probability that this happens is $0.9\cdot0.1 = 0.09$, but this case takes... well, it takes $2$ tries. So we need to multiply the $2$ in. Essentially what we're saying is that the expected number of tries is the sum of the amount of tries multiplied by their respective probabilities: $E(X) = \sum{X\cdot P(X)}$. To your second question, I'll edit my post with the evaluation of the sum. – anonymouse Jun 6 '16 at 21:23
• I've edited the post with an evaluation of the sum. Let me know if you have any lingering questions. – anonymouse Jun 6 '16 at 21:35

Let's say the expected number of trials to get a gold coin is $E$. On the first try, we either get a gold coin, with probability $1/10$, or we don't, with probability $9/10$. If we don't get the gold coin on the first trial, then we are back where we started, except that the expected total number of trials is now $E+1$. So $$E = \frac{1}{10} \cdot 1 + \frac{9}{10} \cdot (E+1)$$ Solve for $E$.

Way too detailed for such a simple problem.

It is this easy: $P(gold coin)=\frac{1}{10}$. Hence, after $10$ tries we can expect a gold coin on average.

• I agree that intuition leads us to this answer, but I don't know if this really explains what's going on behind the scenes. For someone really lacking the intuition, there's no reason to believe $10$ is the answer when the number of tries could theoretically be infinite. – anonymouse Jun 6 '16 at 21:15