statsmodels.stats.power.GofChisquarePower.power

GofChisquarePower.power(effect_size, nobs, alpha, n_bins, ddof=0)[source]

计算单样本卡方检验的效力

仅实现了双侧备择假设

Parameters:
effect_sizefloat

标准化效应量,根据Cohen的定义。 参见 statsmodels.stats.gof.chisquare_effectsize

nobsint or float

样本大小,观察次数。

alphafloat in interval (0,1)

显著性水平,例如0.05,是第一类错误的概率,即当原假设为真时错误拒绝的概率。

n_binsint

分布中的箱数或单元数。

Returns:
powerfloat

检验的功效,例如0.8,是1减去II类错误概率。功效是当备择假设为真时,检验正确拒绝原假设的概率。


Last update: Oct 16, 2024