std.math.common
combinatorial
added in 3.0
(combinatorial n i)calculates the result of n choose i
(combinatorial 4 2) => 6
(combinatorial 4 3) => 4
factorial
added in 3.0
(factorial n)calculates the factorial of n
(factorial 4) => 24
(factorial 10) => 3628800
histogram
added in 3.0
(histogram xs)(histogram xs n)creates a histogram of values
(histogram 1 2 3 3 5 5 7 7 8 8 9 4) => 4 2 2 3
kurtosis
added in 3.0
(kurtosis xs)(kurtosis xs stdev)calculates the kurtosis of the data
(kurtosis 4 5 2 9 5 7 4 5 4) => (approx 2.4722)
log
added in 3.0
(log b x)calculates the logarithm base b of x
(log 2 2) => 1.0
(log 4 16) => 2.0
log10
added in 3.0
(log10 x)calculates the log base 10 of x
(log10 2) => 0.3010299956639812
(log10 10) => 1.0
loge
added in 3.0
(loge x)calculates the natural log of x
(loge 2) => 0.6931471805599453
(loge 10) => 2.302585092994046
mean
added in 3.0
(mean xs)median
added in 3.0
(median xs)mode
added in 3.0
(mode xs)calculates the most frequent value of a set of data
(mode :alan :bob :alan :greg) => :alan
percentile
added in 3.0
(percentile xs ratio)calculates the value within the population given a ratio
(percentile 1 9 9 9 9 0.5) => 9
quantile
added in 3.0
(quantile xs n)splits the total population into equal quantiles
(quantile 1 2 4 4 4 4 8 9 4) => 3.5 4.0 5.0
skew
added in 3.0
(skew xs)(skew xs stdev)calculates the skewedness of the data
(skew 4 5 2 9 5 7 4 5 4) => (approx 0.5833)
stdev
added in 3.0
(stdev xs)calculates the standard deviation for a set of data
(stdev 4 5 2 9 5 7 4 5 4) => 2.0
variance
added in 3.0
(variance xs)calculates the average of the squared differences from the mean
(variance 4 5 2 9 5 7 4 5 4) => 4