且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何使用 numpy/scipy 执行两样本单尾 t 检验

更新时间:2021-12-23 02:20:44

来自您的邮件列表链接:

From your mailing list link:

因为单面测试可以从双面退出测试.(对于对称分布,一侧 p 值仅为一半两侧 pvalue)

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)

接着说 scipy 总是给出带符号的测试统计量.这意味着给定来自双尾检验的 p 和 t 值,当 p/2 0,当 p/2 .

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.