This assignment involves some probability review and one parameter models. Please make sure your final output file is a pdf document. You can submit handwritten solutions for non-programming exercises or type them using R Markdown, LaTeX or any other word processor. All programming exercises must be done in R, typed up clearly and with all code attached. Submissions should be made on gradescope: go to Assignments \(\rightarrow\) Homework 1.
Hoff 2.3
Show that the posterior variance of the beta-binomial model can be written as \[\mathbb{V}(\theta | y) = \dfrac{\mathbb{E}(\theta | y)\mathbb{E}(1-\theta | y)}{a+b+n+1}.\]
Hoff 3.1.
Don’t work out part (a), just say what the correct sampling distribution is (you should already know) and move on to the remaining parts.
Hoff 3.2.
Refer back to pages 5 to 7 of the Hoff book (the section on sensitivity analysis) if you are not sure what to do.
Continuation of the “new agent” example from class. For each of the priors (that is, Beta(1,666), Beta(0.05,33.33), Beta(1.6, 407.4), Beta(1.05, 497), and Unif(0,0.1)), how many trials would we need, assuming no adverse reactions, to be 95% sure that the new agent is as safe as (or safer than) the old one? That is, what value of \(n\) is required to ensure that \(\Pr(\theta_N \leq 0.0015| y) = 0.95\)?
You don’t need to do any rigorous math here. Do it in R!
20 points.