With unit error variance, the Gaussian likelihood has log-likelihood
Full column rank gives and the least-squares identity
Multiplying the likelihood by and absorbing all terms independent of into gives
Put . The Weighted graph Laplacian of the tree is defined by
Multiplication of the Gaussian likelihood by the prior shows that, conditionally on the precision parameter ,
Completing the square therefore gives
As a function of , the posterior density is
so, in shape-rate notation,
The precision matrix has the sparsity pattern of a tree. A sparse Cholesky decomposition and its triangular solves have cost and storage on this graph, while the gamma update also costs . Hence each systematic-scan Gibbs sampler iteration costs .