statsmodels.stats.proportion.proportions_ztost

statsmodels.stats.proportion.proportions_ztost(count, nobs, low, upp, prop_var='sample')[source]

Equivalence test based on normal distribution

Parameters
count{int, array_like}

the number of successes in nobs trials. If this is array_like, then the assumption is that this represents the number of successes for each independent sample

nobsint

the number of trials or observations, with the same length as count.

low, uppfloat

equivalence interval low < prop1 - prop2 < upp

prop_varstr or float in (0, 1)

prop_var determines which proportion is used for the calculation of the standard deviation of the proportion estimate The available options for string are ‘sample’ (default), ‘null’ and ‘limits’. If prop_var is a float, then it is used directly.

Returns
pvaluefloat

pvalue of the non-equivalence test

t1, pv1tuple of floats

test statistic and pvalue for lower threshold test

t2, pv2tuple of floats

test statistic and pvalue for upper threshold test

Notes

checked only for 1 sample case