Deno basic statistics module.
simple-statistics for Deno.
Functions and examples
Descriptive statistics
Function |
Example |
[min][] |
min([-3, 0, 3]) |
[max][] |
max([1, 2, 3]) |
[sum][] |
sum([1, 2, 3.5]) |
[sumSimple][] |
sumSimple([1, 2, 3.5]) |
[quantile][] |
quantile([3, 6, 7, 8, 8], 0.25) |
quantileRank |
TODO |
[product][] |
product([1, 2, 3, 5]) |
Sorted basic descriptive statistics
Function |
Example |
[minSorted][] |
minSorted([-100, -10, 1, 2, 5]) |
[maxSorted][] |
maxSorted([5, 2, 1, -10, -100]) |
[quantileSorted][] |
quantileSorted([3, 6, 9, 10, 12], 0.4) |
quantileRankSorted |
TODO |
Measures of central tendency
Function |
Example |
[mean][] |
mean([-1, 0, 1, 2, 3, 4]) |
[addToMean][] |
addToMean(14, 5, 53) |
[mode][] |
mode([0, 0, 1]) |
[modeSorted][] |
modeSorted([0, 0, 1]) |
modeFast |
TODO |
median |
TODO |
medianSorted |
TODO |
[harmonicMean][] |
harmonicMean([2, 3]) |
[geometricMean][] |
geometricMean([1.80, 1.166666, 1.428571]) |
[rootMeanSquare][] |
rootMeanSquare([-1, 1, -1, 1]) |
sampleSkewness |
TODO |
Measures of dispersion
Function |
Example |
[variance][] |
variance([1, 2, 3, 4, 5, 6]) |
[sampleVariance][] |
sampleVariance([1, 2, 3, 4, 5]) |
[standardDeviation][] |
standardDeviation([2, 4, 4, 4, 5, 5, 7, 9]) |
[sampleStandardDeviation][] |
sampleStandardDeviation([2, 4, 4, 5, 7, 9]) |
medianAbsoluteDeviation |
TODO |
interquartileRange |
TODO |
[sumNthPowerDeviations][] |
sumNthPowerDeviations([0, 1], 2) |
[zScore][] |
zScore(78, 80, 5) |