= Solution
Write $m=r+s$ and $\beta=\lambda+n$. Conditional independence of the next count given $\theta$ allows us to average its <Poisson distribution> over the <posterior distribution>:
$$
\begin{aligned}
\mathbb P(X_{n+1}=k\mid\boldsymbol x)&=\int_0^\infty\frac{e^{-\theta}\theta^k}{k!}\frac{\beta^m}{\Gamma(m)}\theta^{m-1}e^{-\beta\theta}\,d\theta\\
&=\frac{\Gamma(k+m)}{\Gamma(m)k!}\frac{\beta^m}{(\beta+1)^{k+m}}\\
&=\binom{k+m-1}{k}\left(\frac\beta{\beta+1}\right)^m\left(\frac1{\beta+1}\right)^k.
\end{aligned}
$$
This <Poisson-gamma mixture> is the <posterior predictive distribution>. In the stated <negative binomial distribution> convention its parameters are
$$
\boxed{m=r+\sum_i x_i,\qquad p=\frac{\lambda+n}{\lambda+n+1}}.
$$
Its <expected value> $m/\beta$ equals the <posterior mean> of $\theta$, while its <variance> $m/\beta+m/\beta^2$ includes both conditional Poisson variation and uncertainty in $\theta$.
Back to article page