BDA3 Chapter 2 Exercise 17

Here’s my solution to exercise 17, chapter 2, of Gelman’s Bayesian Data Analysis (BDA), 3rd edition. There are solutions to some of the exercises on the book’s webpage.

We’ll show that highest posterior invervals are not invariant under parameter transformations.

Suppose nvσ2σ2χ2n with (improper) prior σσ1. From equation (2.19), page 52, the prior density for σ2 is

p(σ2)=p(σ)(2σ)11σ2.

Thus the posteriors are

p(σ2y)=(1σ)nenv2σ2p(σy)=(1σ)n1env2σ2,

where we have dropped any multiplicative constants that don’t depend on σ.

Since the posteriors are continuous everywhere, we can assume that the highest posterior regions are collections of closed intervals. Let a,b be two boundary points on the highest posterior density region of p(σ2y). Using continuity and the defining property of highest posterior regions, the density at a is equal to the density at b, i.e.

(1a)nenv2a2=(1b)nenv2b2.

Assume for contradiction that the highest posterior region for p(σy) is the square root of the region for p(σ2y). Then by continuity, a,b are endpoints on the highest posterior region for p(σy). Thus

(1a)n1env2a2=(1b)n1env2b2.

The two equalities above are equivalent to 1a=1b, which implies

a=b

This is true of any two boundary points, so the highest posterior region is a point. This contradicts the fact that the highest posterior region contains 95% probability mass. Therefore, the highest posterior regions are not invariant under reparameterisation.