Here is the scenario:
I'm trying to find as many golden tickets as I can, so that I can sell them to kids that want to go on a tour of Wonka's chocolate factory.
Fortunately, I have a machine that can tell me the probability that a ticket is present within a chocolate bar without having to open it. I can use this machine on chocolate bars before I must buy them, so I can use it to select the chocolate bars most likely to have tickets.
Of course, the machine isn't accurate, so the probability it gives me will have some error, but this error will be normally distributed around the real probabilities, so it will even out across multiple chocolate bars. This means that if I tested every chocolate bar, I could determine the overall probability of finding a winning ticket by averaging the predictions produced by the machine.
So I test 10,000 chocolate bars (its Costco), and pick the 100 with the highest probabilities as predicted by the machine.
Now, to test the machine's accuracy, I average its predictions for these 100 bars, and I get 0.2 - so there is a 1 in 5 chance that any given chocolate bar will have a ticket - so I expect to find 20 in this group of 100.
The problem? The average of the predictions is above the actual rate at which I discover tickets in this group of 100.
In fact, if I repeat this experiment many times, the average of the predictions is always higher than reality.
I understand why this is, because when I select those chocolate bars with the highest predicted probabilities, I'm more likely to select those with positive error, and less likely to select those with negative error.
My question is: is there any way I can correct for this bias, so that I can accurately estimate the number of chocolate bars in the group of 100?