12. Conjugate Gamma-Poisson Model#

The professor cites George et al. [1993] as the source of this example.

Model#

We’ll model the number of failures for each pump \(i\) using a Poisson distribution, with the rate parameter \(\theta_i\) modified by a time factor \(t_i\) to add a linear time dependency to the rate:

\[x_i \mid \theta_i \sim \text{Pois}(\theta_i t_i)\]

So the likelihood is proportional to:

\[f(x_i \mid \theta_i) \propto \prod_{i=1}^{n}\theta_i^{x_i} e^{-\theta_i t_i}\]

We then place a Gamma prior on the rate of failure for each pump, but we’re fixing the shape parameter \(\alpha\) at 1, so it reduces to an Exponential distribution:

\[ \theta_i \mid \beta \sim \text{Exp}(\beta) \propto \beta e^{-\beta \theta_i}\]

Our prior on \(\beta\) is another Gamma distribution:

\[ \beta \sim \text{Ga}(c, d) \propto \beta^{c-1}e^{-d\beta}\]

The joint distribution:

\[ \pi(x, \theta, \beta) \propto \prod_{i=1}^n \theta_i^{x_i} e^{-\theta_i t_i} \cdot \beta e^{-\beta \theta_i} \cdot \beta^{c-1} e^{-d\beta} \]

Full Conditionals#

For each \(\theta_i\):

\[ \pi(\theta_i \mid \theta_{\neq i}, \beta, x) \sim \text{Gamma}(x_i + 1, \beta + t_i) \]

For \(\beta\):

\[ \pi(\beta \mid \theta, x) \sim \text{Gamma}(m + c, \sum_{i=1}^{n} \theta_i + d) \]

Implementation is on the next page.