def _ssmnp_test(self, p1, p2, nt):
        """
        Steady state multinomial probability difference test.

        Arguments
        ---------
        p1       :  array
                    (k, ), first steady state probability distribution.
        p1       :  array
                    (k, ), second steady state probability distribution.
        nt       :  int
                    number of transitions to base the test on.

        Returns
        -------
        tuple
                   (3 elements)
                   (chi2 value, pvalue, degrees of freedom)

        """

        o = nt * p2
        e = nt * p1
        d = np.multiply((o - e), (o - e))
        d = d / e
        chi2 = d.sum()
        pvalue = 1 - stats.chi2.cdf(chi2, self.k - 1)
        return (chi2, pvalue, self.k - 1)
def _ssmnp_test ( self , p1 , p2 , nt ) : o = nt * p2 e = nt * p1 d = np . multiply ( ( o - e ) , ( o - e ) ) d = d / e chi2 = d . sum ( ) pvalue = 1 - stats . chi2 . cdf ( chi2 , self . k - 1 ) return ( chi2 , pvalue , self . k - 1 )
Steady state multinomial probability difference test.

        Arguments
        ---------
        p1       :  array
                    (k, ), first steady state probability distribution.
        p1       :  array
                    (k, ), second steady state probability distribution.
        nt       :  int
                    number of transitions to base the test on.

        Returns
        -------
        tuple
                   (3 elements)
                   (chi2 value, pvalue, degrees of freedom)