statsmodels.stats.weightstats.ttest_ind¶

statsmodels.stats.weightstats.
ttest_ind
(x1, x2, alternative='twosided', usevar='pooled', weights=(None, None), value=0)[source]¶ ttest independent sample
Convenience function that uses the classes and throws away the intermediate results, compared to scipy stats: drops axis option, adds alternative, usevar, and weights option.
 Parameters
 x1array_like, 1D or 2D
first of the two independent samples, see notes for 2D case
 x2array_like, 1D or 2D
second of the two independent samples, see notes for 2D case
 alternative
str
The alternative hypothesis, H1, has to be one of the following
‘twosided’ (default): H1: difference in means not equal to value
‘larger’ : H1: difference in means larger than value
‘smaller’ : H1: difference in means smaller than value
 usevar
str
, ‘pooled’ or ‘unequal’ If
pooled
, then the standard deviation of the samples is assumed to be the same. Ifunequal
, then Welsh ttest with Satterthwait degrees of freedom is used weights
tuple
of
None
orndarrays
Case weights for the two samples. For details on weights see
DescrStatsW
 value
float
difference between the means under the Null hypothesis.
 Returns