Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PLEASE SOLVE USING: MATLAB, R or PYTHON Problem 3. Consider the following unnormalized posterior: p(Oly) e-}{0:03+02 +0220162482403} where 0 R2. Plot the two-dimensional image of

PLEASE SOLVE USING: MATLAB, R or PYTHON

image text in transcribed

Problem 3. Consider the following unnormalized posterior: p(Oly) e-}{0:03+02 +0220162482403} where 0 R2. Plot the two-dimensional image of this distribution for 0 (-5, 1012. (a) Generate an MCMC sample of size 10,000 using Metropolis algorithm. Choose the scale (~) of the proposal distribution N(0:-1, \I2), where I2 is the 2 x 2 identity matrix, so that the acceptance rate is around 0.40. (i) Report the chosen scale and the actual acceptance rate; (ii) Check the convergence of the MCMC chain; (iii) Plot the samples on the image of the distribution; and (iv) Obtain the 95% equal-tailed credible intervals of the two parameters. Hint. For (ii), you may consider checking the change of the sample quantiles when more samples are generated. (b) Derive the full conditional distributions and generate 10,000 samples using Gibbs sampling. (i) Plot the samples on the image of the distribution; and (ii) Plot the marginal densities of the two parameters. Problem 3. Consider the following unnormalized posterior: p(Oly) e-}{0:03+02 +0220162482403} where 0 R2. Plot the two-dimensional image of this distribution for 0 (-5, 1012. (a) Generate an MCMC sample of size 10,000 using Metropolis algorithm. Choose the scale (~) of the proposal distribution N(0:-1, \I2), where I2 is the 2 x 2 identity matrix, so that the acceptance rate is around 0.40. (i) Report the chosen scale and the actual acceptance rate; (ii) Check the convergence of the MCMC chain; (iii) Plot the samples on the image of the distribution; and (iv) Obtain the 95% equal-tailed credible intervals of the two parameters. Hint. For (ii), you may consider checking the change of the sample quantiles when more samples are generated. (b) Derive the full conditional distributions and generate 10,000 samples using Gibbs sampling. (i) Plot the samples on the image of the distribution; and (ii) Plot the marginal densities of the two parameters

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

Oracle Autonomous Database In Enterprise Architecture

Authors: Bal Mukund Sharma, Krishnakumar KM, Rashmi Panda

1st Edition

1801072248, 978-1801072243

More Books

Students also viewed these Databases questions

Question

4. What will the team agreement contain?

Answered: 1 week ago

Question

Determine miller indices of plane A Z a/2 X a/2 a/2 Y

Answered: 1 week ago