我试图用下面的代码对两个不相等的样本进行T检验
import pandas as pd
import numpy as np
from scipy import stats
UG = pd.read_csv('Mostfrequentscores.csv')
print('Mean', UG['Iceland'].mean())
print('Mean', UG['Peru'].mean())
I = UG['Iceland']
P = UG['Peru']
t = stats.ttest_ind(I, P, equal_var = False)
平均值打印得很好,我假设这意味着它读取文件中的列-但是T测试不断给我以下错误:
C:\Users\msu\Anaconda3\lib\site-packages\scipy\stats_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
这可能是因为我的数据是从-3到3的一系列数字吗?我需要用float转换它吗
目前没有回答
相关问题 更多 >
编程相关推荐