Final project: Markov chains in discrete time
Metropolis sampling
A number of important techniques for calculating integrals are based on the Metropolis sampling algorithm. Research how this algorithm works and write a program
to calculate an integral using this technique. Remember to quote error bars on any estimate that is extracted by calculating a sample mean. Notice that
I will award a higher mark if you explain why the integral you have chosen to perform is useful to calculate. With this in mind some fields where the Metropolis
algorithm is used that you might choose to investigate include statistical mechanics (physics) and Bayesian statistics.