XL: PERCENTILE Function Returns Incorrect ResultsID: Q99963
|
The PERCENTILE() function, new to Microsoft Excel version 4.0, returns a value within a range at the percentile you specify. The following examples show the formula used to calculate PERCENTILE() and describe a scenario in which PERCENTILE() may not return the correct result.
PERCENTILE() takes two arguments, array and k. The array is a range of n
numbers, A1,...,An. The smallest value in the array corresponds to the 0th
percentile and the highest value corresponds to the 100th percentile with
values in between at the i/(n-1)th percentile. k is the percentile for
which you want to find the corresponding value. i is the subscript denoting
the i-th element of the array.
To calculate the value for any given percentile (k) where 0<=k<=1:
If (i-1)/(n-1)<k<i/(n-1), return:
(k-(i-1)/(n-1))*(A(i)+1-A(i))
A(i)+ -------------------------
1/(n-1)
If k=(i-1)/(n-1), return A(i)
k<1/(n-1)For every instance where this condition is true, the value returned for the k-th percentile may be erroneous. When k>=1/(n-1), the results will be correct.
Microsoft has confirmed this to be a problem in the Microsoft products
listed at the beginning of this article.
A1: 1 B1: 0
A2: 1 B2: .1
A3: 1 B3: .2
A4: 2 B4: .3
A5: 4 B5: .4
A6: B6: .5
A7: B7: .6
A8: B8: .7
A9: B9: .8
A10: B10: .9
A11: B11: 1
"Function Reference," page 325
Additional query words: percentrank
Keywords : kbdta xlformula
Version : WINDOWS:4.0,4.0a,5.0,5.0c; MACINTOSH:4.0,5.0
Platform : MACINTOSH WINDOWS
Issue type : kbprb
Last Reviewed: April 6, 1999