Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Monte Carlo Statistics is a very popular and well-used approach for studying many problems. The essential idea is that by randomly sampling a statistical variable,

image text in transcribed

Monte Carlo Statistics is a very popular and well-used approach for studying many problems. The essential idea is that by randomly sampling a statistical variable, one can estimate the expected value of the variable by taking a simple mean of the samples. Along the way, one can get a reasonably good approximation of the complete distribution by taking a large enough number samples. Consider a square defined by -2 s (x. y) S 2 with a circle inside it with radius R 2 . The area of the circle is (obviously) R2 and the area of the square is 4R however, let's assume that you don't know . Instead. try to approxirnately calculate by estimating the area of the circle using a large number of random points (x. y) and using the ratio of points inside and outside the circle to be a rough indication of ratios of the areas ( = 4 X Acircte/Asquare). Give your answer with 5 significant digits, and give your answer when using both 100 and 10000 random points. Hints: .Generate random points (x. y) that are uniformly distributed over the square (i.e., that are equally likely to fall anywhere within that square). And then count how many of those points fall within the circle In Matlab, you can generate uniformly distributed random points using the function rand(N,1), which creates an array of N random numbers between 0 and 1. We need x and y between -2 and 2, so we need to do x-4*(rand(N,1)-0.5); y-4*(rand(N,1)-0.5); 6

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

Databases Illuminated

Authors: Catherine Ricardo

2nd Edition

1449606008, 978-1449606008

More Books

Students also viewed these Databases questions

Question

How do modern Dashboards differ from earlier implementations?

Answered: 1 week ago