Car*_*n R 5 python statistics scipy
给定两个配对数据数组:
import numpy, scipy
A = numpy.array([18.3, 13.3, 16.5, 12.6, 9.5, 13.6, 8.1, 8.9, 10.0, 8.3, 7.9, 8.1, 13.4])
B = numpy.array([12.7, 11.1, 15.3, 12.7, 10.5, 15.6, 11.2, 14.2, 16.2, 15.5, 19.9, 20.4, 36.8])
Run Code Online (Sandbox Code Playgroud)
使用 scipy 中的 wilcoxon 方法:https://docs.scipy.org/doc/scipy/reference/ generated/scipy.stats.wilcoxon.html
print(scipy.stats.wilcoxon(A, B))
#outputs: WilcoxonResult(statistic=16.0, pvalue=0.039243276150326668)
Run Code Online (Sandbox Code Playgroud)
当使用 5% 的显着性时,该零假设将被拒绝。
我的问题是:我如何才能看到哪个方向导致了拒绝?