IStatistics.Percentile

Syntax

Percentile(Data: Array; Percent: Double): Double;

Parameters

Data. Data array that determines relative position;

Percent. Percentile value. Available values are taken from the range [0, 1].

Description

The Percentile method returns the k-th percentile for interval values.

Comments

Use this function to determine an acceptability threshold.

If k is not divisible by 1/(n - 1), the Percentile function performs interpolation to calculate the k-th percentile value.

Example

To execute the example, add a link to the Stat system assembly.

Sub UserProc;
Var
    st: Statistics;
    d0: Double;
    y: Array Of Double;
Begin
    y := New Double[7];
    y[00] := 6;
    y[01] := 7;
    y[02] := 9;
    y[03] := 15;
    y[04] := 21;
    y[05] := 24;
    y[06] := 25;
    st := New Statistics.Create;
    d0 := st.Percentile(y,0.3);
    Debug.WriteLine("30-th percentile: " + d0.ToString);
End Sub UserProc;

Executing the example displays the 30-th percentile for the specified data array:

Unit execution started

30-th percentile: 8.6

Unit execution finished

See also:

IStatistics