是否有可能在Scipy的Mann-Whitney U检验中指定替代假设?

时间:2014-07-22 21:24:29

标签: python numpy statistics scipy

我想计算x> x的单侧p值。使用scipy.stats.mannwhitneyu函数:

u_value, p_value = scipy.stats.mannwhitneyu(x, y)
然而,没有任何地方可以指定替代假设。在R中,可以使用:

wilcox.test(x, y, alternative = 'greater')

有没有人知道是否可以使用scipy或任何其他包在python中执行此操作?

1 个答案:

答案 0 :(得分:4)

从Scipy 0.17.0开始,您现在可以scipy.stats.mannwhitneyu(x, y, alternative='greater')