Computing the coefficient of a correlation