Chapter 12: Q8SE (page 850)
In Example 12.5.6, we used a hierarchical model. In that model, the parameters\({\mu _i},...,{\mu _P}\,\)were independent random variables with\({\mu _i}\)having the normal distribution with mean ψ and precision\({\lambda _0}{T_i}\,\)conditional on ψ and\({T_1},\,....{T_P}\). To make the model more general, we could also replace\({\lambda _0}\)with an unknown parameter\(\lambda \). That is, let the\({\mu _i}\)’s be independent with\({\mu _i}\)having the normal distribution with mean ψ and precision\(\,\lambda {T_i}\)conditional on\(\psi \),\(\lambda \) and\({T_1},\,....{T_P}\). Let\(\lambda \)have the gamma distribution with parameters\({\gamma _0}\)and\(\,{\delta _0}\), and let\(\lambda \)be independent of ψ and\({T_1},\,....{T_P}\). The remaining parameters have the prior distributions stated in Example 12.5.6.
a. Write the product of the likelihood and the prior as a function of the parameters\({\mu _i},...,{\mu _P}\,\), \({T_1},\,....{T_P}\)ψ, and\(\lambda \).
b. Find the conditional distributions of each parameter given all of the others. Hint: For all the parameters besides\(\lambda \), the distributions should be almost identical to those given in Example 12.5.6. It wherever\({\lambda _0}\)appears, of course, something will have to change.
c. Use a prior distribution in which α0 = 1, β0 = 0.1, u0 = 0.001, γ0 = δ0 = 1, and \({\psi _0}\)= 170. Fit the model to the hot dog calorie data from Example 11.6.2. Compute the posterior means of the four μi’s and 1/τi’s.
Short Answer
- The product of the two functions uses parameters given in the exercise and distribution \(\lambda \).
- The conditional distribution of \(\lambda \) all other parameters is gamma distribution.
- The estimated posterior means of \({\mu _i}\) \(i = 1,2,3,4\) are, respectively, 157 158.6, 118.9, and 160.4.
- The estimated posterior means for the \(1/{T_i}\) \(i = 1,2,3,4\) are, respectively, 487, 598.9, 479.44, and 548.1.