def mannwhitneyu(a, b, sigLevel=.05): """ Determine if sample a and b are the same at given significance level. """ if len(a) <= 20 and len(b) <= 20: return mannwhitneyu_small(a, b, sigLevel) else: try: # MWU in SciPy is one-sided, multiply by 2 to get two-sided. p = mannwhitneyu_large(a, b)[1] * 2 return p >= sigLevel except ValueError: return True
def mannwhitneyu(a, b, sigLevel = .05): """ Determine if sample a and b are the same at given significance level. """ if len(a) <= 20 and len(b) <= 20: return mannwhitneyu_small(a, b, sigLevel) else: try: # MWU in SciPy is one-sided, multiply by 2 to get two-sided. p = mannwhitneyu_large(a, b) * 2 return p >= sigLevel except ValueError: return True