statsmodels.stats.oneway.equivalence_oneway_generic(f_stat, n_groups, nobs, equiv_margin, df, alpha=0.05, margin_type='f2')[source]

Equivalence test for oneway anova (Wellek and extensions)

This is an helper function when summary statistics are available. Use equivalence_oneway instead.

The null hypothesis is that the means differ by more than equiv_margin in the anova distance measure. If the Null is rejected, then the data supports that means are equivalent, i.e. within a given distance.




Number of groups in oneway comparison.


Array of number of observations in groups.


Equivalence margin in terms of effect size. Effect size can be chosen with margin_type. default is squared Cohen’s f.


degrees of freedom df = (df1, df2) where

  • df1 : numerator degrees of freedom, number of constraints

  • df2 : denominator degrees of freedom, df_resid

alphafloat in (0, 1)

Significance level for the hypothesis test.

margin_type“f2” or “wellek”

Type of effect size used for equivalence margin.

resultsinstance of HolderTuple class

The two main attributes are test statistic statistic and p-value pvalue.


Equivalence in this function is defined in terms of a squared distance measure similar to Mahalanobis distance. Alternative definitions for the oneway case are based on maximum difference between pairs of means or similar pairwise distances.

The equivalence margin is used for the noncentrality parameter in the noncentral F distribution for the test statistic. In samples with unequal variances estimated using Welch or Brown-Forsythe Anova, the f-statistic depends on the unequal variances and corrections to the test statistic. This means that the equivalence margins are not fully comparable across methods for treating unequal variances.


Wellek, Stefan. 2010. Testing Statistical Hypotheses of Equivalence and Noninferiority. 2nd ed. Boca Raton: CRC Press.

Cribbie, Robert A., Chantal A. Arpin-Cribbie, and Jamie A. Gruman. 2009. “Tests of Equivalence for One-Way Independent Groups Designs.” The Journal of Experimental Education 78 (1): 1–13.

Jan, Show-Li, and Gwowen Shieh. 2019. “On the Extended Welch Test for Assessing Equivalence of Standardized Means.” Statistics in Biopharmaceutical Research 0 (0): 1–8.