P410/P609 Homework Assignment #6
Due Thursday, December 5, 2013
1) The Gaussian Distribution and the Metropolis Method (See section 11.7
starting on page 435 of CSM and particularly problem 11.17 on page 437):
a) Write a program to generate a Gaussian distribution using the
Metropolis algorithm as described in class and in Sec. 11.7 of CSM.
However, instead of using a value \delta_i for the trial step
uniformly distributed in the interval [-\delta, \delta], I would
like you to use a triangular distribution in the interval
[-\delta, \delta]. In class we discussed how to do this by
using two uniformly distributed random numbers r_1 and r_2.
Alternatively, you might consider the inverse transform method.
b) Try multiple values of delta and create runs with 50000 numbers.
Plot histograms of the entire runs and time histories of the first
5000 values.
c) Plot the acceptance ratio as a function of delta.
d) Using the program autocorr (Usage: autocorr maximum_lag