Math: better definition of covariance matrix