📜  两种方法的T-Test比较python代码示例

📅  最后修改于: 2022-03-11 14:45:30.812000             🧑  作者: Mango

代码示例1
from scipy import stats
ttest = stats.ttest_ind(mean_a, mean_b, equal_var = False)
p_value = ttest[1]
print('p_value: {:0.3f}'.format(p_value))

# H0: mean_a - mean_b = 0
# HA:  mean_a - mean_b != 0
# For one tail t-test divide the p-value by 2
# For p-value <= 0.05: Reject H0