IStatistics.GeoMean

Syntax

GeoMean(Values: Array): Double;

Parameters

Values. Array of data, mean of which you calculate. Array values must be greater than zero.

Description

The GeoMean method returns the geometrical mean of positive number array values.

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[10];

y[00] := 1.6;

y[01] := 1.7;

y[02] := 1.8;

y[03] := 1.9;

y[04] := 2;

y[05] := 2.1;

y[06] := 2.2;

y[07] := 2.3;

y[08] := 2.4;

y[09] := 2.8;

st := New Statistics.Create;

d0 := st.GeoMean(y);

Debug.WriteLine("Geometric mean: " + d0.ToString);

End Sub UserProc;

After executing the example the mean value is output to the console window:

Module execution started

Geometric mean: 2.0527516459856363

Module execution finished

See also:

IStatistics | Geometric mean