python - 在 python 中计算下一个表的 T Student Test

标签 python scipy statistics

我需要使用 (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

用于交替表:

http://image.slidesharecdn.com/tablat-student-120318105418-phpapp02/95/tabla-t-student-1-728.jpg?cb=1332086091

最佳答案

尝试以下操作

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/

相关文章:

python - ndimage 的 center_of_mass 用于计算高斯峰的位置

C++ 计算排序数组的模式

python - 检查 python 列表中的日期时间并转换为字符串

python - 如何在 Python 中检查列表(或数组)上的条件,然后根据该条件对元素进行排序

python - 操作数据框以创建数据透视表

python - django allauth登录测试无法正确登录

python - SciPy/NumPy : Normalize a csr_matrix

python - Librosa 的 fft 和 Scipy 的 fft 有什么不同?

apache - 比较 Matlab 和 Apache 统计数据 - 峰度

math - 查找偏差/元素列表的标准偏差