When running the Metropolis-Hastings algorithm with uniform candidate distributions, what is the rationale of having acceptance rates around 20%?

My thinking is: once the true (or close to true) parameter values are discovered, then no new set of candidate parameter values from the same uniform interval would increase the value of the likelihood function. Therefore, the more iterations I run, the lower the acceptance rates I should get.

Where am I wrong in this thinking? Many thanks!

Here is the illustration of my calculations:

$$Acceptance\_rate = \exp \{l(\theta_c|y) + \log(p(\theta_c)) - [l(\theta^*|y) + \log(p(\theta^*) ]\},$$

where $l$ is the log-likelihood.

As $\theta$ candidates are always taken from the same uniform interval,

$$p(\theta_c) = p(\theta^*).$$

Therefore acceptance rate calculation shrinks down to:

$$Acceptance\_rate = \exp \{l(\theta_c | y) - [l(\theta^* | y) ]\}$$

The acceptance rule of $\theta_c$ is then as follows:

If $U \le Acceptance\_rate $, where $U$ is draw from uniform distribution in interval $[0,1]$, then

$$\theta^* = \theta_c,$$

else draw $\theta_c$ from uniform distribution in interval $[\theta_{min}, \theta_{max}]$

  • 1
    $\begingroup$ I've changed the formatting for better readability, check to make sure I did not change the original meaning. $\endgroup$
    – mpiktas
    Jun 21 '11 at 6:41

I believe that Weak convergence and optimal scaling of random walk Metropolis algorithms by Roberts, Gelman and Gilks is the source for the 0.234 optimal acceptance rate.

What the paper shows is that, under certain assumptions, you can scale the random walk Metropolis-Hastings algorithm as the dimension of the space goes to infinity to get a limiting diffusion for each coordinate. In the limit, the diffusion can be seen as "most efficient" if the acceptance rate takes the value 0.234. Intuitively, it is a tradeoff between making to many small accepted steps and making to many large proposals that get rejected.

The Metropolis-Hastings algorithm is not really an optimization algorithm, in contrast to simulated annealing. It is an algorithm that is supposed to simulate from the target distribution, hence the acceptance probability should not be driven towards 0.


Just to add to answer by @NRH. The general idea follows the Goldilocks principal:

  • If the jumps are "too large", then the chain sticks;
  • If the jumps are "too small", then the chain explores the parameter space very slower;
  • We want the jumps to be just right.

Of course the question is, what do we mean by "just right". Essentially, for a particular case they minimise the expected square jump distance. This is equivalent to minimising the lag-1 autocorrelations. Recently, Sherlock and Roberts showed that the magic 0.234 holds for other target distributions:

C. Sherlock, G. Roberts (2009);Optimal scaling of the random walk Metropolis on elliptically symmetric unimodal targets; Bernoulli 15(3)

  • 1
    $\begingroup$ (+1) Thanks for that reference. Here is another reference showing that 0.234 is not the complete story. $\endgroup$
    – NRH
    Jun 22 '11 at 7:15

I am adding this as an answer because I don't have enough reputation for commenting under the question. I think you are confused between acceptance rate and acceptance ratio.

  1. Acceptance ratio is used to decide whether to accept or reject a candidate. The ratio which you are calling as acceptance rate is actually called acceptance ratio and it is different from the acceptance rate.
  2. Acceptance rate is the rate of accepting candidates. It is the ratio of number of unique values in the MCMC chain to the total number of values in the MCMC chain.

Now your doubt of optimal acceptance rate being 20% is actually about the real acceptance rate, not the acceptance ratio. The answer is given in the other answers. I just wanted to point out the confusion you are having.

  • 1
    $\begingroup$ This seems like enough of an answer to me. Welcome to the site, @MusafitSafwan. Since you're new here, you may want to take our tour, which has info for new users. $\endgroup$ Feb 26 '16 at 14:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.