Method |
Description |
|
agm ( number $x, number $y ) : float |
Convenience method for arithmeticGeometricMean |
|
arithmeticGeometricMean ( number $x, number $y ) : float |
Arithmetic-Geometric mean |
|
contraharmonicMean ( array $numbers ) : number |
Contraharmonic mean
A function complementary to the harmonic mean. |
|
cubicMean ( array $numbers ) : number |
Cubic mean
https://en.wikipedia.org/wiki/Cubic_mean
_________
1 n
x cubic = ³/ - ∑ xᵢ³
√ n ⁱ⁼¹ |
|
cumulativeMovingAverage ( array $numbers ) : array |
Cumulative moving average (CMA) |
|
describe ( array $numbers ) : array |
Get a report of all the averages over a list of numbers
Includes mean, median mode, geometric mean, harmonic mean, quardratic mean |
|
exponentialMovingAverage ( array $numbers, integer $n ) : array |
Exponential moving average (EMA) |
|
generalizedMean ( array $numbers, number $p ) : number |
Generalized mean (power mean, Hölder mean)
https://en.wikipedia.org/wiki/Generalized_mean |
|
geometricMean ( array $numbers ) : number |
Geometric mean
A type of mean which indicates the central tendency or typical value of a set of numbers
by using the product of their values (as opposed to the arithmetic mean which uses their sum). |
|
harmonicMean ( array $numbers ) : number |
Harmonic mean (subcontrary mean)
The harmonic mean can be expressed as the reciprocal of the arithmetic mean of the reciprocals. |
|
heronianMean ( number $A, number $B ) : number |
Heronian mean
https://en.wikipedia.org/wiki/Heronian_mean
__
H = ⅓(A + √AB + B) |
|
identricMean ( number $x, number $y ) : number |
Identric mean
https://en.wikipedia.org/wiki/Identric_mean
____
1 / xˣ
I(x,y) = - ˣ⁻ʸ/ --
ℯ √ yʸ |
|
interquartileMean ( array $numbers ) : number |
Interquartile mean (IQM)
A measure of central tendency based on the truncated mean of the interquartile range. |
|
iqm ( array $numbers ) : number |
IQM (Interquartile mean)
Convenience function for interquartileMean |
|
kthSmallest ( array $numbers, integer $k ) : number |
Return the kth smallest value in an array
Uses a linear-time algorithm: O(n) time in worst case. |
|
lehmerMean ( array $numbers, number $p ) : number |
Lehmer mean
https://en.wikipedia.org/wiki/Lehmer_mean |
|
logarithmicMean ( number $x, number $y ) : number |
Logarithmic mean
A function of two non-negative numbers which is equal to their
difference divided by the logarithm of their quotient. |
|
mean ( array $numbers ) : number |
Calculate the mean average of a list of numbers |
|
median ( array $numbers ) : number |
Calculate the median average of a list of numbers |
|
mode ( array $numbers ) : array |
Calculate the mode average of a list of numbers
If multiple modes (bimodal, trimodal, etc.), all modes will be returned. |
|
powerMean ( array $numbers, number $p ) : number |
Power mean (generalized mean)
Convenience method for generalizedMean |
|
quadraticMean ( array $numbers ) : number |
Quadradic mean (root mean square)
Convenience function for rootMeanSquare |
|
rootMeanSquare ( array $numbers ) : number |
Root mean square (quadratic mean)
The square root of the arithmetic mean of the squares of a set of numbers. |
|
simpleMovingAverage ( array $numbers, integer $n ) : array |
Simple n-point moving average SMA
The unweighted mean of the previous n data. |
|
trimean ( array $numbers ) : number |
Trimean (TM, or Tukey's trimean)
A measure of a probability distribution's location defined as
a weighted average of the distribution's median and its two quartiles. |
|
truncatedMean ( array $numbers, integer $trim_percent ) : number |
Truncated mean (trimmed mean)
The mean after discarding given parts of a probability distribution or sample
at the high and low end, and typically discarding an equal amount of both. |
|
weightedMovingAverage ( array $numbers, integer $n, array $weights ) : array |
Weighted n-point moving average (WMA) |
|