def ttest_ind_from_stats(mean1, std1, nobs1, mean2, std2, nobs2, equal_var=True):
 if equal_var:
  (df, denom) = _equal_var_ttest_denom((std1 ** 2), nobs1, (std2 ** 2), nobs2)
 else:
  (df, denom) = _unequal_var_ttest_denom((std1 ** 2), nobs1, (std2 ** 2), nobs2)
 res = _ttest_ind_from_stats(mean1, mean2, denom, df)
 return Ttest_indResult(*res)

def ttest_ind_from_stats ( mean1 , std1 , nobs1 , mean2 , std2 , nobs2 , equal_var = True ) : if equal_var : ( df , denom ) = _equal_var_ttest_denom ( ( std1 ** 2 ) , nobs1 , ( std2 ** 2 ) , nobs2 ) else : ( df , denom ) = _unequal_var_ttest_denom ( ( std1 ** 2 ) , nobs1 , ( std2 ** 2 ) , nobs2 ) res = _ttest_ind_from_stats ( mean1 , mean2 , denom , df ) return Ttest_indResult ( * res )
t-test for means of two independent samples from descriptive statistics .