Quantiles of a data set (inverse of cumulative distribution function)
x = CL_quantile(X,p)
Evaluates quantiles of a data set.
Let F be the empirical cumulative distribution function associated with the data set X. The quantity (x) that is computed is such that:
F(x) = p (p: probability in [0,1]).
The method used to calculate sample quantiles is the same as in R-project (method number 5):
For a data set containing N elements, quantiles are computed as follows:
1) The sorted values in X are considered as the (0.5/N), (1.5/N), ..., ((N-0.5)/N) quantiles.
2) Linear interpolation is used to compute quantiles for probabilities between (0.5/N) and ((N-0.5)/N)
3) The minimum or maximum values in X are assigned to quantiles for probabilities outside that range.
Note: This method is used in Matlab's quantile function as well.
Data set (1xN)
Probabilities (1xP)
Quantiles (1xP)
CNES - DCT/SB
1) R: A Language and Environment for Statistical Computing; http://cran.r-project.org/doc/manuals/fullrefman.pdf.