abstractqqq / polars_ds_extension

Polars extension for general data science use cases
MIT License
261 stars 17 forks source link

RFE for stats: Mann-Whitney test / non parametric tests #188

Closed lbeltrame closed 1 week ago

lbeltrame commented 1 week ago

Hello,

as the subject says, it would be nice to have something like the Mann-Whitney test or other non parametric tests (e.g. Wilcoxon) where you do not have to rely on assumptions of normality.

abstractqqq commented 1 week ago

I am working on mann-whitney. Probably I will only provide a p-value coming from the asymptotic normal estimate and won't bother with the "exact" approach which is also provided by scipy.

https://github.com/abstractqqq/polars_ds_extension/tree/mann_whitney

Mann whitney is done: https://github.com/abstractqqq/polars_ds_extension/pull/189

abstractqqq commented 1 week ago

The Wilcoxon signed-rank test is a good to have. But I think for it to be usable, we need a method to compute its p value. Given that it is not so obvious and requires a lot more machinery, I have decided to put that one off for later... Thank you for the feature request btw.