Sun Nov 16 23:53:29 CST 2008
On Sun, Nov 16, 2008 at 10:56 PM, Robert Kern <email@example.com> wrote:
> Wikipedia says to use half of the frequency of the ties (x==score) in
> addition to the cumulative frequency of strict x<score.
The 0.5 weight looks pretty arbitrary to me
percentilescore_wikip([1,2,3,4,4,4,5,6,7,8]) = 3 + 0.5*3 = 4.5
I guess the question is, whether this a commonly accepted convention,
or maybe, which and whose convention should scipy follow.
The proposed patch is pretty easy to adjust to any convention.
Maybe percentileofscore should get a weight parameter for ties:
0 for strict inequality, 1 for weak inequality,
0.5 (default?) for wikipedia and -1 for mean.
The inverse functions, scoreatpercentile and mquantiles in stats.mstats,
give a whole range of weighting schemes, but it takes too long now
for me to figure out what that actually does.
More information about the Scipy-dev