statsmodels.stats.weightstats.ztost#

statsmodels.stats.weightstats.ztost(x1, low, upp, x2=None, usevar='pooled', ddof=1.0)[source]#

Equivalence test based on normal distribution

Parameters:
x1array_like

one sample or first sample for 2 independent samples

low, uppfloat

equivalence interval low < m1 - m2 < upp

x2array_like or None, optional

second sample for 2 independent samples test. If None, then a one-sample test is performed.

usevar{“pooled”, “unequal”}, optional

If pooled, then the standard deviation of the samples is assumed to be the same. If unequal, then the standard deviation of the sample is assumed to be different.

ddofint or float, optional

Degrees of freedom used in the calculation of the variance of the mean estimate. In the case of comparing means this is one, however it can be adjusted for testing other statistics (proportion, correlation).

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