Example of Metropolis-Hastings sampling