Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

2. (Gibbs samplerPart I) This is le rst part of a two part question on the Gibbs sampler. In the next problem, you will use

2. (Gibbs samplerPart I) This is le rst part of a two part question on the Gibbs sampler. In the next problem, you will use the Gibbs sampler for a Bayesian parametric estimation problem. I give you 10 sets of observations, 500 observations per set. You are told that the j'th set of observations are independently drawn from a normal distribution with mean n,- and variance 1/7, where p?- and 'r are unknown. You need to assume prior distributions for p. and 1-; more precisely, you should assume that the true parameters u,- were independently drawn from a normal distribution with mean 10 and variance 10. Since at is only a single number, the prior is less meaningful. However, you should assume for the purposes of building the sampler that your prior is that 'r is drawn from a gamma distribution with parameters a0 and 30; I will leave it you to choose whatever on and :50 you like. (a) Give the prior density, arifp, 'r), using the information above. (b) Give a formula for the posterior density, 1r[,u.,'r[Y), where Y is the 10 x 500 matrix of observations. (Use Bayes' rule.) You may exclude any normalization constants that do not depend on p or :r; only give the density up to a constant scaling. (The normalization constant is usually hard to compute!) (c) The full conditional distributions are \"(Miltj: r, Y) for j = 1, . . . ,10, and (v-Lu, Y). Show that ar(,u,|p_j,'r, Y) is a normal density, and n('r[,u,Y) is a gamma density. Find the parameters of the two densities. ((1) Suppose you were going to build a Gibbs sampler to sample from the posterior distribution. What is the state space S of the Gibbs sampler? (Note that it is uncountably innite; nevertheless, all our theory works ne for this example.) (e) Starting from an initial state, explain the steps necessary to simulate a Gibbs sampler with invariant distribution arm, TIY). You may nd the following facts useful: 1. The function randn in MATLAB generates samples from a Normal{0,1) distribution. 2. If Uh. .., Ur, are i.i.d. uniform[0,1] random variables, then X, = log(1 [Ia/A is an exponential random variable with mean 1/)L. 3. If X1, . . . ,Xn are exponential random variables with mean I/A, then EiXi is a gamma random variable with parameters in and A

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

Introduction to graph theory

Authors: Douglas B. West

2nd edition

131437372, 978-0131437371

More Books

Students also viewed these Mathematics questions