pub fn expected_level(probabilities: &[f64]) -> f64
The probability-weighted mean of 1-based level indices.