在R中,可以通过使用简单地执行双样本单尾t检验
> A = c(0.19826790, 1.36836629, 1.37950911, 1.46951540, 1.48197798, 0.07532846)
> B = c(0.6383447, 0.5271385, 1.7721380, 1.7817880)
> t.test(A, B, alternative="greater")
Welch Two Sample t-test
data: A and B
t = -0.4189, df = 6.409, p-value = 0.6555
alternative hypothesis: true difference in means is greater than 0
95 percent confidence interval:
-1.029916 Inf
sample estimates:
mean of x mean of y
0.9954942 1.1798523
在Python世界中,scipy提供了类似的功能ttest_ind,但只能进行双尾t检验.关于我发现的最近的信息是this链接,但是似乎是讨论实施单尾vs双尾的铲子的政策.
因此,我的问题是有谁知道有关如何使用numpy / scipy执行单尾版本的测试的任何示例或说明?