Answer to Question #102348 in Statistics and Probability for Peter Gemayel

Question #102348
Consider the target p.d.f. f(x) = e−x2/2/√2π, −∞ < x < ∞. (a) (8 marks). Write down an algorithm for generating X ∼ f by the general accept-reject method using the standard Cauchy distribution with p.d.f. g(x) = 1/(π(1 + x2)) for −∞ < x < ∞ as the proposal distribution. Do this as efficiently as possible expressing your results in terms of i.i.d. U1,U2 ∼ U[0,1]. (b) (2 marks). On average, how many uniform random numbers Ui ∼ U[0,1] are needed to generate one X ∼ f by this method?
(c) (4 marks). Using the free software R, generate a sample from X ∼ f using the general accept-reject method with proposal p.d.f. g(x). In particular, use the statement set.seed(12345) and 10,000 iterations. At the same time, verify part(a) by constructing a histogram with f(x) and alpha*g(x) superimposed on it, and also verify part(b).
1
Expert's answer
2020-02-06T13:49:25-0500
Dear Peter Gemayel, your question requires a lot of work, which neither of our experts is ready to perform for free. We advise you to convert it to a fully qualified order and we will try to help you. Please click the link below to proceed: Submit order

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS