Instructions

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.

Questions

  1. There are three coins in a bag; two fair coins (probability of heads = probability of tails) and one fake coin (probability of heads = 1).
    • You reach in and select one coin at random and throw it in the air. What is the probability that it lands on heads?
    • You reach in and select one coin at random and throw it in the air and get heads. What is the probability that it is the fake coin?
  2. Hoff 2.3

  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}.\]

  4. 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.

  5. 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.

  6. 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!

Grading

20 points.