presto-main/src/main/java/io/prestosql/operator/aggregation/AggregationUtils.java/AggregationUtils/updateRegressionState
class AggregationUtils:    public static void updateRegressionState(RegressionState state, double x, double y)
    {
        double oldMeanX = state.getMeanX();
        updateCovarianceState(state, x, y);
        state.setM2X(state.getM2X() + (x - oldMeanX) * (x - state.getMeanX()));
    }