[Python-ideas] Adding quantile to the statistics module

Tim Peters tim.peters at gmail.com
Sat Mar 17 23:07:19 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?

BTW, I should clarify that I agree!  H&F didn't invent "method 8", or
any of the other methods their paper named, they just evaluated 9
methods with a keen eye.  Their case for method 8 being "the best"
seems pretty clear:  it satisfies as least as many desirable formal
properties as the other serious candidates, and is apparently optimal
in some technical senses (related to avoiding bias) among methods that
can't assume anything about the underlying distribution.

For the median, looks like method 8 reduces to the usual "return the
mean of the two middle values" for an even number of data points,
which is the only "intuition" anyone brings to this ;-)

So I'd make it the default, and add others later as options if there's
enough screaming.  It's the Right(est) Thing to Do.


More information about the Python-ideas mailing list