[Python-ideas] Adding quantile to the statistics module

Tim Peters tim.peters at gmail.com
Sat Mar 17 12:28:49 EDT 2018


[Guido]
> Since Python is not held to backwards compatibility with S, and for most
> datasets (and users) it doesn't matter much, why not ho with the default
> recommended by Hyndman & Fan?

Here's Hyndman in 2016[1]:

"""
The main point of our paper was that statistical software should
standardize the definition of a sample quantile for consistency. We
listed 9 different methods that we found in various software packages,
and argued for one of them (type 8). In that sense, the paper was a
complete failure. No major software uses type 8 by default, and the
diversity of definitions continues 20 years later. In fact, the paper
may have had the opposite effect to what was intended. We drew
attention to the many approaches to computing sample quantiles and
several software products added them all as options. Our own quantile
function for R allows all 9 to be computed, and has type 7 as default
(for backwards consistency – the price we had to pay to get R core to
agree to include our function).
"""

Familiar & hilarious ;-)

[1] https://robjhyndman.com/hyndsight/sample-quantiles-20-years-later/


More information about the Python-ideas mailing list