This question is a possible duplicate of this one but I would like to go a bit further.
I have a set of values $X=x_1, x_2, \cdots, x_n$ that are iid estimates of a reference value $y$ given by a Monte-Carlo like algorithm. I know my reference value $y$ and I would like to assess the quality of the prediction given by the algorithm. An indicator of the quality of the prediction could be the answer to the following question:
What is the probability of picking $y$ using the distribution of $X$?
I know about the solution based on the rank of the reference value proposed here but it seems limited to me. In the example below the estimated values (blue bars) follow a long tailed distribution and the orange, green and red bars are three different cases of reference value. The orange and the green bars have the same rank but it seems pretty obvious to me that the probability of the orange bar being picked from the blue bars distribution is higher that for the green bar. The green and the red bars have a different rank but I would intuitively say that their probability of being picked using the blue bars distribution is quite similar.
I intuitively think there could be some kind of moment-like indicator to estimate how the distribution fits with the reference. For example:
But I don't know how to relate it to a probability of the reference being picked using the same distribution as the sample points.
Is there any method giving a better answer to this question than the rank-based method?
Edit: I precise that I have no assumption about the distribution of $X$.