Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(6 points) Consider the function g(:L') = cos2(12;r:) X |:r:3 + 6:3 2| > (6 points) Consider the function = COS2(12X) > < -k 6T

image text in transcribed
image text in transcribed
(6 points) Consider the function g(:L') = cos2(12;r:) X |:r:3 + 6:3 2| >

(6 points) Consider the function = COS2(12X) > < -k 6T 21 > < In this problem, we use rejection sampling to generate random variables with pdf f@) = cg@). (a) (2 points) Plot g over its domain. What is a uniform proposal distribution q that covers the support of f? What is the largest possible constant M such Ithat the scaled target distribution p@) = Mg@) satisfies p@) q@) for all x? (b) (2 points) Suppose you run rejection sampling with target p and proposal q from part (a) until you generate n samples and your sampler runs a total of N > n times, including n acceptances and N n rejections. Explain how you can use n, N and M to estimate c. Hint: the ratio of acceptances n to total runs N is an approximation of the ratio between the area under the curve p@) and the area under q@). Hint: remember what happens if you integrate a pdf over its entire support. (c) (2 points) Use rejection sampling to generate a sample of size 103 from p@). Since f@) is a pdf and it's proportional to p@), we can display its estimate easily: plot a normalized histogram of your sample, and overlay a smooth kernel density estimate, that will provide more information on the shape of the estimated distribution. Repeat the previous steps increasing the number of samples to 106.

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_2

Step: 3

blur-text-image_3

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

College Algebra

Authors: Mark Dugopolski

5th Edition

0321899822, 9780321899828

More Books

Students also viewed these Mathematics questions

Question

The feeling of boredom.

Answered: 1 week ago