2
$\begingroup$

I need to sample from a non-standard density which is more tractable on the log-scale. Now I was wondering, how the decision rule is restated: $$ \alpha (x' | x ) = min(1,\frac{\pi(x')}{\pi(x)}) $$ with $x'$ being a candidate draw from a symmetric proposal distribution.

Is it correct to infer the following decision rule: $$ \tilde{\alpha} = log(\alpha(x'|x)) = min(0, log(\pi(x')) - log(\pi(x)))$$ Accept Draw $x'$ if $\tilde{\alpha} \geq log(u)$ with $u\sim\mathcal{U}(0,1)$

$\endgroup$
  • 2
    $\begingroup$ Yes this is correct. $\endgroup$ – Xi'an Oct 24 '16 at 19:38
2
$\begingroup$

Yes this is correct.

Also it is not necessary to actually compute the minimum, i.e. you can accept if $$ \log(u) \le \log(\pi(x')) - \log(\pi(x)). $$

In addition, you can avoid drawing the uniform and computing its log any time that $$ \log(\pi(x')) \ge \log(\pi(x))$$ since $\log(u)$ is always less than the difference $\log(\pi(x')) - \log(\pi(x))$.

$\endgroup$
  • $\begingroup$ Does that mean I accept the draw if $log(\pi(x')) \geq log(\pi(x))$ ? $\endgroup$ – mscnvrsy Oct 24 '16 at 19:54
  • $\begingroup$ Is there a reference as to why this works? $\endgroup$ – Euler_Salter Apr 30 '19 at 15:31

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.