I have an urn containing $N$ balls, of which $n$ ~ Uniform(1, ..., $N$) are white and the rest black. After sampling $i$ balls without replacement (of which $m$ are white), how can I find the conditional distribution on the colour of the next ball, p($x_{i+1}$ | $m$)?
I've been reading about hypergeometric and beta-binomial distributions but haven't been able to work out an answer. Thanks.
Define the events $A=\{x_{i+1}=\text{white}\}$, $B=\{\text{in $i$ firstly sampled balls $m$ are white}\}$. By definition of conditional probability, $$ p(x_{i+1}\mid m)=\mathbb P(A\mid B) = \frac{\mathbb P(A\cap B)}{\mathbb P(B)} $$ Find numerator and denominator by Law of total probability. $$ \mathbb P(B) = \sum_{n=1}^N p(n)\mathbb P(B\mid \text{$n$ white balls in urn})=\sum_{n=m}^N \frac1N \frac{\binom{n}{m}\binom{N-n}{i-m}}{\binom{N}{i}} $$ It is assumed that the binomial coefficients vanish if the subscript exceeds the upper index. So we can rewrite this sum in more convinient form $$ \mathbb P(B) =\frac1N \frac{1}{{\binom{N}{i}}} \sum_{n=0}^N \binom{n}{m}\binom{N-n}{i-m} = \frac1N \frac{\binom{N+1}{i+1}}{{\binom{N}{i}}}. \tag{1}\label{1} $$ In last equality we applied the equation (8) from this wiki page.
Similar way, $$ \mathbb P(A\cap B) = \sum_{n=1}^N p(n)\,\mathbb P(B\mid n)\,\mathbb P(A\mid B \cap \{n \text{ white balls\}}) $$ $$=\sum_{n=m+1}^N \frac1N \frac{\binom{n}{m}\binom{N-n}{i-m}}{\binom{N}{i}}\,\frac{n-m}{N-i}. $$ Rewrite $$ \binom{n}{m}\frac{n-m}{N-i} = \frac{m+1}{N-i} \binom{n}{m+1} $$ (simply check the identity!). Then
$$ \mathbb P(A\cap B) = \frac1N \frac{m+1}{N-i} \frac{1}{\binom{N}{i}} \sum_{n=m+1}^N {\binom{n}{m+1}\binom{N-n}{i-m}} $$ $$=\frac1N \frac{m+1}{N-i} \frac{1}{\binom{N}{i}} \sum_{n=0}^N {\binom{n}{m+1}\binom{N-n}{(i+1)-(m+1)}} = \frac1N \frac{m+1}{N-i} \frac{\binom{N+1}{i+2}}{\binom{N}{i}} \tag{2}\label{2}. $$ In last equality we used equation (8) from wiki again.
Finally, put (\ref{1}) and (\ref{2}) into the conditional probability: $$ p(x_{i+1}\mid m)=\frac{ \frac1N \frac{m+1}{N-i} \frac{\binom{N+1}{i+2}}{\binom{N}{i}}}{ \frac1N \frac{\binom{N+1}{i+1}}{\binom{N}{i}}} = \frac{m+1}{i+2}. $$
Edit: As rightly noted by Luke Hewitt, this solution implicitly assumes that $m> 0$. For this case only the equality (\ref{1}) is valid. For $m=0$,
$$ \mathbb P(B) =\frac{\sum_{n=1}^N \binom{n}{m}\binom{N-n}{i-m}}{N{\binom{N}{i}}} =\frac{1}{N{\binom{N}{i}}} \sum_{n=0}^N \binom{n}{m}\binom{N-n}{i-m}-\frac1N = \frac1N \frac{\binom{N+1}{i+1}}{{\binom{N}{i}}}-\frac1N. \tag{3}\label{3} $$ Divide (\ref{2}) to (\ref{3}) and obtain the conditional probability $p(x_{i+1}\mid m)$ for $m=0$: $$ p(x_{i+1}\mid m) =\frac{m+1}{i+2}\cdot\frac{N+1}{N-i}. $$
So, the final answer looks as: $$ p(x_{i+1}\mid m) =\begin{cases}\frac{m+1}{i+2}\cdot\frac{N+1}{N-i}, & m=0 \cr \frac{m+1}{i+2} & m>0 \end{cases} $$