Marginal posterior weights of a Poisson count change point (source code)

= Marginal posterior weights of a Poisson count change point
{title2=$w_m=\frac{\Gamma(\alpha+S_m)\Gamma(\gamma+S_N-S_m)}{(\beta+m)^{\alpha+S_m}(\delta+N-m)^{\gamma+S_N-S_m}}$}

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 $m$, providing a check on <Markov chain Monte Carlo> estimates. One can also draw $m$ from these weights and then draw both rates from their conditional <Gamma distributions>, producing independent exact joint posterior samples.