IStatistics.PercentRank

Syntax

PercentRank(Data: Array; Value: Double; Significance: Integer): Double;

Parameters

Data. Data array that determines relative position;

Value. The value for which the percentage is determined;

Significance. Optional value that determines the number of significant digits for the returned percentage value. The value must meet the constraint: Significance >= 1.

Description

The PercentRank method returns the rank of a value in a data set as the value percentage in the data set.

Comments

This function is used to estimate the relative position of a data point in a set of data.

If the specified Value does not match any of the Data argument values, the PercentRank function performs interpolation and returns the adjusted percentage 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.PercentRank(y,7,3);

Debug.WriteLine("Rank %: " + d0.ToString);

End Sub Main;

After you have executed this example the console window shows the rank of the number 7 (%) in the specified data array:

Module execution started

Rank %: 0.16600000000000001

Module execution finished

See also:

IStatistics