Tutorials › Stochastic Processes › The Independence Metropolis Sampler

Markov Chain Monte Carlo · Tutorial 917 of 994

The Independence Metropolis Sampler

Learn how an independence proposal determines acceptance probabilities, transition probabilities, and tail-coverage guarantees.

Advanced 11 min read

What You'll Learn

  • Derive the independence Metropolis acceptance probability from detailed balance.
  • Specify the sampler when the target density is zero at the current or proposed state.
  • Compute and verify a finite-state independence Metropolis transition matrix.
  • Calculate a stationary acceptance rate for a finite target-proposal pair.
  • Use the target-to-proposal ratio to assess whether proposal tails cover the target.
  • Prove a uniform minorization bound when the target-to-proposal ratio is bounded.

How an Independence Proposal Works

An independence proposal draws each candidate from the same distribution, regardless of the chain's current state. This makes the proposal easy to sample, but it places a particular burden on its tails: the proposal must be able to reach regions that matter under the target. The ratio of target density to proposal density determines whether a proposed move is accepted and provides a direct way to assess that coverage.

Let \((\Omega,\mathcal{F},\mathbb{P})\) be a probability space, and let \((X_n)_{n\ge0}\) be a discrete-time Markov chain with state space \(S\). Write \(\mathcal{F}_n=\sigma(X_0,\ldots,X_n)\) for its natural filtration. Suppose the target distribution has probability density or probability mass function \(\pi\), and the proposal has density or mass function \(q\), both relative to the same underlying measure. Thus \(\int_S \pi(x)\,dx=1\) in a continuous space, or \(\sum_{x\in S}\pi(x)=1\) in a discrete space, with the corresponding condition for \(q\).

Assume that \(q(x)>0\) whenever \(\pi(x)>0\). This support condition ensures that a state with positive target weight has a defined, finite target-to-proposal ratio. At each step, draw \(Y\) from \(q\), independently of the current state \(X_n=x\). Accept the proposal with probability \(\alpha(x,Y)\); if it is rejected, set \(X_{n+1}=x\). The draws used to implement the proposal and acceptance decision can be included in the probability space.

Definition: On states where \(\pi(x)>0\) and \(q(x)>0\), define the weight \(w(x)=\pi(x)/q(x)\). The independence Metropolis acceptance probability is \(\alpha(x,y)=\min\{1,w(y)/w(x)\}\) when \(\pi(y)>0\), and is \(0\) when \(\pi(y)=0\). Equivalently, for positive target densities at both states, \(\alpha(x,y)=\min\{1,\pi(y)q(x)/[\pi(x)q(y)]\}\). If an unnormalized target density is used, its unknown normalizing constant cancels from this ratio.

The rules for zero-target states complete the transition mechanism. A proposal with \(\pi(y)=0\) is rejected when the current state has positive target density. If \(\pi(x)=0\) and \(q(x)>0\), accept a proposal with positive target density with probability \(1\), and reject a proposal with zero target density. Finally, if \(\pi(x)=q(x)=0\), define the transition from \(x\) to draw \(Y\sim q\) and move to \(Y\). This last row is a valid probability distribution; such states have zero target probability. These completions give a transition rule for every state under the stated support condition. In ordinary use the chain is initialized in the positive-target support, and it remains there.

Why This Acceptance Rule Preserves the Target

For a proposed move between two positive-target states, the probability flow from \(x\) to \(y\) before accounting for rejected moves is \(\pi(x)q(y)\alpha(x,y)\). The acceptance rule balances this flow against the reverse flow. This is detailed balance: for distinct states, target mass at \(x\) times transition probability from \(x\) to \(y\) equals target mass at \(y\) times the reverse transition probability.

Theorem: Under the support condition \(q(x)>0\) whenever \(\pi(x)>0\), the independence Metropolis transition kernel \(K\) satisfies detailed balance with respect to \(\pi\), and hence \(\pi\) is invariant: \(\pi K=\pi\). The completed rules above apply at zero-target states.

