Numerix v0.0.4 Numerix.Statistics

Common statistical functions.

Summary

Types

Something that may be a float

Functions

Calculates the unbiased covariance from two sample vectors

Calculates the average of a list of numbers

Returns the middle value in a list of numbers

Calculates the most frequent value(s) in a list

Estimates the p-Percentile value from the vector. Approximately median-unbiased irrespective of the sample distribution. This implements the R-8 type of https://en.wikipedia.org/wiki/Quantile

Calculates the population covariance from two full population vectors

Calculates the population standard deviation from a full population vector

Calculates the population variance from a full population vector

Estimates the tau-th quantile from the vector. Approximately median-unbiased irrespective of the sample distribution. This implements the R-8 type of https://en.wikipedia.org/wiki/Quantile

Calculates the difference between the largest and smallest values in a list

Calculates the unbiased standard deviation from a sample vector

Calculates the unbiased population variance from a sample vector

Calculates the weighted measure of how much two vectors change together

Calculates the weighted average of a list of numbers

Types

maybe_float :: float | nil

Something that may be a float.

Functions

covariance(xs, ys)

Specs

covariance([number], [number]) :: maybe_float

Calculates the unbiased covariance from two sample vectors.

mean(xs)

Specs

mean([number]) :: maybe_float

Calculates the average of a list of numbers.

median(xs)

Specs

median([number]) :: maybe_float

Returns the middle value in a list of numbers.

mode(xs)

Specs

mode([number]) :: [number] | nil

Calculates the most frequent value(s) in a list.

percentile(xs, p)

Specs

percentile([number], integer) :: maybe_float

Estimates the p-Percentile value from the vector. Approximately median-unbiased irrespective of the sample distribution. This implements the R-8 type of https://en.wikipedia.org/wiki/Quantile.

population_covariance(xs, ys)

Specs

population_covariance([number], [number]) :: maybe_float

Calculates the population covariance from two full population vectors.

population_std_dev(xs)

Specs

population_std_dev([number]) :: maybe_float

Calculates the population standard deviation from a full population vector.

population_variance(xs)

Specs

population_variance([number]) :: maybe_float

Calculates the population variance from a full population vector.

quantile(xs, tau)

Specs

quantile([number], number) :: maybe_float

Estimates the tau-th quantile from the vector. Approximately median-unbiased irrespective of the sample distribution. This implements the R-8 type of https://en.wikipedia.org/wiki/Quantile.

range(xs)

Specs

range([number]) :: maybe_float

Calculates the difference between the largest and smallest values in a list.

std_dev(xs)

Specs

std_dev([number]) :: maybe_float

Calculates the unbiased standard deviation from a sample vector.

variance(xs)

Specs

variance([number]) :: maybe_float

Calculates the unbiased population variance from a sample vector.

weighted_covariance(xs, ys, weights)

Specs

weighted_covariance([number], [number], [number]) :: maybe_float

Calculates the weighted measure of how much two vectors change together.

weighted_mean(xs, weights)

Specs

weighted_mean([number], [number]) :: maybe_float

Calculates the weighted average of a list of numbers.