You use a Metropolis random-walk sampler for the unnormalised target p~(x)=e−x2/2. The current state is x=1. Find the acceptance probability for the proposals x′=−0.5 and x′=2. If the uniform random number is u=0.3 for x′=2, is it accepted? Why is the normalising constant not needed?

Probabilistic models, MCMC
Level L2 Elementary. Length Short. Nature Mat Mathematical.

What's being asked

Whether you can compute a Metropolis acceptance ratio and see that the constant cancels.

Key idea

For a symmetric proposal, α=min⁡ ⁣(1,p~(x′)/p~(x)). Accept if u<α.

Steps

  1. The proposal is a symmetric random walk, so q(x′∣x)=q(x∣x′) and the q terms cancel. Then α=min⁡(1,p~(x′)/p~(x)).
  2. For x′=−0.5: p~(x′)/p~(x)=exp⁡(−(0.25−1)/2)=e0.375=1.455. This exceeds 1, so α=1 and the move is always accepted, since −0.5 is closer to the mode.
  3. For x′=2: p~(x′)/p~(x)=exp⁡(−(4−1)/2)=e−1.5=0.223. So α=0.223.
  4. With u=0.3: 0.3>0.223, so the move is rejected and the chain stays at x=1. A rejected step still counts as a sample.
  5. The normalising constant Z appears in both p(x′)=p~(x′)/Z and p(x)=p~(x)/Z, so it cancels in the ratio. This is why MCMC works for posteriors known only up to a constant.

Common mistakes

How long your answer should be

5–6 lines with the two ratios.

Last checked on 4 December 2026.

Read this

Previous in Probabilistic models: In the chain A→B→C of binary variables, P(A=1)=0.3, P(B=1∣A=1)=0.8, P(B=1∣A=0)=0.1, P(C=1∣B=1)=0.9 and P(C=1∣B=0)=0.2. Use variable elimination to find P(C=1). Why is this cheaper than summing the full joint?
Next in Probabilistic models: Three binary variables x1,x2,x3∈{0,1} form a chain MRF x1−x2−x3 with p(x)=1Zψ(x1,x2) ψ(x2,x3), where ψ(a,b)=3 if a=b and ψ(a,b)=1 if a≠b. What are Z, p(x2=0), p(x1=x2=x3=0) and p(x1=x3)?