Proof. First take \(x\ne y\) with \(\pi(x)>0\) and \(\pi(y)>0\). The support condition gives \(q(x)>0\) and \(q(y)>0\). Set \(a=\pi(x)q(y)\) and \(b=\pi(y)q(x)\), both positive. The forward accepted flow is \(a\min(1,b/a)=\min(a,b)\). Reversing \(x\) and \(y\), the accepted flow is \(b\min(1,a/b)=\min(a,b)\). The two flows are equal. If \(\pi(x)>0\) and \(\pi(y)=0\), then the move from \(x\) to \(y\) is rejected, so its flow is zero; the reverse flow is also zero because it is multiplied by \(\pi(y)=0\). Thus detailed balance holds for distinct states, including target-zero states. The diagonal equality holds automatically. Summing detailed balance over \(x\) gives, for each \(y\), \(\sum_x\pi(x)K(x,y)=\pi(y)\sum_xK(y,x)=\pi(y)\), since each row of a transition kernel sums to \(1\). This is \(\pi K=\pi\). \(\square\)

This calculation also explains why the acceptance rule has its particular form. For a pair \(x,y\) with positive target and proposal weights, any acceptance probabilities bounded by \(1\) have accepted forward flow at most \(a\) and accepted reverse flow at most \(b\). A balanced pair of flows therefore cannot exceed \(\min(a,b)\). The rule above attains exactly that flow in both directions. It is the largest pairwise balanced accepted flow available for this proposal.

Worked Finite-State Calculations

Worked Example: Constructing the Transition Matrix

Let \(S=\{1,2,3\}\), with target distribution \(\pi=(\tfrac12,\tfrac13,\tfrac16)\) and uniform proposal distribution \(q=(\tfrac13,\tfrac13,\tfrac13)\). Find the independence Metropolis transition matrix, writing distributions as row vectors.

First check normalization: \(\tfrac12+\tfrac13+\tfrac16=1\), and each proposal probability is \(\tfrac13\), so the proposal probabilities sum to \(1\). The weights are \(w(1)=(\tfrac12)/(\tfrac13)=\tfrac32\), \(w(2)=(\tfrac13)/(\tfrac13)=1\), and \(w(3)=(\tfrac16)/(\tfrac13)=\tfrac12\). The acceptance probabilities from state \(1\) to states \(2\) and \(3\) are \(\min(1,1/(\tfrac32))=\tfrac23\) and \(\min(1,(\tfrac12)/(\tfrac32))=\tfrac13\). From state \(2\), acceptance to states \(1\) and \(3\) is \(1\) and \(\tfrac12\). From state \(3\), acceptance to either \(1\) or \(2\) is \(1\).

Each off-diagonal transition probability is the proposal probability times the acceptance probability. The diagonal probability includes proposing the current state and rejecting any other proposal. Thus, from state \(1\), the probabilities of moving to \(2\) and \(3\) are \(\tfrac13\cdot\tfrac23=\tfrac29\) and \(\tfrac13\cdot\tfrac13=\tfrac19\); the remaining probability is \(1-\tfrac29-\tfrac19=\tfrac23\). From state \(2\), the probabilities of moving to \(1\) and \(3\) are \(\tfrac13\) and \(\tfrac13\cdot\tfrac12=\tfrac16\); the remaining probability is \(1-\tfrac13-\tfrac16=\tfrac12\). From state \(3\), the probabilities of moving to \(1\) and \(2\) are each \(\tfrac13\), leaving \(\tfrac13\) on the diagonal. Therefore

$$ P= \begin{bmatrix} \tfrac23&\tfrac29&\tfrac19\\ \tfrac13&\tfrac12&\tfrac16\\ \tfrac13&\tfrac13&\tfrac13 \end{bmatrix}. $$

