Function approx_pearson_skew::pearson_skew_median[][src]

pub fn pearson_skew_median(slice: &[u8]) -> Option<f32>

Pearson second skew coefficient, based on the difference between the average and median

Assumes immutable unsorted slice and uses approximate square root for no_std use. Algorithm used for median optimized for size, not time complexity.

let arr = [0, 0, 0, 5, 10];
let std = pearson_skew_median(&arr).unwrap();
assert_eq!(std, 2.25);