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. Use the values from the range (0; the Data length].

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

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:

IStatistics