least squares test