Average tries needed to find the right box (Amount of boxes declining)

108 Views Asked by At

Let's say I have 10 boxes, and one of them contains an apple. I open one of them at a time, looking for the apple. Each time there will be one less box to open (And thus a higher chance of opening the right one), how many tries will it take on average to find the apple?

I've dabbled with this for a while, and I've come up with a few possible answers, although none of them seems 'right'.

Will it one average just be 5 tries, so when I've tried half the boxes, I would probably have found it?

Will it be around 6 tries, because at the first attempt the chance is 1/10, the next time it's 1/9, and if you keep going like that, and add the chances together, then at the 6th try, the chance will be just over 100% (109.5%).

I feel like there might be an easy answer, but for the life of me, I cannot figure it out.

Thank you for your time.

1

There are 1 best solutions below

8
On BEST ANSWER

The probability argument might go:

If $T_n$ is the time, starting with $n$ boxes, then the expected (or average) value of $T_n$ is:

$$E(T_n)=1+\frac{n-1}{n}E(T_{n-1}), E(T_1)=1\tag{1}$$

This can be written as: "It requires one box, and, with probability $1-\frac{1}{n}=\frac{n-1}{n},$ we are left with the time for game $T_{n-1}.$"

So $$\begin{align}E(T_n)&=1+\frac{n-1}{n}+\frac{n-1}{n}\frac{n-2}{n-1}+\cdots\\&=1 + \frac{n-1}{n}+\frac{n-2}n+\cdots +\frac{1}{n}\\&=\frac{n+1}{2} \end{align} \tag{2}$$

You you don't like the hand-waving, you can prove $(2)$ from $(1)$ by induction.

Basically, the probability that you will pick the box at the $k$th opening is $\frac{1}{n}$ for all $k=1,\dots,n.$ That is sometimes counter-intuitive to beginning probability students, but is true.