Partial correlation (source code)

= Partial correlation
{title2=$\rho_{12\cdot3}=(\rho_{12}-\rho_{13}\rho_{23})/\sqrt{(1-\rho_{13}^2)(1-\rho_{23}^2)}$}

The partial <correlation> is the <correlation> of residuals after linearly projecting each of two variables on the conditioning variables and an intercept. With nonsingular <covariance matrix>, subtracting the two least-squares predictors gives residual <covariance> $\sigma_{12}-\sigma_{13}\sigma_{23}/\sigma_{33}$ and residual <variances> $\sigma_{ii}-\sigma_{i3}^2/\sigma_{33}$. Dividing gives the displayed formula. For a <multivariate normal distribution>, it is also the <conditional correlation>, independent of the conditioning value; this equality need not hold for general distributions.