def binom_tost_reject_interval(low, upp, nobs, alpha=0.05):
 x_low = (stats.binom.isf(alpha, nobs, low) + 1)
 x_upp = (stats.binom.ppf(alpha, nobs, upp) - 1)
 return (x_low, x_upp)

def binom_tost_reject_interval ( low , upp , nobs , alpha = 0.05 ) : x_low = ( stats . binom . isf ( alpha , nobs , low ) + 1 ) x_upp = ( stats . binom . ppf ( alpha , nobs , upp ) - 1 ) return ( x_low , x_upp )
rejection region for binomial tost the interval includes the end points .