A quarter ellipse with semi-axes and occupies the region , ,

PHYSICS · Subjective · Fermi University Physics · Computational Physics · Monte Carlo and lattice simulation of physical systems · Monte Carlo and lattice simulation of physical systems

Computational Physics, Ch Drawing numbers: random walks and Monte Carlo

Problem

A quarter ellipse with semi-axes a=2.000 ma = 2.000\,\mathrm{m} and b=1.000 mb = 1.000\,\mathrm{m} occupies the region 0≤x≤a0\le x\le a, 0≤y≤b0\le y\le b, (x/a)2+(y/b)2≤1(x/a)^2+(y/b)^2\le 1. It sits inside the bounding rectangle of area ab=2.000 m2ab = 2.000\,\mathrm{m^2}. A program draws points uniformly at random in the rectangle (seed 1111) and counts a hit whenever a point lands inside the quarter ellipse. The exact area is πab/4=1.5708 m2\pi ab/4 = 1.5708\,\mathrm{m^2}. (a) At N=10 000N = 10\,000 trials, 78527852 land inside. Using the binomial (hit-or-miss) formula σp^=p^(1−p^)/N\sigma_{\hat p} = \sqrt{\hat p(1-\hat p)/N} for the hit fraction p^\hat p, compute the area estimate and its standard error. (b) Using the 1/N1/\sqrt{N} scaling of the standard error, predict the standard error of the area estimate that a run of N=1 000 000N = 1\,000\,000 trials by the same method should give. (c) A run at N=1 000 000N = 1\,000\,000 (seed 1212) gives 785 600785\,600 hits. Compute the actual area estimate and its standard error, and state whether it agrees with the prediction of part (b) and with the exact area.

Browse the problem library