How to perform two-sample one-tailed t-test with numpy/scipy

前端 未结 5 996
[愿得一人]
[愿得一人] 2020-12-07 20:35

In R, it is possible to perform two-sample one-tailed t-test simply by using

> A = c(0.19826790, 1.36836629, 1.37950911, 1.46951540, 1.481977         


        
5条回答
  •  时光说笑
    2020-12-07 21:10

    From your mailing list link:

    because the one-sided tests can be backed out from the two-sided tests. (With symmetric distributions one-sided p-value is just half of the two-sided pvalue)

    It goes on to say that scipy always gives the test statistic as signed. This means that given p and t values from a two-tailed test, you would reject the null hypothesis of a greater-than test when p/2 < alpha and t > 0, and of a less-than test when p/2 < alpha and t < 0.

提交回复
热议问题