IStatistics.QuartileDcml

Syntax

QuartileDcml(Data: Array; Quart: Integer): Decimal;

Parameters

Data. Interval of numeric values related to probabilitites. Values in data array must be greater than zero.

Quart. The value to be returned. Valid values lie in the range [0; 4].

Description

The QuartileDcml method returns quartile of data set of the Decimal type.

Quart value Value returned by QuartileDcml
0 Minimum value.
1 First quartile (25-th percentile).
2 Median value (50-th percentile).
3 Third quartile (75th percentile).
4 Maximum value.

Comments

Quartile is often used on analysis of sales to divide general set into groups.

To define numbers of the Decimal type in the array, it is necessary to write the "m" character after the value of each number. For example: 0.001m.

Example

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

Sub UserProc;
Var
    st: Statistics;
    a: Array[5Of Variant;
    s: Decimal;
Begin
    st := New Statistics.Create;
    a[0] := 0.85m;
    a[1] := 0.14m;
    a[2] := 0.53m;
    a[3] := 0.28m;
    a[4] := 0.31m;
    s:=st.QuartileDcml(a, 1);
    Debug.WriteLine("First quartile: " + s.ToString);
End Sub UserProc;

After executing the example the console window displays the first quartile.

See also:

IStatistics