3.11.9.2.3. statsmodels.stats.gof.chisquare_power

statsmodels.stats.gof.chisquare_power(effect_size, nobs, n_bins, alpha=0.05, ddof=0)[source]

power of chisquare goodness of fit test

effect size is sqrt of chisquare statistic divided by nobs

Parameters:

effect_size : float

This is the deviation from the Null of the normalized chi_square statistic. This follows Cohen’s definition (sqrt).

nobs : int or float

number of observations

n_bins : int (or float)

number of bins, or points in the discrete distribution

alpha : float in (0,1)

significance level of the test, default alpha=0.05

Returns:

power : float

power of the test at given significance level at effect size

See also

chisquare_effectsize, statsmodels.stats.GofChisquarePower

Notes

This function also works vectorized if all arguments broadcast.

This can also be used to calculate the power for power divergence test. However, for the range of more extreme values of the power divergence parameter, this power is not a very good approximation for samples of small to medium size (Drost et al. 1989)

References

Drost, ...