Small(Data: Array; Position: Integer): Double;
Data. Data array for which the k-th least value is determined;
Position. Position (starting from the minimum) in an array or range of data cells. Use the values from the range (0; the Data length].
The Small method returns the k-th least value of a data set.
This function is used to calculate a value which holds some relative position in a data set.
If n is the number of data points in Data, Small(Data; 1) equals to the least value and Small(Data; n) equals to the maximum 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.Small(y,3);
Debug.WriteLine("Third least number: " + d0.ToString);
d0 := st.Small(y,6);
Debug.WriteLine("Sixth least number: " + d0.ToString);
End Sub Main;
Executing this example shows the results in the console window:
Module execution started
Third least number: 9
Sixth least number: 24
Module execution finished
See also: