Calculates the geometric mean of the given data.

Namespace:  CenterSpace.NMath.Stats
Assembly:  NMathStats (in NMathStats.dll) Version: 3.4.0.0

Syntax

C#
public static double GeometricMean(
	int[] data
)
Visual Basic (Declaration)
Public Shared Function GeometricMean ( _
	data As Integer() _
) As Double
Visual C++
public:
static double GeometricMean(
	array<int>^ data
)

Parameters

data
Type: array< System..::.Int32 >[]()[]
An array of integers.

Return Value

Geometric mean.

Remarks

geometric mean = (data[0] * data[1] * ...) ^ (1/n)

Exceptions

ExceptionCondition
CenterSpace.NMath.Core..::.InvalidArgumentException Thrown if data has a length of zero.

See Also