Chapter 11: Problem 2
Consider the hierarchical Bayes model $$ \begin{aligned} Y & \sim b(n, p), \quad 0
0 \\ \theta & \sim \Gamma(1, a), \quad a>0 \text { is specified. } \end{aligned} $$ (a) Assuming squared-error loss, write the Bayes estimate of \(p\) as in expression (11.4.3). Integrate relative to \(\theta\) first. Show that both the numerator and denominator are expectations of a beta distribution with parameters \(y+1\) and \(n-y+1\). (b) Recall the discussion around expression (11.3.2). Write an explicit Monte Carlo algorithm to obtain the Bayes estimate in part (a).