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

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.PercentRank(y,7,3);
    Debug.WriteLine("Rank in %: " + d0.ToString);
End Sub UserProc;

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

Unit execution started

Rank in %: 0.166

Unit execution finished

See also:

IStatistics