DolphinDB: the difference between percentile and quantile?

The functionality of percentile and quantile described in the DolphinDB user manual is similar. The main difference lies in the format of the input parameters, for example, percentile(a, 25) and quantile(a, 0.25). Am I right in understanding this?


  • Yes. The percentile function takes a percentage value (i.e., 25) as input, while quantile takes a floating number (i.e., 0.25) as input.

    Despite the only difference, the two functions return the same result. For example:

    a=[6, 47, 49, 15, 42, 41, 7, 39, 43, 40, 36];
    percentile(a, 50) //output: 40
    quantile(a, 0.50)//output: 40