📅  最后修改于: 2022-03-11 14:45:30.812000             🧑  作者: Mango
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