mars.tensor.stats.ttest_ind_from_stats#
- mars.tensor.stats.ttest_ind_from_stats(mean1, std1, nobs1, mean2, std2, nobs2, equal_var=True, alternative='two-sided')[source]#
T-test for means of two independent samples from descriptive statistics.
This is a two-sided test for the null hypothesis that two independent samples have identical average (expected) values.
- Parameters
mean1 (array_like) – The mean(s) of sample 1.
std1 (array_like) – The standard deviation(s) of sample 1.
nobs1 (array_like) – The number(s) of observations of sample 1.
mean2 (array_like) – The mean(s) of sample 2.
std2 (array_like) – The standard deviations(s) of sample 2.
nobs2 (array_like) – The number(s) of observations of sample 2.
equal_var (bool, optional) – If True (default), perform a standard independent 2 sample test that assumes equal population variances 1. If False, perform Welch’s t-test, which does not assume equal population variance 2.
alternative ({'two-sided', 'less', 'greater'}, optional) –
Defines the alternative hypothesis. The following options are available (default is ‘two-sided’):
’two-sided’
’less’: one-sided
’greater’: one-sided
- Returns
statistic (float or array) – The calculated t-statistics.
pvalue (float or array) – The two-tailed p-value.
See also
Notes
References