JavaScript / TypeScript API
nerdamer/statistics
Mean, median, mode, variance, standard deviation, and z-scores.
Direct npm import. The items on this page are JavaScript / TypeScript exports from
nerdamer/statistics. For functions used inside nerdamer('...'), see Nerdamer Notation.Functions
mean(...args: StatisticsInput[]): ExpressionFunctionReturns the arithmetic mean of the supplied values. A single Vector is unpacked.
median(...args: StatisticsInput[]): ExpressionFunctionReturns the median when all supplied values can be ordered numerically. Symbolic or complex inputs remain as an unevaluated median call.
mode(...args: StatisticsInput[]): ExpressionFunctionReturns the most frequent value. A tie remains symbolic as mode(...), matching the legacy behavior instead of selecting an arbitrary winner.
sampleStandardDeviation(...args: StatisticsInput[]): ExpressionFunctionReturns the sample standard deviation.
sampleVariance(...args: StatisticsInput[]): ExpressionFunctionReturns the sample variance using n-1 in the denominator.
stdev(...args: StatisticsInput[]): ExpressionFunctionReturns the population standard deviation.
variance(...args: StatisticsInput[]): ExpressionFunctionReturns the population variance using the legacy algebraic squared-deviation definition.
zscore(x: ExpressionInput, average: ExpressionInput, standardDeviation: ExpressionInput): ExpressionFunctionReturns the z-score (x - mean) / standardDeviation.
