Loading [MathJax]/extensions/tex2jax.js
scipy 1.10.1 Pypi GitHub Homepage
Other Docs

NotesParametersReturns
ttest_ind(a, b, axis=0, equal_var=True, alternative='two-sided')

Notes

For more details on ttest_ind, see scipy.stats.ttest_ind.

Parameters

a, b : array_like

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

axis : int or None, optional

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

equal_var : bool, 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.

alternative : {'two-sided', 'less', 'greater'}, optional

Defines 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 array

The calculated t-statistic.

pvalue : float or array

The p-value.

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

Examples

See :

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

scipy.stats._stats_py:ttest_ind_stats_py:ttest_ind

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


GitHub : /scipy/stats/_mstats_basic.py#1379
type: <class 'function'>
Commit: