Let the observed data be y = (6, 4, 9, 2, 0, 3), a random sample from the Poisson distribution with mean A, where A> 0 is unknown. Suppose that we assume a Gamma(1, 1) prior distribution for A. The posterior density, p(A | y), for λ is Gamma (1+ S, 1 + n), where S = ₁ and n = 6. Suppose that you want to construct a symmetric Metropolis-Hastings on the log-scale to generate a sample from this posterior distribution by using a normal proposal distribution with standard deviation b = 0.2. (a) Write down the steps in this symmetric Metropolis-Hastings (on the log-scale) to simulate realisations from the posterior density p(x|y). (b) Implement the algorithm in R. and plot the observations as a function of the iter- ations. Use M = 5000 for the number of iterations. (c) To assess the accuracy compare the empirical distribution of the sample with the exact posterior density, Gamma(1 + S, 1 + n). (d) Rerun the algorithm in R using a smaller b = 0.01 and a larger b = 20. What are the effects on the behaviour of the algorithm of making b smaller? What are the
Let the observed data be y = (6, 4, 9, 2, 0, 3), a random sample from the Poisson distribution with mean A, where A> 0 is unknown. Suppose that we assume a Gamma(1, 1) prior distribution for A. The posterior density, p(A | y), for λ is Gamma (1+ S, 1 + n), where S = ₁ and n = 6. Suppose that you want to construct a symmetric Metropolis-Hastings on the log-scale to generate a sample from this posterior distribution by using a normal proposal distribution with standard deviation b = 0.2. (a) Write down the steps in this symmetric Metropolis-Hastings (on the log-scale) to simulate realisations from the posterior density p(x|y). (b) Implement the algorithm in R. and plot the observations as a function of the iter- ations. Use M = 5000 for the number of iterations. (c) To assess the accuracy compare the empirical distribution of the sample with the exact posterior density, Gamma(1 + S, 1 + n). (d) Rerun the algorithm in R using a smaller b = 0.01 and a larger b = 20. What are the effects on the behaviour of the algorithm of making b smaller? What are the
Glencoe Algebra 1, Student Edition, 9780079039897, 0079039898, 2018
18th Edition
ISBN:9780079039897
Author:Carter
Publisher:Carter
Chapter10: Statistics
Section10.5: Comparing Sets Of Data
Problem 14PPS
Related questions
Question
all parts please
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step 1: Given information
VIEWStep 2: (a) Writing the steps to simulate the steps in the symmetric Metropolis-Hastings on the log scale
VIEWStep 3: (b) Implementing the algorithm using R
VIEWStep 4: (c) Comparison of the empirical distribution of the sample with the exact posterior density
VIEWStep 5: (d) Running Metropolis Hastings algorithm with different proposal standard deviations
VIEWStep 6: (e) Analysis of acceptance probability in Metropolis Hastings algorithm across different proposals
VIEWSolution
VIEWStep by step
Solved in 7 steps with 36 images
Recommended textbooks for you
Glencoe Algebra 1, Student Edition, 9780079039897…
Algebra
ISBN:
9780079039897
Author:
Carter
Publisher:
McGraw Hill
Big Ideas Math A Bridge To Success Algebra 1: Stu…
Algebra
ISBN:
9781680331141
Author:
HOUGHTON MIFFLIN HARCOURT
Publisher:
Houghton Mifflin Harcourt
Glencoe Algebra 1, Student Edition, 9780079039897…
Algebra
ISBN:
9780079039897
Author:
Carter
Publisher:
McGraw Hill
Big Ideas Math A Bridge To Success Algebra 1: Stu…
Algebra
ISBN:
9781680331141
Author:
HOUGHTON MIFFLIN HARCOURT
Publisher:
Houghton Mifflin Harcourt