# Metropolis-Hastings algorithm for harmonic oscillator

+ 1 like - 0 dislike
670 views

I am exploring the use of the Metropolis-Hastings algorithm and I use a simple harmonic oscillator (with $x_0=1$) as model system. The usual Metropolis algorithm with the move $x'=x+\epsilon$, where $\epsilon\in[-\Delta,\Delta]$ is a random number is trivial: we only need to compute the Boltzmann factor of the energy difference $E(x')-E(x)$. A simple simulation gives $<x>=1$ as expected. However I have problems to obtain the correct result with the Metropolis-Hastings algorithm with the following move: $x'=x+\epsilon$ where with probability 1/2 we have $\epsilon\in[0,\Delta]$ while with probability 1/2 we have $\epsilon\in[-\Delta/2,0]$. How can I derive the correct Metropolis-Hastings algorithm for this move? asked Apr 18, 2017
retagged Apr 19, 2017

 Please use answers only to (at least partly) answer questions. To comment, discuss, or ask for clarification, leave a comment instead. To mask links under text, please type your text, highlight it, and click the "link" button. You can then enter your link URL. Please consult the FAQ for as to how to format your post. This is the answer box; if you want to write a comment instead, please use the 'add comment' button. Live preview (may slow down editor)   Preview Your name to display (optional): Email me at this address if my answer is selected or commented on: Privacy: Your email address will only be used for sending these notifications. Anti-spam verification: If you are a human please identify the position of the character covered by the symbol $\varnothing$ in the following word:p$\hbar$ysicsOverf$\varnothing$owThen drag the red bullet below over the corresponding character of our banner. When you drop it there, the bullet changes to green (on slow internet connections after a few seconds). To avoid this verification in future, please log in or register.