Integrating the two rates out of the Poisson count change-point model with gamma priors gives these weights up to a common factor, by the defining Gamma function integral. Normalizing across the finitely many possible indices gives the exact marginal posterior distribution of , providing a check on Markov chain Monte Carlo estimates. One can also draw from these weights and then draw both rates from their conditional Gamma distributions, producing independent exact joint posterior samples.
Write and . Use shape-rate notation for the Gamma distribution, as in the authoritative PDF: shape and rate give a density proportional to . Conditional independence of the Poisson distributions gives a likelihood function proportional to
The product of factorial terms depends only on the data and can be absorbed into the normalizing constant. Multiplying by the two independent Gamma distribution prior kernels and the uniform prior on the possible indices gives the Poisson count change-point model with gamma priors:
Because the hyperparameters are positive, each possible index gives finite positive gamma integrals, and summing over the finitely many indices yields a proper posterior distribution. At the second likelihood factor is one, so the posterior law of its unused rate remains its prior .