'Scores bigrams using phi-square, the square of the Pearson correlation
coefficient.'

@classmethod
def phi_sq(cls, *marginals):

    (n_ii, n_io, n_oi, n_oo) = cls._contingency(*marginals)
    return ((((n_ii * n_oo) - (n_io * n_oi)) ** 2) / ((((n_ii + n_io) * (n_ii + n_oi)) * (n_io + n_oo)) * (n_oi + n_oo)))
