Question: these questions and add R code when necessary For this assignment, answer the four exercises below. Be sure to justify/explain your reasoning using full sentences.

these questions and add R code when necessary

For this assignment, answer the four exercises below. Be sure to justify/explain your reasoning using full sentences. If asked to do a simulation and/or make a figure, please turn in the result as well as your code. Exercise 1. (10 points total.) Suppose we have independent and identically distributed observations Y = (Y1,---Yn), With y; ~ Exponential(,). (a) Suppose that we specify \\ ~ Gamma(a, 3) as the prior distribution on the unknown model parameter, 4X. Obtain the posterior mean, E(A|y) and posterior standard deviation, \\/ Var(A|y) (i.e., obtain the posterior distribution, name it and state its parameters, and use the known properties of that distribution to write down the posterior mean and standard deviation). (5 points) (b) Now, suppose that we are interesting in learning about = }, i.e., the mean of an Exponential(,) distribution. Show that a conjugate prior distribution for is an Inverse-Gamma(a, 3) distribution. You may use that if X ~ Inverse-Gamma(a, 3), then the associated probability density function is a _ B I'(a) p(x\\a, 8) (1/x)***exp(8/z), defined over the range/support x 0, with parameters a 0 and 6 0. (5 points) Exercise 2. (9 points total). When David Beckham joined the LA Galaxy soccer team, he scored one goal in his first two games. Suppose that the manager of LA Galaxy is interested in the the number of goals Beckham would score in each of the remaining games. We model the number of goals, y;, Beckham scores in game i using a Poisson distribution with parameter A: y;|A ~ Poisson(A), and we assume exchangeability among the y;. For a prior distribution on A, we use the fact that when in Madrid a year before joining LA Galaxy, Beckham scored 3 goals in 22 games (or, 3/22 = 0.14 goals per game on average). We therefore choose a Gamma prior with mean around 0.14 and variance large enough to reflect our uncertainty: 4 ~ Gamma(1.4, 10). (a) Provide a point estimate for the expected number of goals Beckham will score in a game using the posterior mean, E(A\\y). (For this, you may use class results stated in class without explicitly deriving those results, though of course it's good practice to do so!) (2 points) Simulate 10,000 draws from the posterior distribution p(A|y) and make a histogram of the 10,000 draws with \"density\" on the y-axis (e.g., if using hist () in R, use the prob=TRUE argument). (2 points) Using the 10,000 draws you obtain in part (b), estimate the posterior mean. (It should be close to the number you calculated analytically in part (a), but not identical due to Monte Carlo error.) (1 point) Next, use the 10,000 draws to provide a 95% equal-tailed posterior interval for . (Hint: Use the quantile() function.) (2 points) Finally, either analytically or using your 10,000 draws, obtain a 95% posterior interval that is of the form posterior mean +2 x posterior standard deviation . What is the problem with an interval of this form? (2 points)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!