For , start at any . Propose uniformly from this same finite set and accept it with probability
Otherwise retain . The uniform proposal is symmetric, so this is the Metropolis–Hastings algorithm with target . Detailed balance follows because accepted probability flow is proportional to . The chain is irreducible and has positive self-transition probability, hence converges to that binomial equilibrium law. At the degenerate parameters zero or one, the target is simply a point mass and can be simulated as a constant chain.
Use the prior itself as an independence proposal: draw with and propose . This indeed samples , since the geometric series sums to one. Starting from any allowed current value , accept the proposal with probability
The Hastings proposal ratio cancels the prior ratio in the posterior, leaving exactly the binomial likelihood ratio; its binomial coefficient also cancels. All allowed states communicate, and proposing the current state gives a self-loop. Detailed balance therefore gives the specified posterior as the stationary law, and the chain converges to it. Its normalizing constant is finite and positive because it is a prior average of a nonnegative, nonzero likelihood.

Articles by others on the same topic (0)

There are currently no matching articles.