Question: Prob. 5 This problem asks you to apply a simple Monte Carlo method to approximate the value of . The idea behind this Monte Carlo

 Prob. 5 This problem asks you to apply a simple Monte

Prob. 5 This problem asks you to apply a simple Monte Carlo method to approximate the value of . The idea behind this Monte Carlo method for approximating the value of is fairly simple: A unit disk centered at (0,0) has area , we can inscribe this disk in a square centered at (0,0) with edge length 2. We generate a relatively large number of points with coordinates (x, y), where x and y are random numbers uniformly distributed on [-1,1). (Note the bounds [-1,1) means all the random points generated are located inside the square that encloses the unit disk. You need to check up the .uniform() function from numpy.random, because .rand) is uniform on [0,1) but not on [1.), thus .rand() cannot be directly used here, unless you use a different model.) We can count the number of points that are located inside the circle (i.e., 2 y2

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!