Home › Forums › Main Forums › Python Forum › question about t-test function
-
question about t-test function
-
When I did t-test, the parameters affect lot, the results are different. I am not sure which one is better:
t,p_value=stats.ttest_ind(Loan[Loan['Bad']==0]['mtg_due'],
Loan[Loan['Bad']==1]['mtg_due'],
nan_policy='omit')
print("ttest_ind: t = %g p_value = %g" % (t, p_value))
#t = 4.45713 p_value = 8.40104e-06t,p_value=stats.ttest_ind(Loan[Loan['Bad']==0]['mtg_due'].isnull()==False,
Loan[Loan['Bad']==1]['mtg_due'].isnull()==False)
print("ttest_ind: t = %g p_value = %g" % (t, p_value))
#t = 1.17903 p_value = 0.238412t,p_value=stats.ttest_ind(Loan[Loan['Bad']==0]['mtg_due'],
Loan[Loan['Bad']==1]['mtg_due'],
equal_var=False, nan_policy='omit')
print("ttest_ind: t = %g p_value = %g" % (t, p_value))
#t = 4.19483 p_value = 2.82717e-05the results are so different, it causes if the H0 is rejected or not.
-
-
Log in to reply.