Question: Hi! I need help constructing a GIBBS Sampler, given a set of data on two types of animal diets. High Protein =[134,146,104,119,124,161,107,83,113,129,97,123] Low Protein=[70,118,101,85,107,132,94] Weight

Hi! I need help constructing a GIBBS Sampler, given a set of data on two types of animal diets.

High Protein =[134,146,104,119,124,161,107,83,113,129,97,123]

Low Protein=[70,118,101,85,107,132,94]

Weight gain of 19 female rats between 28 and 84 days after birth. Want to test the hypothesis on dietary effect: Did a low protein diet result in a significantly lower weight gain?

Test Bayesian way using Gibbs sampler. Assume that high-protein diet measurements y1i , i = 1, . . . , 12 are coming from normal distribution N (1, 1/au1), where au1 is the precision parameter, f(y1i |1, au1) _1^(1/2) exp{-((tau_1)/2)(y_1i -1)^2}, i = 1, . . . , 12.

The low-protein diet measurements y2i , i = 1, . . . , 7 are coming from normal distribution N (2, 1/2), f(y2i |2, au2) _2^(1/2) exp{-((tau_2)/2)(y_2i -2)^2}, , i = 1, . . . , 7. Assume that 1 and 2 have normal priors N (10, 1/10) and N (20, 1/20), respectively. Take prior means as 10 = 20 = 110 (apriori no preference) and precisions as 10 = 20 = 1/100. Assume that 1 and 2 have the gamma Ga(a1, b1) and Ga(a2, b2) priors with shapes a1 = a2 = 0.01 and rates b1 = b2 = 4.

(a) Construct Gibbs sampler that will sample 1, 1, 2, and 2 from their posteriors.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!