= Solution
Put $z_i=\log Y_i$. The <Weighted graph Laplacian> $L_J$ of the tree is defined by
$$
\beta^TL_J\beta
=\sum_{i\ne v_0}J_i(\beta_i-\beta_{a(i)})^2.
$$
Multiplication of the <Gaussian likelihood> by the prior shows that, conditionally on the <precision parameter> $\tau$,
$$
\pi(\beta\mid Y,\tau)
\propto\exp\left\{-\frac12\beta^TM\beta
+\tau z^T\beta\right\},
\qquad
M=\tau I+2L_J+2cI.
$$
Completing the square therefore gives
$$
\beta\mid Y,\tau\sim N(M^{-1}\tau z,M^{-1}).
$$
As a function of $\tau$, the posterior density is
$$
\tau^{n/2}\exp\left\{-\tau\left(1+\frac12\lVert z-\beta\rVert^2\right)\right\},
$$
so, in shape-rate notation,
$$
\tau\mid Y,\beta\sim
\operatorname{Gamma}\left(\frac n2+1,
1+\frac12\lVert z-\beta\rVert^2\right).
$$
The <precision matrix> $M$ has the <sparse matrix>[sparsity pattern] of a <tree>. A sparse <Cholesky decomposition> and its triangular solves have $O(n)$ cost and storage on this graph, while the gamma update also costs $O(n)$. Hence each systematic-scan <Gibbs sampler> iteration costs $O(n)$.
Back to article page