These are exercises from Ch12 in the Probability & Statistics text by DeGroot & Schervish.
I did this to learn the basics of MCMC (Markov Chain Monte Carlo).
These are the sections I looked at:
- 12.2: Simulations (warm-up to MCMC)
- 12.5: Markov Chain Monte Carlo
I also did some pen & paper exercises as well but the learning from those don't necessarily transfer to being able to implement the sampler.
This turned out to be much harder than expected. I love the DeGroot & Schervish text but, there are no code examples in the book or in the solutions. Overall, I don't really recommend learning MCMC from this text. There must be better references.
These resources were also helpful: