The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » sci.math.* » sci.math

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: How to calculate quantiles
Replies: 4   Last Post: Jan 4, 2013 9:29 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
James Waldby

Posts: 545
Registered: 1/27/11
Re: How to calculate quantiles
Posted: Jan 3, 2013 3:01 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

On Thu, 03 Jan 2013 13:25:45 +0100, Cristiano wrote:
> On 03/01/2013 4:54, William Elliot wrote:
>> On Wed, 2 Jan 2013, Cristiano wrote:

>>> I have 10^4 to 10^7 random real numbers (distribution unknown, but far away
>>> from normal and uniform).
>>> I need to calculate the very low and very high order quantiles (say 10^-7 and
>>> 0.9999999) of those numbers.
>>> Which method should I use?

>> Generate a number between .9999999 and 10^-7 and divide by 10^-7.

> Not sure I understand.
> Suppose I generate .123 / 10^-7 = 1.23*10^6 and then?

>> For above .9999999, generate a number below 10^-7 and subtract
>> that from 1.

I think William Elliot either missed the point, or is being purposefully
obtuse to suggest that the phrasing of your question is not correct and
complete in every jot and tittle.

Regarding computing those quantiles, I presume the question is which of
the possible interpolation methods to use. Referring to the table at
ten methods are shown. When q > N, every one of those methods uses x_1
as the first q-quantile, and x_N as the last. (q = total number of
quantiles and N = sample size.)

So, in linear time, just find the min and max values in your sample, and
report them as the two desired q-quantiles. To do better than that, you
need to make assumptions about the distribution.


Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.