8. Poisson–Gamma Model#
Lecture errata#
At 1:39 in the video, the likelihood should be proportional to \(\lambda^{16} e^{-6\lambda}\). The lecture version is missing the 6.
Model#
Here we have another conjugate model. The Poisson likelihood describes the number of marked cells on some plates.
\[\begin{split}
\begin{align*}
X_i | \lambda &\sim Poi(\lambda) \\
\lambda &\sim Ga(\alpha, \beta)
\end{align*}
\end{split}\]
This time there are two new wrinkles. One, we’re not given the gamma prior parameters directly. Instead we want a mean of 4 and a variance of \(1/4\).
We know that the gamma distribution’s mean is \(\alpha/\beta\) and the variance is \(\alpha/\beta^2\), so we use that knowledge to solve for the parameters \(\alpha=64, \beta=16\).
\(\sum_{i=1}^n X_i = 2 + 0 + 1 + 5 + 7 + 1 = 16, n=6\)
So,
\[\begin{split}
\begin{align*}
\lambda \mid X_i &\sim Ga(\alpha + \sum_{i=1}^n X_i, \beta + n) \\
&\sim Ga(64 + 16, 16 + 6) \\
&\sim Ga(80, 22)
\end{align*}
\end{split}\]
Our posterior mean is \(\alpha/\beta = 3.64\).