Implementation

  • Do a Monte Carlo simulation, storing all samples to file
  • Do the statistical analysis on this file, independently of your Monte Carlo program
  • Read the file into an array
  • Loop over various block sizes
  • For each block size \( n_b \), loop over the array in steps of \( n_b \) taking the mean of elements \( i n_b,\ldots,(i+1) n_b \)
  • Take the mean and variance of the resulting array
  • Write the results for each block size to file for later analysis