The reversible-jump Markov chain Monte Carlo state comprises the model index and that model's parameter. Its unnormalized posterior density in model is
For models of equal dimension, choose model with probability and propose using density on the destination parameter space. The equal-dimension reversible-jump acceptance probability is
On acceptance change both model and parameter; on rejection retain both. Choose model proposals connecting all models of positive posterior mass and within-model kernels exploring their supports, with aperiodicity, to obtain an ergodic chain. Include within-model updates targeting its conditional posterior, and use model occupation proportions after the initial transient to estimate posterior model probabilities. The formula includes the model prior probabilities, parameter prior densities, likelihoods, reverse model-selection probability, and reverse parameter-proposal density.
This direct-density formula is Metropolis–Hastings algorithm on a disjoint union of equal-dimensional spaces. If instead a move uses a deterministic bijection with auxiliary proposal densities and , use
The Jacobian determinant is one for identity matching, but equal model dimensions alone do not make a nonlinear map volume-preserving. For a direct proposal density the change of variables is already included in that density, so no additional Jacobian factor is inserted.
For the two Poisson models, use the shape-rate convention for the gamma distribution:
If denotes scale instead, replace every occurrence of the rate below by . Introduce the inactive under model with the proper pseudo-prior , independent of . This pseudo-prior augmentation for model comparison does not change model 's marginal likelihood because the inactive density integrates to one. The two augmented targets on the same positive quadrant are
where
Use a symmetric cross-model proposal that flips the model label and leaves both parameters unchanged. The matching map is the identity, with unit Jacobian determinant, and the common prior factors cancel. Hence the model-switch acceptance probabilities are
Only the second observation's factor changes because is retained as its shared candidate mean. Evaluate the ratio on a logarithmic scale as for the first direction.
For within-model moves, Poisson-gamma conjugacy gives exact Gibbs sampling refreshes:
The two draws are conditionally independent within either model. Choose with fixed positive probabilities between this block refresh and the cross-model proposal. Both moves preserve the augmented posterior; refreshing the inactive parameter maintains its correct distribution and supports mixing. The fraction of retained states labelled estimates .
An equivalent literal dimension-changing implementation deletes on a proposed move, and on a move draws an auxiliary and sets . The birth matching has dimensions and unit Jacobian determinant. Its proposal density cancels the new parameter's prior density, giving the same acceptance ratios above for symmetric selection of move directions. This provides suitable moves without storing an inactive parameter.
For an independent check of Poisson mean equality model comparison, the exact Bayes factor is
It follows by integrating the two gamma likelihood kernels; the common factorial terms cancel. With equal model priors, the exact posterior probability of is , which can also be used to check the RJ-MCMC occupation estimate.
Reversible-jump Markov chain Monte Carlo samples a posterior on a disjoint union of model-specific parameter spaces. A dimension-matching bijection between old parameters plus auxiliary variables and new parameters plus reverse auxiliary variables supplies a reversible proposal. Its acceptance ratio includes posterior-density, model-selection, proposal-density, and Jacobian determinant factors. The equal-dimension reversible-jump acceptance probability is the ordinary density-based special case.