[英]How to choose between a two tailed and one tailed T-test with scipy?
Scipy website seems to be down again :( Scipy网站似乎再次掉线了:(
I am conducting a paired t test. 我正在进行配对t检验。 But I am not sure how to choose between two-tailed and one-tailed (I need to use two-tailed).
但是我不确定如何在两尾和一尾之间进行选择(我需要使用两尾)。 And also the ttest_reul only return t and p values.
而且ttest_reul只返回t和p值。 Anyway to find out degrees of freedom?
反正找出自由度? Many thanks
非常感谢
from scipy import stats
t_val_Input, p_val_Input = stats.ttest_rel(c1,c2)
From the docstring of ttest_rel
: 从
ttest_rel
的文档字符串:
ttest_rel(a, b, axis=0, nan_policy='propagate')
ttest_rel(a,b,轴= 0,nan_policy ='传播')
Calculates the T-test on TWO RELATED samples of scores, a and b.
在两个相关的分数a和b样本上计算T检验。
This is a two-sided test for the null hypothesis that 2 related or repeated samples have identical average (expected) values.
这是对2个相关样本或重复样本具有相同的平均(预期)值的原假设的双向检验。
"Two-sided" means two-tailed. “双面”是指两尾。
The degrees of freedom is n - 1
, where n
is the number of pairs (ie len(a)
or len(b)
). 自由度是
n - 1
,其中n
是对的数量(即len(a)
或len(b)
)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.