def mvstdtprob(a, b, R, df, ieps=1e-05, quadkwds=None, mvstkwds=None):
 kwds = dict(args=(a, b, R, df), epsabs=0.0001, epsrel=0.01, limit=150)
 if (not (quadkwds is None)):
  kwds.update(quadkwds)
 (res, err) = integrate.quad(funbgh2, *chi.ppf([ieps, (1 - ieps)], df), **kwds)
 prob = (res * bghfactor(df))
 return prob

def mvstdtprob ( a , b , R , df , ieps = 1e-05 , quadkwds = None , mvstkwds = None ) : kwds = dict ( args = ( a , b , R , df ) , epsabs = 0.0001 , epsrel = 0.01 , limit = 150 ) if ( not ( quadkwds is None ) ) : kwds . update ( quadkwds ) ( res , err ) = integrate . quad ( funbgh2 , * chi . ppf ( [ ieps , ( 1 - ieps ) ] , df ) , ** kwds ) prob = ( res * bghfactor ( df ) ) return prob
probability of rectangular area of standard t distribution assumes mean is zero and r is correlation matrix notes this function does not calculate the estimate of the combined error between the underlying multivariate normal probability calculations and the integration .