我需要使用 (alpha)/2 和 df 计算下一个表的 t 值:
https://www.fisterra.com/mbe/investiga/t_student/images/t_stud4.gif
测试:t(n-1,alpha/2) 和 (gl = df)
我需要您返回以下值:
t(0.025,9) = 2,262
什么是正确的方法?
我刚刚找到了以下表格,
import scipy.stats as sts
sts.t.ppf(0.95,9) = 1.8331129
用于交替表:
最佳答案
尝试以下操作
import scipy.stats
def t(alpha, gl):
return scipy.stats.t.ppf(1-(alpha/2), gl)
您可以使用它进行测试
print(t(0.05,9))
结果将为2.262
关于python - 在 python 中计算下一个表的 T Student Test,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40294844/