Question: This can be solved using any programming language as python, R, Octave etc... 3. Gibbs and High/Low Protein Diet in Rats. Armitage and Berry (1994,
This can be solved using any programming language as python, R, Octave etc...

3. Gibbs and High/Low Protein Diet in Rats. Armitage and Berry (1994, p. 111) report data on the weight gain of 19 female rats between 28 and 84 days after birth. The rats were placed on diets with high (12 animals) and low (7 animals) protein content. High protein Low protein 134 70 146 118 104 101 19 85 124 107 161 132 107 94 83 113 129 97 123 We want to test the hypothesis on dietary effect. Did a low protein diet result in signifi- cantly lower weight gain? The classical t test against one sided alternative will be significant. We will do the test Bayesian way using Gibbs sampler. 3 Assume that high-protein diet measurements yli, i = 1, ..., 12 are coming from normal distribution N(01, 1/71), where 71 is precision parameter, f ( y1.| 01, 71) x 7 2 exp - 2 ( yli - 01)? ), 2 - 1, ..., 12. Low-protein diet measurements y2, i = 1, ...,7 are coming from normal distribution N(02, 1/T2), f (y2: 1 02, 72) OC T2 2 exp - 2 ( yzi - 02)2 1, i = 1,..., 7. Assume that 61 and 02 have normal priors /(010, 1/710) and N(020, 1/720), respectively. Take prior means as 010 = 020 = 110 (apriori no preference) and precisions as 710 = 720 = 1/100. Assume that 71 and 72 have the gamma Ga(a1, b2) and Ga(a2, b2) priors with shapes a1 = a2 = 0.01 and rates b1 = b2 = 4. (a) Construct Gibbs sampler that will sample 01, 71, 02, and 72 from their posteriors. (b) Find sample differences 01 - 02 . Proportion of positive differences approximates posterior probability of hypothesis Ho : 01 > 02. What is this proportion? (c) Using sample quantiles find the 95% equitailed credible set for 01 - 02. Does this set contain 0
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
