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 (integer or 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 (integer) – the number of trials or observations, with the same length as count.
  • upp (low,) – equivalence interval low < prop1 - prop2 < upp
  • prop_var (string 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

© 2009–2012 Statsmodels Developers
© 2006–2008 Scipy Developers
© 2006 Jonathan E. Taylor
Licensed under the 3-clause BSD License.
http://www.statsmodels.org/stable/generated/statsmodels.stats.proportion.proportions_ztost.html