I'm looking for a general solution to what I assume must be a common problem because it comes up in every Bayesian calculation, but doesn't seem to be directly answered anywhere. I have an extremely good approximation for a population observation distribution. I took a new sample under an experimental condition. I need to know the probability that the known population distribution produced that new sample, or rather the probability of the sample given the known "null" distribution. I know goodness-of-fit tests are supposed to give p-values for this, but I want to do Bayesian analysis (I need a probability) and the population distribution in this case is not Gaussian.
First, and obviously incorrect, idea: I first thought to sum up the probability of each observation. But, suppose the probability Pr(x=5) = 0.001 and I observe a sample X of size 2000 containing x=5 two thousand times. I know intuitively that such a sample shouldn't have come from distribution Y. If I could just add the probabilities, my probability of Pr(X) = 2000 * Pr(x=5) = 2, which is absurd on so many levels. Maybe I need to multiply or divide that result by some integral in the distribution of Y, or something...
Stated simply, is there any general formula (I don't care how ugly) to calculate the probability of observing a sample when the population distribution is known (of any form)?