computing ambiguity residual covariance inverse