statsmodels.stats.weightstats._zstat_generic2

statsmodels.stats.weightstats._zstat_generic2(value, std, alternative)[source]

基于汇总统计量的通用(正常)z检验

The test statistic is :

zstat = value / std

并且假设其服从标准差为 std 的正态分布。

Parameters:
valuefloat or ndarray

样本统计量的值,例如均值。

value2float or ndarray

第二个样本的值,例如均值。

stdfloat or ndarray

样本统计值的标准误差。

alternativestr

备择假设,H1,必须是以下之一

  • ‘双侧’ : H1: value1 - value2 - diff 不等于 0。

  • ‘larger’ : H1: value1 - value2 - diff > 0

  • ‘较小’ : H1: value1 - value2 - diff < 0

Returns:
zstatfloat or ndarray

测试统计量。

pvaluefloat or ndarray

假设检验统计量服从正态分布的假设检验的P值。


Last update: Oct 16, 2024