[−][src]Trait vecfx::StatsExt
Trait that provides simple descriptive statistics on a univariate set of numeric samples.
Required methods
fn sum(&self) -> f64
Sum of the samples.
Note: this method sacrifices performance at the altar of accuracy Depends on IEEE-754 arithmetic guarantees. See proof of correctness at: "Adaptive Precision Floating-Point Arithmetic and Fast Robust Geometric Predicates"
fn min(&self) -> f64
Minimum value of the samples.
fn max(&self) -> f64
Maximum value of the samples.
fn mean(&self) -> f64
Arithmetic mean (average) of the samples: sum divided by sample-count.
fn var(&self) -> f64
Variance of the samples: bias-corrected mean of the squares of the differences of each
sample from the sample mean. Note that this calculates the sample variance rather than the
population variance, which is assumed to be unknown. It therefore corrects the (n-1)/n
bias that would appear if we calculated a population variance, by dividing by (n-1)
rather
than n
.
fn std_dev(&self) -> f64
Standard deviation: the square root of the sample variance.
Note: this is not a robust statistic for non-normal distributions. Prefer the
median_abs_dev
for unknown distributions.
fn imin(&self) -> usize
Index to the minimum value of the samples.
fn imax(&self) -> usize
Index to the maximum value of the samples.