Probabilities for unknown finite population from sample? If i have a known population ($N$ marbles of which $M$ are black) and draw $n$ samples without replacement the probability to draw $x$ black marbles is given by the hypergeometric distribution.
Is there a way to get probabilities for the total number of blacks $M$ from the number of black marbles $x$ in my sample?
 A: The probability of extracting exactly $x$ black marbles in a sample of size $n$ from a population of $N$ marbles of which $M$ are black can be calculated as:
$$P(X=x|n,N,M) = \frac{\binom{M}{x}\binom{N-M}{n-x}}{\binom{N}{n}}$$
If you assume that all values of $M$ compatible with your result are equally likely (this would be André's prior distribution assumption, I believe), you can use the exact same formula with a different twist, considering the total number of black marbles, $M$, as the independent variable, and the number of black marbles in your sample, $x$, as a parameter instead:
$$f(M) = P(X=x|n,N,M) = \frac{\binom{M}{x}\binom{N-M}{n-x}}{\binom{N}{n}}$$
The above function computes the relative likelihood of a value of $M$, and the value that maximizes it, is the maximum likelihood estimator of $M$ for the population. If you plot the above function for all possible values, $M\in[x,N-n+x]$, after normalization you'll get a probability distribution which can be used to compute the probabilities you are after.
