首页 > 解决方案 > 使用 Statsmodels ztest

问题描述

我正在尝试计算单面 z 测试,并且我正在使用:

from statsmodels.stats.weightstats import ztest

例如,如果我有一些分布,我想比较单个样本以确定它们是否有显着差异,我正在做这样的事情:

x=[1,2,3,4,5]
y=6

ztest(x,value=6)

这个对吗?我对这里In the two sample case, the value is the difference between the mean of x1 and mean of x2 under the Null hypothesis.显示的文档感到困惑。

标签: pythonstatisticsstatsmodels

解决方案


推荐阅读