Gaussian conjugacy for an initialized AR(2) regression (source code)

= Gaussian conjugacy for an initialized AR(2) regression
{c}
{title2=$\Sigma=\Lambda^{-1},\quad\mu=\Lambda^{-1}h$}

With independent standard-normal priors on the two coefficients, the conditional AR(2) likelihood gives precision $\Lambda=I+\sum_tv_tv_t^T$, where $v_t=(x_{t+1},x_t)^T$, and mean $\Lambda^{-1}\sum_tv_tx_{t+2}$. Positive definiteness holds even for a deficient design. If $\Lambda=\left(\begin{smallmatrix}A&C\\C&D\end{smallmatrix}\right)$ and the linear term is $(r,s)$, the conditional means are $(r-Cb)/A$ and $(s-Ca)/D$, with variances $1/A$ and $1/D$.