3
$\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$
1
  • 2
    $\begingroup$ Yes this is correct. $\endgroup$
    – Xi'an
    Oct 24, 2016 at 19:38

1 Answer 1

3
$\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$
1
  • $\begingroup$ Does that mean I accept the draw if $log(\pi(x')) \geq log(\pi(x))$ ? $\endgroup$
    – mscnvrsy
    Oct 24, 2016 at 19:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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