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
- nobs : int¶
the number of trials or observations, with the same length as count.
- low : float¶
equivalence interval low < prop1 - prop2 < upp
- upp : float¶
equivalence interval low < prop1 - prop2 < upp
- prop_var : str 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:¶
pvalue (float) – pvalue of the non-equivalence test
t1, pv1 (tuple of floats) – test statistic and pvalue for lower threshold test
t2, pv2 (tuple of floats) – test statistic and pvalue for upper threshold test
Notes
checked only for 1 sample case