[SciPy-dev] percentileofscore in svn
josef.pktd@gmai...
josef.pktd@gmai...
Sat Nov 22 02:01:35 CST 2008
To ariel.rokem (I don't know your email address)
You beat me in correcting percentileofscore,
however, your version still has a bias for multiple ties.
>>> percentileofscorein([1,1,1,1],1) # yours
62.5
>>> percentileofscore([1,1,1,1],1) # wikipedia
50.0
>>> percentileofscore([1,1,1,1,1,2,2,2,2,2],1) # wikipedia
25.0
>>> percentileofscorein([1,1,1,1,1,2,2,2,2,2],1) # yours
30.0
>>> percentileofscorein([1,1,1],1) # yours
66.666666666666657
>>> percentileofscore([1,1,1],1) # wikipedia
50.0
>>> percentileofscorein([1,1,1,1,1,2,2,2,2,2],2) # yours
80.0
>>> percentileofscore([1,1,1,1,1,2,2,2,2,2],2) # wikipedia
75.0
Since we were discussing definitions, do you have a definition of your method?
I'm not too convinced of the wikipedia version, but it looks like a consistent
definition
I renamed my version temporarily to percentileofscore2
Josef
More information about the Scipy-dev
mailing list