CompareMeans.ztest_ind()

statsmodels.stats.weightstats.CompareMeans.ztest_ind

CompareMeans.ztest_ind(alternative='two-sided', usevar='pooled', value=0) [source]

z-test for the null hypothesis of identical means

Parameters:

x1, x2 : array_like, 1-D or 2-D

two independent samples, see notes for 2-D case

alternative : string

The alternative hypothesis, H1, has to be one of the following ‘two-sided’: H1: difference in means not equal to value (default) ‘larger’ : H1: difference in means larger than value ‘smaller’ : H1: difference in means smaller than value

usevar : string, ‘pooled’ or ‘unequal’

If pooled, then the standard deviation of the samples is assumed to be the same. If unequal, then the standard deviations of the samples may be different.

value : float

difference between the means under the Null hypothesis.

Returns:

tstat : float

test statisic

pvalue : float

pvalue of the z-test

© 2009–2012 Statsmodels Developers
© 2006–2008 Scipy Developers
© 2006 Jonathan E. Taylor
Licensed under the 3-clause BSD License.
http://www.statsmodels.org/stable/generated/statsmodels.stats.weightstats.CompareMeans.ztest_ind.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部