A random-walk Metropolis chain samples the unit Gaussian density with proposal width
PHYSICS · Multi-part · Fermi University Physics · Mathematical Methods for Physics · Computational Physics · Monte Carlo and lattice simulation of physical systems
Error, Chance and the Machine, Ch Markov-chain Monte Carlo
Problem
A random-walk Metropolis chain samples the unit Gaussian density p(x)∝e−x2/2 with proposal width 0.5. It runs for N=2×104 steps from x=0 (PCG64, seed 6). The values of x are cut into b=10 blocks of L=2000 steps, and the block means, to be used as printed, are 0.094,0.086,−0.021,−0.126,−0.078,−0.189,−0.055,0.125,−0.093,0.001. The variance of x in equilibrium is var(x)=1.
((a)) Find the mean xˉ and its blocked error from Eq. (11.12).
((b)) Merge neighbouring blocks in pairs, blocks 1 and 2, blocks 3 and 4, and so on, to make b=5 blocks of L=4000 steps, and find the blocked error again. The scatter of a plateau estimated from b blocks is about 1/2(b−1) of its height. Do the two errors agree within it?
((c)) Find the naive error var(x)/N. Then use the blocked error of part (a) and Eq. (11.14) to estimate τint and Neff of x.
((d)) Is the mean consistent with the exact value 0? Are the blocks long enough for the blocked error to be trusted?