Documentation

Mean
in package

Table of Contents

Methods

geometric()  : float|int|string
GEOMEAN.
harmonic()  : string|float|int
HARMEAN.
trim()  : float|string
TRIMMEAN.

Methods

geometric()

GEOMEAN.

public static geometric(mixed ...$args) : float|int|string

Returns the geometric mean of an array or range of positive data. For example, you can use GEOMEAN to calculate average growth rate given compound interest with variable rates.

Excel Function: GEOMEAN(value1[,value2[, ...]])

Parameters
$args : mixed

Data values

Return values
float|int|string

harmonic()

HARMEAN.

public static harmonic(mixed ...$args) : string|float|int

Returns the harmonic mean of a data set. The harmonic mean is the reciprocal of the arithmetic mean of reciprocals.

Excel Function: HARMEAN(value1[,value2[, ...]])

Parameters
$args : mixed

Data values

Return values
string|float|int

trim()

TRIMMEAN.

public static trim(mixed ...$args) : float|string

Returns the mean of the interior of a data set. TRIMMEAN calculates the mean taken by excluding a percentage of data points from the top and bottom tails of a data set.

Excel Function: TRIMEAN(value1[,value2[, ...]], $discard)

Parameters
$args : mixed

Data values

Return values
float|string

        
On this page

Search results