Function kolmogorov_smirnov::ecdf::ecdf
[−]
[src]
pub fn ecdf<T: Ord>(samples: &[T], t: T) -> f64
Calculate a one-time value of the empirical cumulative distribution function for a given sample.
Computational running time of this function is O(n) but does not amortize
across multiple calls like Ecdf
Panics
The sample set must be non-empty.
Examples
extern crate kolmogorov_smirnov as ks; let samples = vec!(9, 8, 7, 6, 5, 4, 3, 2, 1, 0); let value = ks::ecdf(&samples, 4); assert_eq!(value, 0.5);