Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

Dr.

Shahin Tavakoli Applied Bayesian Statistics Project D

Project D
Exercise D.1 (1 point). Let y|(X, β, σ 2 ) ∼ Nn (Xβ, σ 2 In ), as in slides C1.

1. Show that
 
1
2 2 −n/2
p(y|X, β, σ ) ∝σ2 (σ ) exp − 2 SSR(β) .

as a function of σ 2 . (SSR(β) is dened in slides C1)

2. Let ν
2 ν0 2 
0
1/σ ∼ Gamma , σ .
2 2 0
Assuming σ 2 ⊥
⊥ (X, β), show that

σ 2 |(y, X, β) ∼ Inv-Gamma([ν0 + n]/2, [ν0 σ02 + SSR(β)]/2).

Exercise D.2 (0.5 point). Show that if the density µ and the Markov kernel function
k(·, ·) are in detailed balance, then the Markov chain with Markov kernel function k is
µ-invariant.

Exercise D.3 (2 points).

1. Show that the Markov kernel function k(·, ·) of the MetropolisHastings (MH) algo-
rithm for sampling from a target density µ(·) is as given in the slides;

2. Show that µ and k are in detailed balance.

1
Dr. Shahin Tavakoli Applied Bayesian Statistics Project D

Exercise D.4 (2.5 points). Consider the setting of slides D1:


i.i.d.
yi,j = β Tj xi,j + ϵi,j , {εi,j }|σ 2 ∼ N(0, σ 2 ).
i.i.d.
βj = θ + γ j , {γ j }|Σ ∼ Np (0, Σ).
θ ∼ Np (µ0 , Λ0 )
Σ ∼ Inv-Wishart(η0 , S −1
0 )
1/σ ∼ Gamma(ν0 /2, ν0 σ0 /2)
2 2

Assume that µ0 , Λ0 , η0 , S0−1 , ν0 , σ0 are given and xed. Giving details and justication of
any calculations you might need to do,

1. give the exact distribution of the full conditional of θ , assuming that

(a) {y j } ⊥
⊥ (θ, Σ)|({β j }, σ 2 ),
(b) σ 2 ⊥
⊥ (β, θ, Σ),
(c) θ ⊥
⊥ Σ,

2. give the exact distribution of the full conditional of Σ, assuming that

(a) (θ, Σ) ⊥
⊥ ({y j }, σ 2 )|{β j },
(b) θ ⊥
⊥ Σ,

Hint: for some of these you might use calculations or results seen previously (but mention
them).

2
Dr. Shahin Tavakoli Applied Bayesian Statistics Project D

Instructions
ˆ This project is worth 25% of your nal mark.

ˆ The deadline for this project is Sunday 11th of June 2023 at midnight.

ˆ You can work on this in groups of 3 students. You can decide the groups. Make sure
that the names of each person in the group appears on the report.

ˆ You do not have to write your solutions in Latex. You can either write on a tablet
and convert it into pdf or you can write on paper and scan the sheet.

ˆ You should submit the pdf le on Moodle.

ˆ Late submissions are allowed but you will lose 0.5 pt for each 12 hours period of
delay.

ˆ The length of the report should be reasonable. Reports that are too long will be
penalized.

ˆ You will receive group feedbacks for your work but no general solution will be released.

You might also like