Simulation can be used to estimate numerical constants, such as . Heres one approach: consider the part

Question:

Simulation can be used to estimate numerical constants, such as π. Here’s one approach: consider the part of a disk of radius 1 that lies in the first quadrant (a quarter-circle). Imagine two random numbers, x and y, both between 0 and 1. The pair (x, y) lies somewhere in the first quadrant; let A denote the event that (x, y) falls inside the quarter-circle.

a. Write a program that simulates pairs (x, y) in order to estimate P(A), the probability that a randomly selected pair of points in the square [0, 1] x [0, 1] lies in the quarter-circle of radius 1.
b. Using techniques from Chapter 5, it can be shown that the exact probability of A is π/4 (which makes sense, because that’s the ratio of the quarter-circle’s area to the square’s area). Use that fact to come up with an estimate of π from your simulation. How close is your estimate to 3.14159…?

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question

Modern Mathematical Statistics With Applications

ISBN: 9783030551551

3rd Edition

Authors: Jay L. Devore, Kenneth N. Berk, Matthew A. Carlton

Question Posted: