Percentile(Data: Array; Percent: Double): Double;
Data. Data array that determines relative position;
Percent. Percentile value. Valid values lie in the range: [0; 1].
The Percentile method returns the k-th percentile for interval values.
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.
Sub Main;
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("30th percentile: " + d0.ToString);
End Sub Main;
Executing the example displays the 30-th percentile for the specified data array:
Module execution started
30-th percentile: 8.5999999999999996
Module execution finished
See also: