Quartile(Data: Array; Quart: Integer): Double;
Data. Interval of numeric values related to probabilitites. Values of data array must be positive;
Quart. The value to be returned. Available values are taken from the range [0, 4].
| If Quart equals to | Quartile returns |
| 0 | Minimum value. |
| 1 | First quartile (25-th percentile). |
| 2 | Median value (50-th percentile). |
| 3 | Third quartile (75th percentile). |
| 4 | Maximum value. |
The Quartile method returns the data set quartile.
The quartile is often used for sales analysis to split a universal set into groups.
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.Quartile(y,1);
Debug.WriteLine("First quartile: " + d0.ToString);
End Sub UserProc;
Executing the example shows the specified quartile in the console window:
Unit execution started
First quartile: 8
Unit execution finished
See also: