Skip to main content

Module stats

Module stats 

Source
Expand description

Rolling statistical primitives, linear regression, and sample statistics (Wilson interval, longest run). Rolling statistics primitives for streaming series calculations.

Structs§

LinearRegressionResult
Result of a linear regression fit over a data slice.
ProportionInterval
A binomial proportion with its confidence bounds, all in 0.0..=1.0.

Functions§

correlation
Computes Pearson correlation from finite, positionally aligned pairs.
linear_regression
Computes ordinary least squares (OLS) linear regression over a slice of values (where X is 0..N-1).
longest_run
Length of the longest unbroken run of consecutive elements for which predicate holds; 0 if it never does.
percent_rank
Returns the percentile rank (0.0..=100.0) of val within slice.
rolling_mean
Returns the arithmetic mean of all finite values in slice.
rolling_median
Returns the median of finite values in slice.
rolling_quantile
Returns the quantile (0.0..=1.0) of finite values in slice.
rolling_stddev
Returns the standard deviation of finite values in slice.
rolling_sum
Returns the sum of all finite values in slice.
rolling_variance
Returns the population variance of finite values in slice.
wilson_interval
Wilson score interval for successes out of trials.