0
如何在Python中的if else語句中實現統計測試?我正在使用scipy統計。我想要實現的一小部分代碼是:使用scipy統計信息,我如何在我的if else語句中實現統計測試?
def choose():
global sample
if q1.get() == 1 and q2.get() == 1 and q3.get() == 2 and q4.get() == 2 and q5.get() == 1 and q6.get() == 2 and q7.get() == 2 and q8.get() == 2 and q9.get() == 2 :
tkMessageBox.showinfo('decision', 'You should use the t-test!')
stats.ttest_1samp()
#will do t-test here
print sample
# now sample list contains the data for doing t-test,
#you just need to call t-test to get the results and show it on message box