Home / Expert Answers / Advanced Physics / please-answer-with-python-code-thank-you-very-much-estimation-20-point-pa840

(Solved): Please answer with python code. thank you very much. Estimation (20 point ...



\( \pi \) Estimation (20 points) Consider a disk \( D \) of radius 1 inscribed within a square of perimeter 8 centered at the???????

Please answer with python code. thank you very much.

Estimation (20 points) Consider a disk of radius 1 inscribed within a square of perimeter 8 centered at the origin. Then the ratio of the area of the disk to that of the square is . Let represent the uniform distribution om the square. Then for a sampe of points for is an estimator of , where is 1 if is true, and 0 otherwise. Consider the following strategy for estimating . We start with . Thereafter, generate candidates as follows: First, generate both and follow Uniform . If falls outside the square, regenerate and until the steptaken remainins within the square. Let . Increment . This generates a sample of points over the square. When , stop and calculate as given above. (a) Implement this method for and . Compute . What is the effect of increasing ? What is the effect of increasing and decreasing ? Please comment. (b) Explain why this method is flawed. Using the same method to generate candidates, develop the correct approach by referring to the Metropolis-Hastings ratio. Prove that your sampling appraoch has a stationary distribution that is uniform on the square. (c) Implement your approach from Part (b) and caluclate . Experiment again with and h. Comment on your result.


We have an Answer from Expert

View Expert Answer

Expert Answer


The value of ? is calculated u
We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe