@staticmethod
def correlation_bicolumn(values, deviations=False, noCenter=False):
    """
        assume values is a matrix with two columns
        @param          values      2 column matrix
        @param          deviations  if True, returns cor, sigma1, sigma2
        @param          noCenter    if True, do not remove the average before computing the covariance,
                                    it means we assume variables are already centered
        @return                     correlation factor or correlation, sigma1, sigma2 if deviations is True
        """
    if len(values) <= 1:
        raise ValueError('expecting more than one observation, not %d' %
            len(values))
    mx = 0.0
    my = 0.0
    vx = 0.0
    vy = 0.0
    co = 0.0
    nb = 0.0
    for a, b in values:
        nb += 1
        mx += a
        my += b
        vx += a ** 2
        vy += b ** 2
        co += a * b
    mx /= nb
    my /= nb
    vx /= nb
    vy /= nb
    co /= nb
    if not noCenter:
        vx -= mx ** 2
        vy -= my ** 2
        co -= mx * my
    vx = vx ** 0.5
    vy = vy ** 0.5
    v = vx * vy
    if v != 0:
        co /= v
    if deviations:
        return co, vx, vy
    else:
        return co
