Module compute::statistics[][src]

Expand description

A module for computing statistics of data.

Functions

Returns the index of the largest element in the array.

Returns the index of the smallest element in the array.

Calculates the covariance between two vectors x and y. This is a two-pass algorithm which centers the data before computing the covariance, which improves stability but does not change the result as covariance is invariant with respect to shifts.

Returns the largest element in the array.

Calculates the mean of an array of data points.

Returns the smallest element in the array.

Calculates the sample covariance between two vectors x and y. This is a two-pass algorithm which centers the data before computing the covariance, which improves stability but does not change the result as covariance is invariant with respect to shifts.

Calculates the covariance between two vectors x and y. This is a one-pass algorithm which shifts the data by the first element in each vector before computing the covariance, which improves stability but does not change the result as covariance is invariant with respect to shifts.

Calculates the covariance between two vectors x and y. This is a stable one-pass online algorithm. See https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Covariance

Calculates the sample standard deviation of an array of data points. This is the square root of the sample variance.

Calculates the sample variance from an array of data points in a numerically stable manner using the Welford algorithm.

Calculates the standard deviation of an array of data points. This is the square root of the variance.

Calculates the population variance from an array of data points in a numerically stable manner using the Welford algorithm.

Calculates the mean of an array of data points using the Welford algorithm.