ENH: `stats`: `equal_var` option for `tukey_hsd`; `method='winsor'` for `quantile`

Hi Team,

I’ve been working on two PRs recently that would add new features:

gh-22185 proposes the addition of an equal_var option to scipy.stats.tukey_hsd. When equal_var=True (default), the test assumes the variances of the populations underlying the samples are equal; this is the Tukey HSD or Tukey-Kramer test, depending on whether the groups have the same or different numbers of observations. When equal_var=False, the test does not make this assumption, and the standard error and degrees of freedom are adjusted accordingly; this is the Games-Howell test. In this context, equal_var is analogous to the existing equal_var parameter of ttest_ind.

gh-22644 proposes the addition of a method='winsor' (and possibly variations like method='winsor-round' or method=('winsor', np.round)) to the new scipy.stats.quantile. This notion of a quantile is particularly useful when winsorizing or trimming data. To replicate all the existing behavior of scipy.stats.mstats.mquantiles, we are also considering a “Blom” method that would allow the user to specify alpha/beta parameters as originally proposed by Gunnar Blom in “Statistical Estimates and Transformed Beta Variables” (1958).

Please join the discussions in the linked PRs!
Thanks!
Matt

(I think you might have meant gh-22185)

1 Like