-1
$\begingroup$

Here is the link and related parts where I am confused. Especially confused what is the relationship between p and h, are they the same thing?

In effect, the methods compute Qp, the estimate for the k-th q-quantile, where p = k/q, from a sample of size N by computing a real valued index h. When h is an integer, the h-th smallest of the N values, xh, is the quantile estimate. Otherwise a rounding or interpolation scheme is used to compute the quantile estimate from h, x⌊h⌋, and x⌈h⌉. (For notation, see floor and ceiling functions).

$\endgroup$
2
$\begingroup$

$q$ refers to partitioning the set of values into $q$ subsets of (nearly) equal sizes. Check Specialized quantiles in your source.

If you look for a specific quantile $p$, you might express it as $p=k/q$, for example "second decile" where $k=2$

if $h$ is an integer, $h$ can be used as it is as an element index. As your ref says, perhaps not in the neatest way I have seen so far:

When h is an integer, the h-th smallest of the N values, $x_h$, is the quantile estimate.

you might be able to (estimate/calculate) a quantile by looking at the $h$-th indexed element in your the sorted list of (sample/real) population values.

In the most basic example that pops in my head, if you have 10 elements and you would like to calculate the 9th-decile, you could sort your 10 elements and then pick the 9th.

There's a mapping between a quantile (real -valued) and $h$. In the text, they decide to have $h$ be either an integer or a float. You might end-up having a real valued $h$. If you're looking for the 95-something-percentile ($p=0.957658$), well, then as your ref suggests, you would need to:

  • apply the floor and ceiling function to $h$
  • interpolate (in some way) the elements

I think it would have been neater to use $h$ as an integer valued index valued and have some other quantile (real-value) variable rather than have $h$ be either integer or real-valued and adjust the algo accordingly.

$\endgroup$
  • $\begingroup$ Thanks IcannotFixThis, vote up, so the statement -- a real valued index h, means h is some existing index in (possible sorted) N data values? My previous confusion is the term real valued, it makes me think real number (en.wikipedia.org/wiki/Real_number). :) $\endgroup$ – Lin Ma Aug 14 '16 at 22:03
  • 1
    $\begingroup$ ok, I see the confusion. I have adjusted the answer to tackled this. $\endgroup$ – IcannotFixThis Aug 15 '16 at 8:54
  • $\begingroup$ Thanks for the patience to update and address my answer, vote up for your update and mark your reply as answer. $\endgroup$ – Lin Ma Aug 16 '16 at 3:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.