Introduction to Bayesian Econometrics, Second Edition Answers to

0 downloads 0 Views 113KB Size Report
Introduction to Bayesian Econometrics, Second Edition. Answers to Exercises, Chapter 4. 1. We need to show that y y+β0B. −1. 0 β0-¯β B−1. 1. ¯ β = (y-X.
Introduction to Bayesian Econometrics, Second Edition Answers to Exercises, Chapter 4 1. We need to show that 0 −1 −1 ˆ 0 (y−X β)+(β ˆ ˆ0 ˆ y 0 y+β00 B0−1 β0 −β¯0 B1−1 β¯ = (y−X β) 0 −β) [(X X) +B0 ] (β0 −β).

ˆ β 0 and β0 , We do this by confirming that the expressions between βˆ0 and β, 0 and βˆ0 and β0 are the same on both sides of the equation. Start with βˆ0 and ˆ Since (y − X β) ˆ 0 (y − X β) ˆ = y 0 y − βˆ0 X 0 X β, ˆ we have on the r.h.s. β.   ˆ −βˆ0 X 0 X − [(X 0 X)−1 + B0 ]−1 β.

On the l.h.s., note that − β¯0 B1−1 β¯ = − [B1 (X 0 X βˆ + B0−1 β0 )]0 B1−1 [B1 (X 0 X βˆ + B0−1 β0 )], ˆ so that we have for the quadratic term in β, ˆ − βˆ0 [X 0 XB1 X 0 X]β.

We then have X 0 XB1 X 0 X = X 0 X[(X 0 X) + B0−1 ]−1 X 0 X   = X 0 X (X 0 X)−1 − (X 0 X)−1 [(X 0 X)−1 + B0 ]−1 (X 0 X)−1 X 0 X = X 0 X − [(X 0 X)−1 + B0 ]−1 ,

where we have used A.17 with A = X 0 X, B = I, and C = B0−1 . For the β00 , β0 term, the r.h.s. is [B0 + (X 0 X)−1 ]−1 ,

and the l.h.s. is B0−1 − B0−1 [X 0 X + B0−1 ]−1 B0−1 , which can be shown to be equal to the r.h.s. by using (A.17) with A = B0 , B = I, and C = (X 0 X)−1 . Finally, for the βˆ0 , β0 term, the r.h.s. is [B0 + (X 0 X)−1 ]−1 and the l.h.s. is X 0 X[B0−1 + X 0 X]−1 B0−1 = [B0 (B0−1 + X 0 X)(X 0 X)−1 ]−1 ,

which is equal to the r.h.s. 2. From 3.3, we know that µ|y ∼ N (µ1 , σ12 ), where µ1 = (n¯ y + σ0−2 µ0 )/(n + σ0−2 ) and σ12 = 1/(n + σ0−2 ). Therefore, lim µ1 = y¯ and lim σ12 = 1/n. Thus, the posterior distribuσ02 →∞

σ02 →∞

tion is N (¯ y , 1/n). This result might be compared to the frequentist treatment of the problem, where the sample mean is the point estimate. 3. Since β¯ = (X 0 X+B0−1 )−1 (X 0 y+B0−1 β0 ), ˆ β.

lim diag(B0 )→∞

β¯ = (X 0 X)−1 X 0 y =

Also, note that β¯ = (X 0 X + B0−1 )−1 (X 0 y + B0−1 β0 ) = (X 0 X + B0−1 )−1 (X 0 X)βˆ + (X 0 X + B0−1 )B0−1 β0 .

(1) (2)

Thus, the weigh on the prior goes to zero as the variance goes to infinity. In the limiting case, β¯ = (X 0 X)−1 X 0 y = βˆ

lim diag(B0 )→∞

lim diag(B0 )→∞

lim diag(B0 )→∞

(3)

B1 = (X 0 X)−1

(4)

α1 = α0 + n

(5)

δ1 = δ0 + y 0 y − βˆ0 X 0 X βˆ

(6)

lim diag(B0 )→∞

Therefore,   δ1 0 −1 ˆ π(β|y) = tk α1 , β, (X X) α1   δ α 1 1 2 , π(σ |y) = IG 2 2 4.

(7) (8)

5. First,   1 1 0 −1 ¯ ¯ exp − 2 (β − β) B1 (β − β) dβ 2σ (2πσ 2 )K/2   Z 1 1 1/2 0 −1 ¯ ¯ exp − 2 (β − β) B1 (β − β) dβ = |B1 | 2σ (2πσ 2 )K/2 |B1 |1/2

Z

= |B1 |1/2 .

Second, Z 

α1 /2+1

  δ1 exp − 2 dσ 2 2σ   Z  α1 /2+1 (δ1 /2)α1 /2 δ1 Γ(α1 /2) 1 exp − 2 dσ 2 = σ2 Γ(α1 /2) 2σ (δ1 /2)α1 /2 Γ(α1 /2) = . (δ1 /2)α1 /2 1 σ2

Therefore, Z Z

 1 n/2 (δ0 /2)α0 /2 |B1 |1/2 Γ(α1 /2) f (y|β, σ ) π(β, σ )dβ dσ = 2π Γ(α0 /2) |B0 |1/2 (δ1 /2)α1 /2  n/2 α /2 |B1 |1/2 Γ(α1 /2)δ0 0 1 = . α /2 π |B0 |1/2 Γ(α0 /2)δ 1 2

2

2



1

6. Let y1 , . . . , yn be i.i.d. variables. Then, f (y1 , . . . , yn ) = f (y1 ) · · · f (yn ), which is invariant to permutations in the indices 1, 2, . . . , n.

7.

P (R1 , B2 , B3 ) = P (B1 , R2 , B3 ) = P (B1 , B2 , R3 ) =

R R+B B R+B B R+B

B R+B−1 R · R+B−1 B−1 · R+B−1 ·

B−1 , R+B−2 B−1 · , R+B−2 R · . R+B−2 ·

Therefore, P (R1 , B2 , B3 ) = P (B1 , R2 , B3 ) = P (B1 , B2 , R3 ). But R , R+B P (R1 , B2 ) R P (R1 |B2 ) = = 6= P (R1 ). P (B2 ) R+B−1 P (R1 ) =