AAEC/ECON 5126 FINAL EXAM: SOLUTIONS SPRING 2015 / INSTRUCTOR: KLAUS MOELTNER This exam is ope-book, ope-otes, but please work strictly o your ow. Please make sure your ame is o every sheet you re hadig i. You have 120 miutes to complete this exam. You ca collect a maximum of 50 poits. Each questio is scored as idicated below. Vectors are give i lower-case boldface. Matrices are writte i upper-case boldface. Questio I 20 poits): Estimatig a Populatio Proportio via Maximum Likelihood You are researchig groudwater cotamiatio i a commuity of homes, all of which receive their water supply through a private well. You have a sample of wells, y of which are cotamiated y, of course). Your parameter of iterest is θ, the proportio of cotamiated wells i the etire commuity. You believe the sample likelihood follows a Biomial distributio, give as L θ) = θ y 1 θ) y, θ [0, 1], y = 1, 2,..., where! =!y! 1) I this otatio, is the umber of trials the umber of wells i your sample), ad y is the umber of successes the umber of cotamiated wells i your sample). The expectatio ad variace of the biomial are give, respectively, as E y θ, ) = θ, ad V y θ, ) = θ 1 θ). Part a) 14 poits Derive the followig aalytical costructs: 1) The log-likelihood fuctio ll θ) 2 poits) 2) The gradiet g θ) 2 poits) 3) The Hessia H θ) 2 poits) 4) The Iformatio matrix I θ) 2 poits) 5) Show that the score idetity holds. 2 poits) 6) Show that the iformatio idetity holds. 4 poits) Date: May 12, 2015. 1
ll θ) = l + y l θ) + l 1 θ) g θ) = yθ 1 1 θ) 1 = θ 1 θ)) 1 y 1 θ) 1 H θ) = yθ 2 1 θ) 2 I θ) = E H θ)) = use E y θ, ) = θ for y i H θ) ) θ 1 θ) E g θ)) = 0 use E y θ, ) = θ for y i g θ) ) V g θ)) = θ 1 θ)) 2 V y θ, ) = θ 1 θ)) 2 θ 1 θ) = θ 1 θ) = I θ), usig V y θ, ) = θ 1 θ) i the secod expressio of g θ) ). 2) Part b) 6 poits Assume you have a sample of 100 wells, 20 of which are cotamiated. Fid the MLE estimate for θ ad its stadard error. Settig the gradiet from above to zero ad solvig for θ we obtai ˆθ = y, which, for this sample, equals 0.2. The variace of θ is the iverse of the iformatio matrix: V θ) = θ1 θ). So i this case we obtai ˆV ˆθ) = 0.0016. The square root of this gives the stadard error of 0.04. 2
Questio II 30 poits): Estimatig a Populatio Proportio via Bayesia Methods Cotiuig with the problem from above, you have obtaied iformatio from other commuities that are located o the same groudwater aquifer. For these locatios, the average proportio of cotamiated wells is 0.25 with a stadard deviatio of 0.14. You use this iformatio to specify a prior distributio for θ as a Beta desity with shape parameters α 0 = 2 ad β 0 = 6. This desity is give as: p θ) = Γ α 0 + β 0 ) Γ α 0 ) Γ β 0 ) θα 0 1 1 θ) β 0 1 θ [0, 1], 3) where Γ.) deotes the mathematical gamma fuctio. The expectatio ad variace of the Beta are give, respectively, as E θ) = α 0 α 0 +β 0, ad V θ) = α 0 β 0 α 0 +β 0 ) 2 α 0 +β 0 +1). You ca easily verify but you do t have to...) that for the give prior shape parameters α 0 = 2 ad β 0 = 6 we obtai a prior expectatio for θ of 0.25 ad a prior stadard deviatio of approx.) 0.14. Alog with the atural bouds of the Beta at 0 ad 1, this seems ideed like a reasoable prior distributio for θ. Part a) 8 poits Usig the same biomial likelihood as i Q.1 that is, the u-logged versio), fid the posterior distributio of θ, call it p θ y, ). Show that it is agai a Beta with shape parameters α 1 ad β 1, ad show that these posterior parameters are a fuctio of the prior parameters ad the data. Hit: Multiply all relevat parts of the prior with all relevat parts of the likelihood to obtai the posterior kerel. Simplify, ad recogize the resultig kerel as the kerel of aother Beta distributio with parameters α 1 ad β 1. The show the explicit form of α 1 ad β 1. This should take o more tha a miute or two...) p θ y, ) θ α 0 1 1 θ) β 0 1 θ y 1 θ) y = θ α 0+y 1) 1 θ) β 0+ y 1) 4) Thus, θ y, Beta α 1, β 1 ), with α 1 = α 0 + y, ad β 1 = β 0 + y. Part b) 6 poits For your sample of 100 wells with 20 cotamiatio cases, compute the posterior mea ad stadard deviatio of θ. Please be precise to the fourth decimal. First ote that for the give data ad prior parameters, we have α 1 = α 0 + y = 22, ad β 1 = β 0 + y = 86. We ca ow use these values i the give expressios for the mea ad variace 3
of a Beta radom variable: E θ y, ) = α 1 α 1 + β 1 = 0.2037 V θ y, ) = α 1 β 5) 1 α 1 + β 1 ) 2 α 1 + β 1 + 1) = 0.0015 This yields a posterior stadard deviatio of sd θ y, ) = sqrt 0.0015) = 0.0386. Part c) 6 poits Aswer the followig questios: 1) Compare the MLE estimate ad the posterior mea of θ. Why are they at least slightl differet? 2 poits) 2) Has the collected data brought meaigful iformatio to add to the prior? How ca you tell? 2 poits) 3) For the same collected data, how would you expect your posterior mea to chage up, dow, or o chage) if the prior mea of θ had bee 0.4? Explai. 2 poits) 1) The posterior mea is slightly higher due to the ifluece of the prior distributio, which has a higher mea of 0.25. The sample size is ot large eough to completely overpower the prior. 2) Yes - the posterior stadard deviatio is much smaller tha the prior stadard deviatio. So the iformatio from the data has tighteed up the prior distributio. 3) We would expect the posterior mea to icrease, due to the ifluece of the ew prior. Part d) 10 poits Now cosider istead a sample of oly 10 wells, with 2 cotamiatios ad the origial priors from above). Compute the ew MLE estimate ad its stadard error, ad the ew posterior mea ad stadard deviatio. 4 poits) 1) How has the posterior mea chaged compared to its previous value? Why? 2 poits) 2) Why has the posterior mea chaged ad the MLE estimate ot? 2 poits) 3) Compare the ew MLE stadard error ad the ew posterior stadard deviatio. Which oe has icreased more i both absolute ad relative terms), ad why? 2 poits) Usig) all the ew sample iformatio ad the aalytical results from above, we obtai ˆθ = 0.2, s.e ˆ ˆθ = 0.1265, α 1 = 4, β 1 = 14, E θ y, ) = 0.2222, ad sd θ, = 0.0945. 1) The posterior mea has icreased - this is because the prior ifluece is ow stroger tha before due to the smaller sample size. 2) Same aswer as above - the posterior mea is uder the ifluece of the prior, which is completely abset for the MLE estimate. 4
3) The MLE stadard error has icreased much more. I cotrast, the precisio of the posterior desity has suffered less from the decreased sample size. This is due to the relatively high precisio brought to the model by the prior distributio. We have a iformed prior). 5