Hi everyboby(adsbygoogle = window.adsbygoogle || []).push({});

I need something very simple for a personnal project, but I'm not quite sure I got it right. Here it is:

Suppose there are 5 boxes side-to-side. One of them contains an object (the probablity is equal for all boxes, 1-in-5). On average, how many attempts does it take to find the object?

Here is what I figured:

if the object is in box 1, you need 1 attempt;

if the object is in box 2, you need 2 attemps;

etc.

After finding the object, you 'randomize' the system and try to find the object again. After doing this 5 times, the object will have been in each of the boxes 1 time (let's say that the system is REALLY random, or that we did a great number of tests). We will then have made 1, 2, 3, 4 and 5 attempts (not necessarily in that order) out of 5 tests. So, on average, we have made

[tex]

\frac{{\left( {1 + 2 + 3 + 4 + 5} \right)}}{5} = 3

[/tex]

attempts.

Generalizing to N boxes, we have

[tex]

\left\langle n \right\rangle = \frac{1}{N}\sum\limits_{i = 1}^N i = \frac{{N + 1}}{2}

[/tex]

So... is this right or am I wrong somewhere? It seems suspiciously simple. Anyway, thanks alot for your help (and sorry about my english...)

**Physics Forums | Science Articles, Homework Help, Discussion**

Dismiss Notice

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Average number of attempts

**Physics Forums | Science Articles, Homework Help, Discussion**