Check the rows: \(\tfrac23+\tfrac29+\tfrac19=1\), \(\tfrac13+\tfrac12+\tfrac16=1\), and \(\tfrac13+\tfrac13+\tfrac13=1\). To verify invariance, multiply by the target row vector. The first coordinate is \(\tfrac12\cdot\tfrac23+\tfrac13\cdot\tfrac13+\tfrac16\cdot\tfrac13=\tfrac13+\tfrac19+\tfrac1{18}=\tfrac12\). The second is \(\tfrac12\cdot\tfrac29+\tfrac13\cdot\tfrac12+\tfrac16\cdot\tfrac13=\tfrac19+\tfrac16+\tfrac1{18}=\tfrac13\). The third is \(\tfrac12\cdot\tfrac19+\tfrac13\cdot\tfrac16+\tfrac16\cdot\tfrac13=\tfrac1{18}+\tfrac1{18}+\tfrac1{18}=\tfrac16\). Hence \(\pi P=\pi\).

Worked Example: Stationary Acceptance Rate

For the target and proposal in the preceding calculation, find the probability that a proposal is accepted when the current state has distribution \(\pi\).

From state \(1\), the acceptance probability is the sum over proposed states of proposal probability times acceptance probability: \(\tfrac13\cdot1+\tfrac13\cdot\tfrac23+\tfrac13\cdot\tfrac13=\tfrac13+\tfrac29+\tfrac19=\tfrac23\). From state \(2\), it is \(\tfrac13\cdot1+\tfrac13\cdot1+\tfrac13\cdot\tfrac12=\tfrac13+\tfrac13+\tfrac16=\tfrac56\). From state \(3\), all three proposals are accepted, including a proposal of state \(3\), so the acceptance probability is \(\tfrac13+\tfrac13+\tfrac13=1\). Averaging these conditional probabilities with the target weights gives \(\tfrac12\cdot\tfrac23+\tfrac13\cdot\tfrac56+\tfrac16\cdot1=\tfrac13+\tfrac5{18}+\tfrac16=\tfrac7{9}\).

Check by accepted-flow accounting: the total stationary probability of accepted moves from state \(1\) is \(\tfrac12\cdot\tfrac23=\tfrac13\); from state \(2\), it is \(\tfrac13\cdot\tfrac56=\tfrac5{18}\); and from state \(3\), it is \(\tfrac16\cdot1=\tfrac16\). Their sum is \(\tfrac13+\tfrac5{18}+\tfrac16=\tfrac7{9}\), as calculated.

Tail Coverage and a Uniform Bound

The weight \(w(x)=\pi(x)/q(x)\) is large where the target puts relatively more mass than the proposal. When this ratio is unbounded, the proposal can undersample some target-tail regions. A chain that reaches such a region may then reject many proposals: candidates from the more typical proposal region have smaller weights and hence small acceptance probabilities.

Proposition: Suppose \(w(x)\le M\) wherever \(\pi(x)>0\), for a finite constant \(M\). For every current state \(x\) with \(\pi(x)>0\) and every measurable set \(A\), the transition kernel satisfies \(K(x,A)\ge \pi(A)/M\). This bound does not assert convergence; it is a uniform one-step lower bound on the probability of moving into \(A\).

Proof. At a positive-target current state \(x\), \(w(x)\le M\). For a proposed state \(y\) with positive target density, the accepted-move density is \(q(y)\alpha(x,y)=q(y)\min(1,w(y)/w(x))=\min(q(y),\pi(y)/w(x))\). The bound \(w(y)\le M\) gives \(q(y)=\pi(y)/w(y)\ge\pi(y)/M\), and \(w(x)\le M\) gives \(\pi(y)/w(x)\ge\pi(y)/M\). The minimum of two quantities each at least \(\pi(y)/M\) is at least \(\pi(y)/M\). Integrating this accepted-move density over \(A\) gives an accepted transition probability at least \(\pi(A)/M\). Rejected proposals can only add probability to \(K(x,A)\), not subtract from it, so \(K(x,A)\ge\pi(A)/M\). In a discrete space the same argument is a sum over \(y\in A\) rather than an integral. \(\square\)

