Monte Carlo Homework


For this work, I won't need your source code, but please do tell me how you're doing things – both stuff like “what language”, and a description of your algorithm.


  1. Use a Monte Carlo integration to find the area of a 30 cm radius circle. Use n=100, 1000, and 10,000 trials. Compare the precision of your result to the known value, and to what you expect for a measurement using that many trials.

  2. Use a “toy” Monte Carlo to explore the precision vs. number of trials issue above. That is, do 1000 separate “experiments” (ie, one experiment = one integration) at each of the above n values (plus n=100,000 and 1,000,000) . Plot the deviations of each experiment from the mean (for that n value) as a histogram. Fit a Gaussian to the histogram, and tell me how the mean, sigma, and uncertainty in the mean progress as n increases (plot these as a function of n).

  3. Calculate the area of an 8m diameter octagon.

  4. Do Bevington problem 5.9