pub fn iqr(values: &[f64]) -> f64Expand description
Compute interquartile range (IQR = Q3 - Q1).
The IQR is a robust measure of spread that is not affected by outliers.
ยงExample
use codec_eval::stats::iqr;
let values = [1.0, 2.0, 3.0, 4.0, 5.0];
assert!((iqr(&values) - 2.0).abs() < 0.001); // Q3(4) - Q1(2) = 2