Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.0.x will end 8 May 2023 (12 months).
  • Bug fixes for security issues in 4.0.x will end 13 November 2023 (18 months).
  • PHP version: minimum PHP 7.3.0 Note: the minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is also supported.

Differences Between: [Versions 400 and 401] [Versions 400 and 402] [Versions 400 and 403]

(no description)

File Size: 131 lines (4 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Mean:: (3 methods):
  geometric()
  harmonic()
  trim()


Class: Mean  - X-Ref

geometric(...$args)   X-Ref
GEOMEAN.

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[, ...]])

return: float|string
param: mixed ...$args Data values

harmonic(...$args)   X-Ref
HARMEAN.

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[, ...]])

return: float|string
param: mixed ...$args Data values

trim(...$args)   X-Ref
TRIMMEAN.

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)

return: float|string
param: mixed $args Data values