pub fn ks_test(data: &[f64], cdf: impl Fn(f64) -> f64) -> (f64, f64)
Kolmogorov-Smirnov test against a theoretical CDF. Returns (D-statistic, approximate p-value).