ttest_ind¶
- numeric.stats.ttest_ind(a, b)¶
- Calculates the T-test for the means of TWO INDEPENDENT samples of scores. - This is a two-sided test for the null hypothesis that 2 independent samples have identical average (expected) values. This test assumes that the populations have identical variances. - Parameters
- a – (array_like) Sample data a. 
- b – (array_like) Sample data b. 
 
- Returns
- t-statistic and p-value 
 - Examples: - from mipylib.numeric import stats random.seed(1) # Create sample data. a = random.randn(40) b = 4 * random.randn(50) r = stats.ttest_ind(a, b) print r - Result: - >>> run script... (1.4947945927091304, 0.14061883167278577) 

