Probability of finding an item in a set of bags [closed]

I just saw an interesting probability question.

There are 5 unbiased bags and the probability that one of them contains the diamond is 80%.

We open four bags and all of them are empty. What is the probability that the last bag has the diamond?

My initial guess was $\frac{1}{5}*80\%$ but I wasn't sure whether the probability would decrease or increase.


Let $D_i$ be the event that Bag $i$ has the diamond in it and $D$ be the event that at least one of the bags has a diamond in it.

I am assuming that by saying "the" diamond, there is at most one diamond amongst the 5 bags. Also, I'd guess by "unbiased" bags we mean that before we look in any bag we have $P(D_i|D)=\frac{1}{5}$

This means that before we look in any bag, we have $$P(D_i) = P(D\cap D_i) + P(\neg D \cap D_i) = P(D)P(D_i|D) + P(\neg D)P(D_i|\neg D)$$ $$ = (0.8)P\frac{1}{5}+(0.2)(0) = \frac{4}{25} = 0.16$$

Now that we have looked in 4 of the bags and not found a diamond (let's call this event $E$), we have to revise the $P(D)$ in light of this information (as suggested in the comments, this will be an application of Baye's Theorem).

$$P(D|E) = \frac{P(D)P(E|D)}{P(E)}$$

Let's calculate each of these components:

$P(D)=0.8$ is just our prior probability of the diamond being in one of the bags.

$P(E|D)$ is the probability we'd see four empty bags given the diamond is in one of them (and the bags are unbiased). Since the bags are "unbiased" this is just the probability that the diamond is in the fifth bag (assuming we open them in order -- we'd get the same results if we chose some other order). Therefore $P(E|D)= \frac{1}{5}$

Finally, $P(E)$ is the unconditional probability we'd not find a diamond in the first four bags. We get this from the Law of Total Probability:

$$P(E) = P(D)P(E|D) + P(\neg D)P(E|\neg D) = 0.8\frac{1}{5} + 0.2(1) = \frac{4}{25} + \frac{5}{25} = \frac{9}{25}$$

Putting this together we get:

$$P(D|E) = \frac{\frac{4}{25}}{\frac{9}{25}} = \frac{4}{9} \approx 44\%$$

Since there is only one bag left, $P(D) = P(D_5)$

So our probability of finding the diamond has actually increased quite a bit, since a priori it was much more likely that the diamond is in one of the bags.


You may also solve these types of questions more intuitively without Bayes. Think of a very large number (normalized to 100) of repetitions of the described situation. In $20$ of the cases the diamond will not be in any of the bags and in $80$ of the cases the diamond will be in one of the bags. In $1/5$ of the cases with diamond it will be in the last opened bag, i.e. in $\frac{1}{5}80=16$. So, in total, the four first bags will be empty in $36 $ cases and in $16$ of these cases the diamond will be in the fifth bag, hence $p=16/36=0.444\,44.$