From de9dc3a43f119fb1176f850ce52bdab87be58cfe Mon Sep 17 00:00:00 2001 From: nikitamikhaylov Date: Thu, 19 Nov 2020 16:06:34 +0300 Subject: [PATCH] update copy pasted test --- .../0_stateless/01558_ttest_scipy.python | 24 ++++++++++++------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/tests/queries/0_stateless/01558_ttest_scipy.python b/tests/queries/0_stateless/01558_ttest_scipy.python index 727ca08c080..5cccfa9e0ce 100644 --- a/tests/queries/0_stateless/01558_ttest_scipy.python +++ b/tests/queries/0_stateless/01558_ttest_scipy.python @@ -38,28 +38,36 @@ def test_student(): s, p = stats.ttest_ind(rvs1, rvs2, equal_var = True) test_and_check("studentTTest", rvs1, rvs2, s, p) - rvs1 = np.round(stats.norm.rvs(loc=0, scale=10,size=65536), 5) rvs2 = np.round(stats.norm.rvs(loc=5, scale=1,size=65536), 5) s, p = stats.ttest_ind(rvs1, rvs2, equal_var = True) test_and_check("studentTTest", rvs1, rvs2, s, p) + rvs1 = np.round(stats.norm.rvs(loc=0, scale=1,size=65536), 5) + rvs2 = np.round(stats.norm.rvs(loc=0, scale=1,size=65536), 5) + s, p = stats.ttest_ind(rvs1, rvs2, equal_var = True) + test_and_check("studentTTest", rvs1, rvs2, s, p) + def test_welch(): rvs1 = np.round(stats.norm.rvs(loc=1, scale=15,size=500), 5) rvs2 = np.round(stats.norm.rvs(loc=10, scale=5,size=500), 5) - s, p = stats.ttest_ind(rvs1, rvs2, equal_var = True) - test_and_check("studentTTest", rvs1, rvs2, s, p) + s, p = stats.ttest_ind(rvs1, rvs2, equal_var = False) + test_and_check("welchTTest", rvs1, rvs2, s, p) rvs1 = np.round(stats.norm.rvs(loc=0, scale=7,size=500), 5) rvs2 = np.round(stats.norm.rvs(loc=0, scale=3,size=500), 5) - s, p = stats.ttest_ind(rvs1, rvs2, equal_var = True) - test_and_check("studentTTest", rvs1, rvs2, s, p) - + s, p = stats.ttest_ind(rvs1, rvs2, equal_var = False) + test_and_check("welchTTest", rvs1, rvs2, s, p) rvs1 = np.round(stats.norm.rvs(loc=0, scale=10,size=65536), 5) rvs2 = np.round(stats.norm.rvs(loc=5, scale=1,size=65536), 5) - s, p = stats.ttest_ind(rvs1, rvs2, equal_var = True) - test_and_check("studentTTest", rvs1, rvs2, s, p) + s, p = stats.ttest_ind(rvs1, rvs2, equal_var = False) + test_and_check("welchTTest", rvs1, rvs2, s, p) + + rvs1 = np.round(stats.norm.rvs(loc=0, scale=1,size=65536), 5) + rvs2 = np.round(stats.norm.rvs(loc=0, scale=1,size=65536), 5) + s, p = stats.ttest_ind(rvs1, rvs2, equal_var = False) + test_and_check("welchTTest", rvs1, rvs2, s, p) if __name__ == "__main__": test_student()