Question: Monte Carlo simulation uses random numbers and probability to solve problems. This method has a wide range of applications in computational mathematics, physics, chemistry, and

Monte Carlo simulation uses random numbers and probability to solve problems. This method has a wide range of applications in computational mathematics, physics, chemistry, and finance.

For this project, you are going to generate a circle with a randomly sized radius and generate 1,000,000 random (x,y) points. For each simulation, you will output the following:

Trial number

Radius of the circle

Compute the probability of a (x,y) location inside the circle

Number of hits inside the circle from the simulation

Output stating the percentage the results were within the probability

Minor Task

Write the program based on the details above. Since this is a simulation, we will not prompt the user for inputs. To determine the radius of the circle, we are going to implement the Fibonacci series. That will be used to determine what value in the Fibonacci series is used for the radius.

Once you have the radius, implement the Monte Carlo simulation with 1,000,000 random (x,y) points and display the results for 10 trials per Fibonacci numbers in the series (do from numbers 2 to 20 in the Fibonacci series). Place the results in the Project Report along with the code for this task.

Now make a new copy of the program and repeat the process for 25 trials per Fibonacci numbers in the series (do from numbers 2 to 20 in the Fibonacci series). Since this will generate a lot of output to the screen, we will reduce the amount of data displayed. For the minor part, output the following:

Trial number (make note of the example, must keep format like: 001, 025, 125)

Radius of circle

Actually number of hits

At the end, display the average number of hits per radius size

Here is a sample output:

Trial 001: Radius: 8                # hits: 788888                

Trial 002: Radius: 8                # hits: 781234

Trial 003: Radius: 8                # hits: 789231

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Concepts and Overview Monte Carlo simulation is a technique that utilizes randomness and statistical sampling to approximate solutions to quantitative ... View full answer

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 Programming Questions!