<![CDATA[Math Is Fun Forum / Comparing percentile by python or numpy with the definition]]> 2016-12-03T19:00:20Z FluxBB https://www.mathisfunforum.com/viewtopic.php?id=23583 <![CDATA[Re: Comparing percentile by python or numpy with the definition]]> In regards to your previous question.

There are at least 9 different definitions of empirical quantiles.

So both numpy and Mathematica etc are correct, depending on what definition the textbook is using.

Is 100 percentile possible? I think theoretically no

I would think that 100 percentile would mean the value that 100 percent of the data would be less than. But some definitions obviously include equal to also. I have seen many cases of 100 percentile computed and urge you to look at this answer:

http://math.stackexchange.com/questions … tile#33502

whuber, is an expert on statistics and he seems to indicate 100 percentile is allowed.

]]>
https://www.mathisfunforum.com/profile.php?id=33790 2016-12-03T19:00:20Z https://www.mathisfunforum.com/viewtopic.php?pid=391175#p391175
<![CDATA[Re: Comparing percentile by python or numpy with the definition]]> bobbym wrote:

Mathematica says {3, 5.5, 7} and so does wolfram alpha. So I would say that MathsisFun is correct but there may be other ways to compute quartiles!

I'm asking a definition type question: Is 100 percentile possible? I think theoretically no, but numpy.percentile for 100%ile doesn't give an error and gives the highest entry. Satirical: it solves the purpose what user may be seeking but is theoretically incorrect.

With your answer, my clouds of confusion over percentiles are reduced, & I wrote an answer here: http://www.mathisfunforum.com/viewtopic.php?pid=391172

]]>
https://www.mathisfunforum.com/profile.php?id=213293 2016-12-03T18:48:58Z https://www.mathisfunforum.com/viewtopic.php?pid=391174#p391174
<![CDATA[Re: Comparing percentile by python or numpy with the definition]]> Hi;

Mathematica says {3, 5.5, 7} and so does wolfram alpha. So I would say that MathsisFun is correct but there may be other ways to compute quartiles!

]]>
https://www.mathisfunforum.com/profile.php?id=33790 2016-12-03T15:07:50Z https://www.mathisfunforum.com/viewtopic.php?pid=391165#p391165
<![CDATA[Comparing percentile by python or numpy with the definition]]> What do we mean by when we say percentile: percentile_of_score or score_at_percentile?
For [1, 3, 3, 4, 5, 6, 6, 7, 8, 8] written at https://www.mathsisfun.com/data/percentiles.html under "Quartiles" subtopic, the 25th, 50th, 75th percentile is written as 3, 5.5, 7, respectively.

But calculating it with python (numpy.percentile, i get the following output):
>>> from numpy import percentile
>>> data1 = [1, 3, 3, 4, 5, 6, 6, 7, 8, 8]
>>> for p in [25, 50, 75]: print(percentile(data1, p))
...
3.25
5.5
6.75

Why is there a difference? Which one is correct?
What is 25th percentile: 3 or 3.25?
What is 75th percentile: 7 or 6.75?

From mathisfun page, can I conclude the below information?
1 is the  0th percentile
3 is the 20th percentile
4 is the 30th percentile
5 is the 40th percentile
6 is the 60th percentile
7 is the 70th percentile
8 is the 90th percentile

Thanks
PS: the numpy link: https://docs.scipy.org/doc/numpy-dev/reference/generated/numpy.percentile.html & I don't know about the internal working of how it is calculated.

]]>
https://www.mathisfunforum.com/profile.php?id=213293 2016-12-03T13:28:29Z https://www.mathisfunforum.com/viewtopic.php?pid=391162#p391162