Homework Set 15, Due Wednesday November 18, 2016. ------------------------------------------------ Assigned 11/9/2016, modified 11/12, due Friday 11/18 ===================================================== Again use binomial model for data X_i as in HW 14, in a Bayesian setting, with X_i ~ Binomial(n_i, p_i) , i=1,...,10, but now with the prior p_i ~ f(p) = (9/49)*dbeta(p,.4,.4) + (15/49)*dbeta(p,1,1) + (25/49)*dbeta(p,2,2) and the data: > nvec [1] 105 150 140 81 52 95 74 112 140 75 > Xvec [1] 48 111 74 15 46 44 24 81 85 33 The coefficients and parameters are chosen in this mixture density so that the mean and mean-square are very close to the respective values .5 and 1/3 of the Unif[0,1] that we used before, although the prior density is VERY different. (Graph it and you will see !) (a) Find the exact posterior densities of the numbers p_i based on the data (n_i, X_i, i=1,...,10) arising from the model, and form 99% credible intervals for the random-effect parameters p_1,...,p_10, ### Hint: this prior is a mixture of beta's, and so will the posterior be. If you first imagine that you know which of the three mixture-components each X_i comes from, and then un-condition, you can prove this easily and use the standard conjugate-prior property of the beta and binomial to read off the mixture components in the posterior. (b) Obtain the posterior density values by (a single) numerical integration for each p_i, as in the first segment of the Nov7F16.RLog log, by a Laplace-method change of variable. (c) How close would each of your numerically integrated posterior-density integrals be to the truth if you replaced the respective posterior densities by the exponentials of the SECOND-order Taylor series approximations to those densities at the respective points p.st[i] = maximizer of log f(p|X_i) on (0,1) as we discussed under the heading of "Laplace Method" in class on November 9 ?