= Poisson-gamma conjugacy
{c}
{title2=$\theta\mid x\sim\operatorname{Gamma}(r+\sum_i x_i,\lambda+n)$}
For conditionally <independent> <Poisson> observations of mean $\theta$ and a <gamma distribution> prior of shape $r>0$ and rate $\lambda>0$, the <likelihood function> contributes $\theta^{\sum_i x_i}e^{-n\theta}$. Multiplying by the <prior density> gives a <posterior distribution> with shape $r+\sum_i x_i$ and rate $\lambda+n$. The single-observation update is shape $r+X$ and rate $\lambda+1$.
The <posterior mean> is the <convex combination>
$$
\frac{r+\sum_i x_i}{\lambda+n}=\frac\lambda{\lambda+n}\frac r\lambda+\frac n{\lambda+n}\bar x.
$$
Thus the <prior mean> $r/\lambda$ and the sample <maximum-likelihood estimate> $\bar x$ bracket it. Integrating the next conditional <Poisson distribution> against this <posterior distribution> gives the <Poisson-gamma mixture>, a <negative binomial distribution>; its spread includes uncertainty in $\theta$ as well as the conditional count variation.
Back to article page