IStatistics.Small

Syntax

Small(Data: Array; Position: Integer): Double;

Parameters

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. Available values are taken from the range (0, length Data].

Description

The Small method returns the k-th least value of a data set.

Comments

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.

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.Small(y,3);
    Debug.WriteLine("Third least number: " + d0.ToString);
    d0 := st.Small(y,6);
    Debug.WriteLine("Sixth least number: " + d0.ToString);
End Sub UserProc;

Executing the example shows the results in the console window:

Unit execution started

Third least number: 9

Sixth least number: 24

Unit execution finished

See also:

IStatistics