BDA3 Chapter 14 Exercise 3

[This article was first published on Brian Callander, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

BDA3 Chapter 14 Exercise 3

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

We need to reexpress (yXβ)T(yXβ) as (μβ)TΣ1(μβ), for some μ, Σ. Using the QR-decomposition of X=QR, we see

(yXβ)T(yXβ)=(QT(yXβ))TQT(yXβ)=(QTyQTXβ)T(QTyQTXβ)=(QTyRβ)T(QTyRβ),

where Q is orthogonal and R an invertible upper triangular matrix. We can read off the minimum of this quadratic form as

ˆβ=R1QTy,

which shows that μ=ˆβ=R1QTy. Note that

(XTX)1XT=(RTR)1RTQT=R1RTRTQT=R1QT

so that ˆβ=(XTX)1XTy.

Expanding the brackets of both quadratic form expressions and comparing the quadratic coefficients, we see that

Σ1=RTR=XTX,

which shows that Vβ=(XTX)1, in the notation of page 355.

To leave a comment for the author, please follow the link and comment on their blog: Brian Callander.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)