[R] Diff btw percentile and quantile

Wacek Kusnierczyk Waclaw.Marcin.Kusnierczyk at idi.ntnu.no
Wed Mar 4 17:56:14 CET 2009


(Ted Harding) wrote:

<snip>

> So, with reference to your original question
>  "Excel has percentile() function. R function quantile() does the
>   same thing. Is there any significant difference btw percentile
>   and quantile?"
> the answer is that they in effect give the same results, though
> differ with respect to how they are to be fed (quantile eats
> probabilities, percentile eats percentages). [Though (since I am
> not familiar with Excel) I cannot rule out that Excel's percentile()
> function also eats probabilities; in which case its name would be
> an example of sloppy nomenclature on Excel's part; which I cannot
> rule out on general grounds either].
>   

i am not familiar enough with excel to prove or disprove what you say
above, but in general such claims should be grounded in the respective
documentations. 

there are a number of ways to compute empirical quantiles (see, e.g.,
[1]), and it's possible that the one used by r's quantile by default
(see ?quantile) is not the one used by excel (where you probably have no
choice;  help in oocalc does not specify the method, and i guess that
excel's does not either).

have you actually confirmed that excel's percentile() does the same as
r's quantile() (modulo the scaling)?

vQ

[1] http://www.jstor.org/stable/2684934




More information about the R-help mailing list