IStatistics.Quartile

Syntax

Quartile(Data: Array; Quart: Integer): Double;

Parameters

Data. Interval of numeric values related to probabilitites. Values of data array must be positive;

Quart. The value to be returned. Valid values lie in 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.

Description

The Quartile method returns the data set quartile.

Comments

The quartile is often used for sales analysis to split a universal set into groups.

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.Quartile(y,1);

Debug.WriteLine("First quartile: " + d0.ToString);

End Sub Main;

Executing this example shows the specified quartile in the console window:

Module execution started

First quartile: 8

Module execution finished

See also:

IStatistics