statsmodels.stats.weightstats._tstat_generic¶
- statsmodels.stats.weightstats._tstat_generic(value1, value2, std_diff, dof, alternative, diff=0)[source]¶
generic ttest based on summary statistic
- The test statistic is :
tstat = (value1 - value2 - diff) / std_diff
and is assumed to be t-distributed with
dofdegrees of freedom.- Parameters:¶
- value1
floatorndarray Value, for example mean, of the first sample.
- value2
floatorndarray Value, for example mean, of the second sample.
- std_diff
floatorndarray Standard error of the difference value1 - value2
- dof
intorfloat Degrees of freedom
- alternative
str The alternative hypothesis, H1, has to be one of the following
‘two-sided’ : H1:
value1 - value2 - diffnot equal to 0.‘larger’ : H1:
value1 - value2 - diff > 0‘smaller’ : H1:
value1 - value2 - diff < 0
- diff
float value of difference
value1 - value2under the null hypothesis
- value1
- Returns:¶
Last update:
Jun 10, 2024