The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....


Class:TVector, TIntVector
Declaration:function Percentile (prob: double; LowElem, HighElem: integer): double;

The function Percentile returns the percentile with the probability of prob percent. The calculation of the percentile is based on the distribution of all vector elements between (and including) LowElem, and HighElem. The function returns a zero value if any error occurs.

Please note that the 50%-percentile (prob = 50) is also known as the median of the distribution.

Example: This method is used in the following example program (see for downloading the code): percentile

Last Update: 2016-Aug-15