In the finite example, the largest weight is \(M=\tfrac32\), so this bound gives \(K(x,A)\ge\tfrac23\pi(A)\) for every positive-target current state. The proposition is useful as a diagnostic: bounded target-to-proposal ratios guarantee that no target region is arbitrarily difficult to reach in one step under this bound. If the ratio is unbounded, this particular uniform guarantee is unavailable.

Worked Example: A Proposal with Too-Light Tails

Consider a standard normal target density \(\pi(x)=(2\pi)^{-1/2}e^{-x^2/2}\) and a normal proposal with mean \(0\) and variance \(\tfrac14\), whose density is \(q(x)=\tfrac{2}{\sqrt{2\pi}}e^{-2x^2}\). Both are positive for every real \(x\), so the acceptance ratio is defined at every pair of finite states. The proposal is narrower than the target.

The target-to-proposal ratio is \(w(x)=\pi(x)/q(x)=\tfrac12 e^{(-x^2/2+2x^2)}=\tfrac12e^{3x^2/2}\). As \(|x|\) increases, \(e^{3x^2/2}\) increases without bound, so \(w\) is unbounded. In particular, from current state \(x=2\), the weight is \(w(2)=\tfrac12e^6\). If the proposal is \(y=0\), then \(w(0)=\tfrac12\), and the acceptance probability is \(\min\{1,w(0)/w(2)\}=\min\{1,(\tfrac12)/(\tfrac12e^6)\}=e^{-6}\). In the reverse direction, from \(0\) to \(2\), the ratio of weights is \(e^6\), so the acceptance probability is \(\min(1,e^6)=1\).

Interpretation: the target assigns relatively more weight to extreme states than this proposal does. Once the chain is in such a state, proposals near the center are often rejected. This example does not say that every narrow proposal is unusable, but it demonstrates why checking \(w(x)\) in the tails matters more than checking acceptance near the center.

Common Mistake and Practical Checks

Common mistake: reversing the ratio. In the finite example, the correct acceptance probability from state \(1\) to state \(3\) is \(\min\{1,w(3)/w(1)\}=\min\{1,(\tfrac12)/(\tfrac32)\}=\tfrac13\). Reversing the ratio gives \(\min\{1,w(1)/w(3)\}=\min\{1,3\}=1\), which is wrong. It also breaks detailed balance: with the incorrect rule, the flow from \(1\) to \(3\) would be \(\pi(1)q(3)\cdot1=\tfrac12\cdot\tfrac13=\tfrac16\). The reverse acceptance would be \(\tfrac13\), giving reverse flow \(\pi(3)q(1)\cdot\tfrac13=\tfrac16\cdot\tfrac13\cdot\tfrac13=\tfrac1{54}\). These are unequal, whereas the correct forward and reverse flows are both \(\tfrac1{18}\).

A reliable calculation keeps the proposal and acceptance stages separate: first compute \(q(y)\), then multiply by \(\alpha(x,y)\) for an off-diagonal transition, and finally place all rejected probability on the diagonal. Check every transition row sums to \(1\), and, when calculating a stationary distribution, verify \(\pi P=\pi\). In continuous spaces, inspect the ratio \(\pi/q\) in the tails rather than inferring coverage from a few central values. In all cases, the support condition matters: if the proposal assigns zero density to a region with positive target probability, the usual independence sampler cannot reach that region from its proposal mechanism.

Check Your Understanding

Use the acceptance rule and verify each finite-state calculation by substitution.

  1. For positive-target states \(x\) and \(y\), derive the acceptance probability from the forward and reverse proposal flows.
  2. In the three-state example, calculate the transition probability from state \(2\) to state \(3\), and verify the full second row sums to \(1\).
  3. Explain why a proposal to a zero-target state is rejected when the chain is currently at a positive-target state.
  4. For the normal target and proposal example, calculate \(\alpha(1,0)\) from the displayed weight formula.
  5. State the bounded-weight condition in the minorization proposition and explain what it guarantees, and what it does not guarantee.