XL: Algorithm Used for QUARTILE() FunctionID: Q103493
|
In Microsoft Excel, the QUARTILE() function returns a specified quartile in an array of numeric values. QUARTILE() accepts 2 arguments: Array and Quart. Array is the range of values for which you want to find the quartile value. Quart indicates the value you want to return, where:
0 Minimum value (Same as MIN())
1 1st quartile - 25th percentile
2 2nd quartile - 50th percentile (Same as MEDIAN())
3 3rd quartile - 75th percentile
4 4th quartile - 100th percentile (Same as MAX())
NOTE: In Microsoft Excel versions 5.0 and later, you can use the
Function Wizard to insert the QUARTILE() function, by clicking Function on
the Insert menu. The Function Wizard gives you information about the
function, as well as required and optional arguments.
Following is the algorithm used to calculate QUARTILE():
k=(quart/4)*(n-1))+1
If k is not an integer, truncate it but store the fractional
portion (f) for use in step 3.
quart = value between 0 and 4 depending on which quartile
you want to find.
n = number of values in the array
Output = a[k]+(f*(a[k+1]-a[k]))
a[k] = the kth smallest<BR/>
a[k+1] = the k+1th smallest
k=TRUNC((3/4*(7-1))+1)=5<BR/>
f=(3/4*(7-1))-TRUNC(3/4*(7-1))=.5
6+(.5*(8-6))=7
"Function Reference," version 4.0, pages 342-343
Additional query words: 4.00a 5.00a 5.00c 7.00a 97 98 XL98 XL97 XL7 XL5 XL4
Keywords :
Version : WINDOWS:4.0,4.0a,5.0,5.0c,7.0,97; MACINTOSH:4.0,5.0,98
Platform : MACINTOSH WINDOWS
Issue type :
Last Reviewed: July 23, 1999