Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Bayesian Statistics: Exercise Set 5 1. Assume y | θ ∼ Exp(θ ) and θ ∼ Gamma(α, β ). A single observation y is made, and you are informed that y ≥ L but you are not told the value of y. Find the posterior predictive density p(ỹ | y ≥ L). 2. Let lifetimes yi | θ ∼ Exp(θ ) be conditionally mutually independent given θ . Consider data that is censored from below: in addition to observations y1 , . . . , yk , there are n − k observations that you know are less than `, but for which you don’t know the value. (a) Show that the family of gamma distributions is not a conjugate prior family for this data. (Hint: show that a gamma prior does not give a gamma posterior.) (b) Use the approximation e−θ ` ≈ 1 − θ ` (valid for small `) to derive an approximation of the posterior corresponding to the prior θ ∼ Gamma(α, β ). 3. Credibility intervals can be computed using the inverse cumulative distribution function F −1 (p). For example, (F −1 (0.05), F −1 (0.95)) is an equal-tail 90% credibility interval. Suppose you have software to compute the Gamma(α, β ) distribution’s inverse cumulative distribution function F −1 (p | α, β ). How could you use this software to compute a 90% credibility interval for the InvGam(α, β ) distribution? (Hint: if τ ∼ Gamma(α, β ) and φ = τ1 then φ ∼ InvGam(α, β ).) 4. Suppose the heights of army conscripts (in a European country long ago) are normally distributed with mean 164 and unknown variance with prior φ ∼ InvGam(38, 1110). Find and plot the posterior distribution corresponding to the data 161 164 181 174 163 162 164 174 160 168 172 156 172 161 174 164 5. Solve exercise 4 using WinBUGS and DoodleBUGS. You can use the precision parameter τ as the simulation variable, and then look at the statistics of φ = 1/τ: model for tau phi } { (i in 1:n) { y[i] ~ dnorm(164,tau) } ~ dgamma(38,1110) <- 1/tau # likelihood # prior # variance parameter 6. In an opinion survey of 1000 Finns held in October 2000, 490 were in favour of adopting the euro currency. Find the 95% HDI based on the priors p(θ ) ∝ 1 (a) 1 (Bayes-Laplace), 1 (b) θ − 2 (1−θ )− 2 (Jeffreys), (c) θ −1 (1−θ )−1 (Haldane) You may use the normal approximation to compute the HDI. 7. The Pareto(θ , m) distribution is used to model incomes; the parameter m represents the minimum income. The density is −(θ +1) p(yi | θ ) = θ mθ yi (yi > m) Assume that y1 , . . . , yn are conditionally mutually independent given θ . (a) Show that Jeffreys’s prior for the Pareto distribution is p(θ ) ∝ θ1 . (b) Find the posterior density and mean corresponding to Jeffreys’s prior. (Hint: write the Pareto density in the form p(yi | θ ) ∝ θ e−θ (log yi −log m) ). (c) Find the posterior density and mean corresponding to the prior θ ∼ Gamma(α, β ). 8. Show that if u ∼ Exp(θ ) and y = meu then y ∼ Pareto(θ , m). Answers 1. α(β +L)α (ỹ+β +L)−(α+1) 2b. Gamma(α +n, β + ∑ki=1 yk ) 4. InvGam(46, 1528) 6a. [0.459, 0.521] 7c. Gamma(α + n, β − n ln m + ∑ni=1 yi )