Computes the sum of the given values

sum(values: Array): number
Parameters
values (Array)
Returns
number:

Computes the maximum of the given values

max(values: Array): number
Parameters
values (Array)
Returns
number:

Computes the minimum of the given values

min(values: Array): number
Parameters
values (Array)
Returns
number:

minMax

array.js

Computes the min and max of the given values

minMax(values: Array): {min: number, max: number}
Parameters
values (Array)
Returns
{min: number, max: number}:

arithmeticMean

array.js

Computes the arithmetic mean of the given values

arithmeticMean(values: Array): number
Parameters
values (Array)
Returns
number:

arithmeticMean

mean

geometricMean

array.js

Computes the geometric mean of the given values

geometricMean(values: Array): number
Parameters
values (Array)
Returns
number:

logMean

array.js

Computes the mean of the log of the given values If the return value is exponentiated, it gives the same result as the geometric mean.

logMean(values: Array): number
Parameters
values (Array)
Returns
number:

grandMean

array.js

Computes the weighted grand mean for a list of means and sample sizes

grandMean(means: Array, samples: Array): number
Parameters
means (Array) Mean values for each set of samples
samples (Array) Number of original values for each set of samples
Returns
number:

truncatedMean

array.js

Computes the truncated mean of the given values using a given percentage

truncatedMean(values: Array, percent: number, alreadySorted: [boolean]): number
Parameters
values (Array)
percent (number) The percentage of values to keep (range: [0,1] )
alreadySorted ([boolean] (default false) )
Returns
number:

harmonicMean

array.js

Computes the harmonic mean of the given values

harmonicMean(values: Array): number
Parameters
values (Array)
Returns
number:

contraHarmonicMean

array.js

Computes the contraharmonic mean of the given values

contraHarmonicMean(values: Array): number
Parameters
values (Array)
Returns
number:

median

array.js

Computes the median of the given values

median(values: Array, alreadySorted: [boolean]): number
Parameters
values (Array)
alreadySorted ([boolean] (default false) )
Returns
number:

variance

array.js

Computes the variance of the given values

variance(values: Array, unbiased: [boolean]): number
Parameters
values (Array)
unbiased ([boolean] (default true) ) if true, divide by (n-1); if false, divide by n.
Returns
number:

standardDeviation

array.js

Computes the standard deviation of the given values

standardDeviation(values: Array, unbiased: [boolean]): number
Parameters
values (Array)
unbiased ([boolean] (default true) ) if true, divide by (n-1); if false, divide by n.
Returns
number:

robustMeanAndStdev

array.js

IEEE Transactions on biomedical engineering, vol. 52, no. 1, january 2005, p. 76- Calculate the standard deviation via the Median of the absolute deviation The formula for the standard deviation only holds for Gaussian random variables.

robustMeanAndStdev(y: Any): {mean: number, stdev: number}
Parameters
y (Any)
Returns
{mean: number, stdev: number}: