r代写-STAT404
时间:2021-10-26

STAT404 : Fall 2021 Midterm (Take-home) October 28, 2021 Due : no later than 5:00 p.m. on October 29, 2021 X You can download the take-home midterm from “Assignments and Tests” in the course blackboard. X You must submit your midterm in a written document together with source programs that allow for the automatic execution of all your code. X Upload your midterm into “Assignments and Tests” on the course blackboard. X You must upload the first page of the take-home midterm with the Honor Statement with your signature. X Failure to submit the Honor Statement may result in you receiving no grade or an ‘F’ for the course. X You are NOT allowed to consult or collaborate with anyone about the midterm exam. Such collaboration is a violation of the Honor Code. X You should NOT give or receive aid in the take-home midterm. X If you have any questions about the exam, you are supposed to get in touch with the course instructor via email. Honor Statement : I hereby swear that the work done on this take-home midterm is my own and that I have not given nor received aid that is inappropriate for the midterm exam. I understand that by the Student Code of Conduct for Academic Integrity, violations of these principles will lead to a zero on the midterm exam for STAT 404, and additional penalties (e.g. suspension or something else). Date: Signature: 1 1. (30 points) Let Y1, ..., Yn|θ iid∼ Bernoulli(θ), and assume that you have obtained a sample with s = ∑n i=1 yi = 710 successes in n = 1000 trials. Suppose that the value of θ is unknown and that you assign to θ, p(θ) ∝ θ3 for 0 < θ < 1. Define γ = θ1−θ be the corresponding odds of a success. (a) (10 points) What is the induced prior on γ? Use Monte Carlo simulation or grid ap- proximation to plot the induced prior on γ. (You can discard samples with γ > 100). (b) (10 points) Compute the posterior mode(i.e., MAP) of θ and posterior mean of γ, E(γ|y1, . . . , yn) using Monte Carlo simulation or grid approximation. (c) (10 points) Suppose we are to observe a future binomial value Y˜ assumed to have a binomial distribution, Binomial(10, θ). 1© Use Monte Carlo simulation to compute the posterior predictive variance, Var(Y˜ |y1, . . . , yn). 2© Prove or disprove (analytically or numerically) that Var(Y˜ |y1, . . . , yn) > 100Var ( γ γ + 1 ∣∣∣∣y1, . . . , yn) . 2. (30 points) Bortkiewicz (1898) counted the numbers of Prussian soldiers killed by horsekick (a more serious problem in the nineteenth century than it is today) in 14 army units for each of 20 years, a total of 280 counts. The 280 counts have the following values: 144 counts are 0,91 counts are 1,32 counts are 2,11 counts are 3, and 2 counts are 4. No unit suffered more than four deaths by horsekick during any one year. (These data were reported and analyzed by Winsor, 1947.) Suppose that we were going to model the 280 counts as a random sample of Poisson random variables Y1, . . . , Y280 with mean θ conditional on the parameter θ. Number of deaths 0 1 2 3 4 5 ≤ Number of units 144 91 32 11 2 0 Suppose that the value of θ is unknown and that you assign to θ, p(θ) ∝ θ0.01−1e−0.01θ for 0 < θ. (a) (10 points) Construct a 95% Bayesian confidence interval (credible interval) for θ. You can use grid approximations or Monte Carlo simulations. (b) (10 points) Let τ = √ θ. Consider the following loss function L(τ, δ) = { 3|τ − δ| if τ < δ, |τ − δ| if τ ≥ δ. (1) Find a Bayes estimate of τ based on the loss function (1) and observed data y1, . . . , y280. You can use grid approximations or Monte Carlo simulations. (c) (10 points) Alternatively, you assign a Uniform prior distribution on θ, θ ∼ Uniform(0, 100). 1© Plot the posterior density of θ and 2© compute the posterior mean of θ. You can use grid approximations or Monte Carlo simulations. 2 3. (20 points) Suppose that Y1, Y2, . . . , Yn is a random sample from Exp(θ), Y1, . . . , Yn|θ iid∼ Exp(θ). and that you have eight(n = 8) observations, (y1, . . . , y8) = (20.9, 69.7, 3.6, 21.8, 21.4, 0.4, 6.7, 10.0). (a) (10 points) Find the Jeffreys prior distribution of θ and the posterior mean of θ based on the Jeffreys prior distribution. (b) (10 points) Alternatively, suppose that your prior distribution is Gamma(0.1, 1.0). 1© Plot the prior and posterior p.d.f.s using grid approximation or Monte Carlo approxi- mation. 2© Suppose we know that y9 ≥ 20, but do not observe the exact value of y9. What is the prior predictive probability, P (Y9 ≥ 20)? In addition, what is the posterior mode(i.e., MAP) of θ given that y9 ≥ 20, p(θ|y9 ≥ 20)? 4. (20 points) Assume that Y has a negative binomial distribution with parameters r and θ, Y |θ ∼ Negbin(r, θ). Consider a uniform prior for θ ∼ Beta(1, 1). (a) (15 points) 1© Plot the posterior of θ and 2© give its 95% credible interval assuming r = 5 and Y = 10. You can use exact calculation, grid approximation or Monte Carlo approximation. (b) (5 points) Suppose that r = 1, that is Y |θ ∼ Negbin(1, θ) d= Geometric(θ), and that Y = 5. Compute the posterior predictive probability that the future observation Y˜ is greater than 7, P (Y˜ > 7|Y = 5). You can use grid approximation or Monte Carlo approximation. 5. (Bonus:20 points) Provide your plan of actions for your mini project. You can write a proposal for your mini project in one-page limit or less. • The plan of action can be either an itemized proposal or a version of the abstract for your final report. • The proposal would include the detailed plan of actions, such as the title, the main goal of the project, your basic approach and your team for the mini project. • The mini project need not be computationally expensive nor require a huge time in- vestment in data collection or method development, but it does need to show careful planning, good logic and the Bayesian analysis concepts discussed in the course. 3 







































































































学霸联盟


essay、essay代写