Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Monte Carlo is a popular simulation method, and can be taught of as an application of simple random sampling. Monte Carlo is often used

image text in transcribed

Monte Carlo is a popular simulation method, and can be taught of as an application of simple random sampling. Monte Carlo is often used to evaluate multiple integrals when regular integration is computationally expensive. In simple Monte Carlo, the integrals correspond to expected values of quantities of interest in the simulation. Here is a toy example estimating a definite integral. Suppose interest lies in evaluating 4 B = [* f(x)dx = S 4 1 2 [1 + (^_^)] dx Considering the random variable X ~ Cauchy(1, 2), you may note that B = Pr(0 X 4). Using the command pcauchy (4, 1, 2)-pcauchy (0, 1, 2) in R, we learn that B = 0.4604. However, B can be taught of as 4 times the expected value (mean) of the random variable Y = 1 2* [1 + (x-1)] 2 1+ where X is a Uniform(0, 4) random variable, i.e. B = 4 E(Y). You can see this by writing out the definition of E(Y). Now, consider a very large frame U = (u,..., uN) that is, approximately, a finite set of possible values returned by a Uniform(0, 4) random number generator in R, and let y = f(x). Then the population average, i.e. 4 4 U Y/N is very close to the integral B. Any difference is frame error. = a. [3 marks] Use the code set. seed (372) x runif(20, 0, 4) to generate a simple random sample of size n = 20 units from the frame. Now, calculate the vector y = (Y1,..., Y20) where Yi = 2 1+ 1 value of the integral. Based on the values in the vector y, find an estimate of B, and provide the corresponding 95% confidence interval for the b. [3 marks] How many additional units are required to be sampled from the frame to estimate B within a distance of 0.015 from its true value 18 time out of 20? c. [4 marks] Now, consider a smaller study population P = {0, 0.1, 0.2, 0.3, . . ., 3.9, 4}. Use the code P = seq(0, 4, by = 0.1) set. seed (372) x. new sample (P, 20, replace = FALSE) to generate a simple random sample without replacement of size n = 20 units from the frame. Based on this sample, find an estimate of B, and provide the corresponding 95% confidence interval for the value of the integral. Compare your answer to the answer you provided in part (a) and comment on your finding. Mention one strength and one weakness of the setup in this part of the problem compared to part (a). d. [4 marks] Calculate the absolute values of the study error and the sample error based on the information provided in part (c). Can you provide a sample size for part (c) based on which the integral B is estimated within 0.001 of its true value 18 times out of 20? Provide details of your answer.

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

Differential Equations and Linear Algebra

Authors: Jerry Farlow, James E. Hall, Jean Marie McDill, Beverly H. West

2nd edition

131860615, 978-0131860612

More Books

Students also viewed these Mathematics questions

Question

=+1. How has Gallery Furniture given back to athletes?

Answered: 1 week ago

Question

If the person is a professor, what courses do they teach?

Answered: 1 week ago