Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(Matlab) So-called Monte Carlo methods solve problems through experiments that use random numbers. For this class project, you are to design and carry out an

(Matlab)

image text in transcribed

So-called Monte Carlo methods solve problems through experiments that use random numbers. For this class project, you are to design and carry out an experiment to estimate the value of T. You may design any experiment that uses random numbers to progressively more accurately estimate n. One such experiment is throwing N darts at a square board of side length D. A circle with diameter D would fit perfectly inside such a square board. Let P = (X;,y:) be the coordinates of the point the ith dart landed at, with i = 1, 2, 3....N. You can determine if point P, is inside the circle. The Monte Carlo method would then estimate the value of it by counting the darts that land inside the circle for a certain large number of darts thrown Write a MATLAB program that simulates this experiment by generating pairs of uniformly distributed random numbers, one of each pair for the x coordinate and the other of each pair for the y coordinate Your program should print the total number of trials in the experiment (N), the total number of trial points inside the circle, and the Monte Carlo estimate of it for the present run. Here are some equations you will find useful if you design your experiment in this way. Area of a circle with diameter D: D2 Acircle 4 Area of the square with side D: Asquare = D2 So-called Monte Carlo methods solve problems through experiments that use random numbers. For this class project, you are to design and carry out an experiment to estimate the value of T. You may design any experiment that uses random numbers to progressively more accurately estimate n. One such experiment is throwing N darts at a square board of side length D. A circle with diameter D would fit perfectly inside such a square board. Let P = (X;,y:) be the coordinates of the point the ith dart landed at, with i = 1, 2, 3....N. You can determine if point P, is inside the circle. The Monte Carlo method would then estimate the value of it by counting the darts that land inside the circle for a certain large number of darts thrown Write a MATLAB program that simulates this experiment by generating pairs of uniformly distributed random numbers, one of each pair for the x coordinate and the other of each pair for the y coordinate Your program should print the total number of trials in the experiment (N), the total number of trial points inside the circle, and the Monte Carlo estimate of it for the present run. Here are some equations you will find useful if you design your experiment in this way. Area of a circle with diameter D: D2 Acircle 4 Area of the square with side D: Asquare = D2

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introduction To Managerial Accounting Hc 2002 Text Only

Authors: Folk

1st Edition

0071123350, 978-0071123358

More Books

Students also viewed these Accounting questions