pub fn percentile(data: &mut [f64], p: f64) -> f64
Calculate percentile from sorted data. Uses linear interpolation.