bundles / scipy 1.17.1 / scipy / stats / _mstats_basic / ttest_ind
function
scipy.stats._mstats_basic:ttest_ind
Signature
def ttest_ind ( a , b , axis = 0 , equal_var = True , alternative = two-sided ) Summary
Calculates the T-test for the means of TWO INDEPENDENT samples of scores.
Parameters
a, b: array_likeThe arrays must have the same shape, except in the dimension corresponding to
axis(the first, by default).axis: int or None, optionalAxis along which to compute test. If None, compute over the whole arrays,
a, andb.equal_var: bool, optionalIf True, perform a standard independent 2 sample test that assumes equal population variances. If False, perform Welch's t-test, which does not assume equal population variance.
alternative: {'two-sided', 'less', 'greater'}, optionalDefines the alternative hypothesis. The following options are available (default is 'two-sided'):
'two-sided': the means of the distributions underlying the samples are unequal.
'less': the mean of the distribution underlying the first sample is less than the mean of the distribution underlying the second sample.
'greater': the mean of the distribution underlying the first sample is greater than the mean of the distribution underlying the second sample.
Returns
statistic: float or arrayThe calculated t-statistic.
pvalue: float or arrayThe p-value.
Notes
For more details on ttest_ind, see scipy.stats.ttest_ind.
Aliases
-
scipy.stats._mstats_basic.ttest_ind