Docsity

Bayes Theorem - Bayesian Inference - Exam, Exams of Mathematics

Toggle sidebar
bg1
LANCASTER UNIVERSITY
2008 EXAMINATIONS
PART II (Third or Fourth year)
MATHEMATICS & STATISTICS 2 hours
Math 351: Bayesian Inference
You should answer ALL questions from Section A, and TWO questions from Section B.
In Section A there are questions worth a total of 50 marks, but the maximum mark that you can
gain there is capped at 40.
There is a formula sheet at the end of this examination paper.
SECTION A
A1. (a) State Bayes’ theorem for the conditional probability density function (pdf) p(θ|x) of a
parameter θin terms of the likelihood p(x|θ) and prior p(θ). [4]
(b) A basketball coach wishes to estimate the success rate (or probability of success) πof a
particular player based on observing a particular game. She has no prior knowledge of the
player so decides to allocate this player a flat non-informative prior p(π) = 1,0≤π≤1.
If, in the game, this player scores 6 goals from 6 attempts derive an expression for the
player’s posterior probability of success, p(π|y) (up to a normalising constant). State
any assumptions that maybe needed to solve this problem. [3]
(c) Find the normalising constant of the posterior distribution p(π|y). [3]
(d) State two properties of a 95% highest posterior density region. Write both as mathe-
matical expressions or explain carefully in words (using a diagram if necessary). [4]
(e) Find the 95% highest posterior density interval for the posterior probability of success
found in (b) above. [3]
please turn over
1
pf3
pf4
pf5

Partial preview of the text

Download Bayes Theorem - Bayesian Inference - Exam and more Exams Mathematics in PDF only on Docsity!

LANCASTER UNIVERSITY

2008 EXAMINATIONS

PART II (Third or Fourth year)

MATHEMATICS & STATISTICS 2 hours

Math 351: Bayesian Inference

You should answer ALL questions from Section A, and TWO questions from Section B. In Section A there are questions worth a total of 50 marks, but the maximum mark that you can gain there is capped at 40. There is a formula sheet at the end of this examination paper.

SECTION A

A1. (^) (a) State Bayes’ theorem for the conditional probability density function (pdf) p(θ|x) of a parameter θ in terms of the likelihood p(x|θ) and prior p(θ). [4] (b) A basketball coach wishes to estimate the success rate (or probability of success) π of a particular player based on observing a particular game. She has no prior knowledge of the player so decides to allocate this player a flat non-informative prior p(π) = 1, 0 ≤ π ≤ 1. If, in the game, this player scores 6 goals from 6 attempts derive an expression for the player’s posterior probability of success, p(π|y) (up to a normalising constant). State any assumptions that maybe needed to solve this problem. [3] (c) Find the normalising constant of the posterior distribution p(π|y). [3] (d) State two properties of a 95% highest posterior density region. Write both as mathe- matical expressions or explain carefully in words (using a diagram if necessary). [4] (e) Find the 95% highest posterior density interval for the posterior probability of success found in (b) above. [3]

please turn over

SECTION A continued

A2. (^) (a) Suppose y is drawn from a binomial distribution with parameters θ and n trials. Show that if the prior for θ is Beta (α, β) then the posterior for θ is Beta (α + y, β + n − y). [3]

(b) Suppose data have a negative binomial distribution for y failures with k successes fixed. (i) Assuming a Beta (α, β) prior for θ find the posterior for θ. [4] (ii) Compare this posterior with the binomial posterior in part (a) and determine under what circumstances the two posteriors are the same? [4] (c) An observer wishes wishes to estimate the rate λ at which cars pass a building at a given time on a normal working day by counting the numbers of cars passing it during 10 consecutive one minute intervals. We denote these counts of cars by y = y 1 , y 2 ,... , y 10 and assume that these observations come from the Poisson distribution. (i) List two further assumptions that are needed before the likelihood can be computed. [2] (ii) Explain what is meant by a conjugate prior and find it for λ. Assuming that there is no prior information about λ, how large should the parameters of that prior be? [4] (iii) Derive an expression for the posterior distribution of λ, p(λ|y). [3]

A3 (^) (a) Suppose that observations x 1 , x 2 ,... , xn are available from a density

p(x|θ) ∝ θ exp(−θx) (0 < x < ∞).

(i) What is the conjugate prior for the parameter θ? [4] (ii) Derive an expression for the posterior distribution of θ. [4] (b) It is known that 5% of all men and 0.25% of all women are colour-blind. A person chosen by chance suffers from colour-blindness. What is the probability that this is a man? (It is assumed that there is an equal number of men and women.) [5]

please turn over

SECTION B continued

B2. (a) A particular insurance policy has an average of λ claims per customer per year. A total of n customer make y 1 , y 2 ,... , yn claims over corresponding time periods of x 1 , x 2 ,... , xn years respectively. (i) Assuming the number of claims, yj , made by the jth^ customer is Poisson with mean λxj and independent of other customers, show that the likelihood is given by

p(y|λ) ∝ e−nλ¯xλn¯y

where ¯y =

∑ni=1 yi n and where ¯x^ =

∑ni=1 xi n.^ [5] (ii) Assuming a Gamma (α, β) prior for λ determine the posterior distribution of λ: p(λ|y), and find its mean. [6]

(iii) Find the predictive distribution for number of claims the n + 1th^ customer given that he/she has had a policy for xn+1 years. [5]

(b) Suppose a random sample y 1 , y 2 ,... , yn is taken from a Normal

0 , (^1) τ

distribution (that is (^1) τ is the reciprocal of the variance). Suppose τ has a prior Gamma (α, β) distribution. (i) Determine the posterior distribution of τ. [4] (ii) What is the posterior mean of τ? [2] (iii) The standard uninformative improper prior for this case allows α, β → 0. Show that the limit of this Gamma distribution is improper and that it corresponds to assuming that log τ has a uniform distribution on the real line. [5] (iv) In this case, find the limit of the posterior mean. [3]

please turn over

SECTION B continued

B3. (a) A Bayes estimate for a scalar parameter θ is defined as the function of the data d(y) which minimises the posterior expected loss ∫ L (d(y), θ) p(θ|y) dθ

(i) For the squared loss function, L(d, θ) = (θ − d)^2 show that the Bayes estimate is the posterior mean. [5] (ii) Suppose that the loss function is defined by the bilinear loss function

L(d, θ) =

a(θ − d), d ≤ θ b(d − θ), d > θ for a, b > 0. Assuming that the posterior density p(θ|y) is continuous show that the Bayes estimate is the (^) aa+b quantile of the distribution of p(θ|y). [10]

(b) Assume that an observation, X = x, is normally distributed with prior mean θ and known variance σ^2. The parameter of interest, θ, also has a normal prior distribution with parameters μ and δ^2. This is: X|θ ∼ Normal (θ, σ^2 )^ and θ ∼ Normal (μ, δ^2 ). (i) Show that the marginal distribution of X is X ∼ Normal

μ, δ^2 + σ^2

. [You may do this by setting Z to an appropriate distribution and then expressing X as the sum, X = Z + θ .] [7] (ii) By completing the square (or otherwise), show that the posterior distribution of θ is given by θ|x ∼ Normal

( (^) μ δ 12 +^ σx^2 δ^2 +^ σ^12

δ^2 +^ σ^12

. [8]

end of exam