scipy.stats.mstats.ttest_ind

scipy.stats.mstats.ttest_ind(a, b, axis=0, equal_var=True)[source]

Calculates the T-test for the means of TWO INDEPENDENT samples of scores.

Parameters
a, barray_like

The arrays must have the same shape, except in the dimension corresponding to axis (the first, by default).

axisint or None, optional

Axis along which to compute test. If None, compute over the whole arrays, a, and b.

equal_varbool, optional

If 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.

New in version 0.17.0.

Returns
statisticfloat or array

The calculated t-statistic.

pvaluefloat or array

The two-tailed p-value.

Notes

For more details on ttest_ind, see stats.ttest_ind.