Precision to graph

A normal vector (X_1,X_2,X_3) has precision matrix

K=\begin{pmatrix} 2 & -1 & 0 \\ -1 & 3 & -1 \\ 0 & -1 & 2 \end{pmatrix}.

Draw the graph, find the covariance matrix \Sigma=K^{-1}, and show that X_1 and X_3 are marginally correlated but conditionally independent given X_2. Compute the partial correlations.

Since k_{13}=0 the graph is the chain 1-2-3. The determinant is

|K|=2(6-1)-(-1)(-2)=10-2=8,

and the cofactors give

\Sigma=K^{-1}=\frac18\begin{pmatrix} 5 & 2 & 1 \\ 2 & 4 & 2 \\ 1 & 2 & 5 \end{pmatrix}.

The marginal correlation of X_1 and X_3 is

\frac{\sigma_{13}}{\sqrt{\sigma_{11}\sigma_{33}}}=\frac{1/8}{5/8}=0.2\neq 0,

yet k_{13}=0, so X_1\perp X_3\mid X_2. The partial correlations are

\rho_{12\mid 3}=\frac{1}{\sqrt{2\times 3}}=0.408, \qquad \rho_{23\mid 1}=\frac{1}{\sqrt{3\times 2}}=0.408, \qquad \rho_{13\mid 2}=0.