Simulate from a distribution using Metropolis-Hastings and Rejection Sampling?

69 Views Asked by At

We have covered the basics behind rejection sampling as well as Metropolis-Hastings from class, but I am not sure how to use the two in conjunction to solve the following problem:

Given $\pi(x) = \frac{1}{M}f(x)$, where $M = \int f(x)dx$, where we know $f(x)$ but do not know $M$, how can we efficiently simulate samples from $\pi(x)$?

We are supposed to use a combination of rejection sampling and Metropolis Hastings but I am not quite sure how to begin.