A coin is in one of n boxes. The probability that it is in the ith box is pi. If you search in the ith box and it is there, you find it with probability ai. Show that the probability p that the coin is in the jth box, given that you have looked in the ith box and not found it, is
p={pj/(1−aipi),(1−ai)pi/(1−aipi),if j=i,if j=i.