pub fn weighted_mean(x: &[f64], weights: &[f64]) -> Result<f64, ErrorsJSL>
The weighted mean Σ wᵢxᵢ / Σ wᵢ.
Σ wᵢxᵢ / Σ wᵢ