While playing around with TMath::Quantiles function, we’ve noticed that some of the available computation methods give strange results.
The Quantiles function should be monotonically crescent, which is not the case for methods 4, 5, 6, 8 and 9. Looks like a bad conversion between first and last ranks and array indices.
In addition, method 3 does not seem to behave similarly in ROOT and in R (cf. R figure)
(performed using ROOT 5.18 and 5.20 on Linux)
ROOTquantiles.C (650 Bytes)