stats.weightstats.zconfint()

statsmodels.stats.weightstats.zconfint

statsmodels.stats.weightstats.zconfint(x1, x2=None, value=0, alpha=0.05, alternative='two-sided', usevar='pooled', ddof=1.0) [source]

confidence interval based on normal distribution z-test

Parameters:

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

two independent samples, see notes for 2-D case

value : float

In the one sample case, value is the mean of x1 under the Null hypothesis. In the two sample case, value is the difference between mean of x1 and mean of x2 under the Null hypothesis. The test statistic is x1_mean - x2_mean - value.

usevar : string, ‘pooled’

Currently, only ‘pooled’ is implemented. If pooled, then the standard deviation of the samples is assumed to be the same. see CompareMeans.ztest_ind for different options.

ddof : int

Degrees of freedom use in the calculation of the variance of the mean estimate. In the case of comparing means this is one, however it can be adjusted for testing other statistics (proportion, correlation)

See also

ztest, CompareMeans

Notes

checked only for 1 sample case

usevar not implemented, is always pooled in two sample case

value shifts the confidence interval so it is centered at x1_mean - x2_mean - value

© 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.zconfint.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部