Scipy website seems to be down again :(
I am conducting a paired t test. 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. 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(a, b, axis=0, nan_policy='propagate')
Calculates the T-test on TWO RELATED samples of scores, a and b.
This is a two-sided test for the null hypothesis that 2 related or repeated samples have identical average (expected) values.
"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)
).
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.