variance static method
Calculates the variance of a list of values.
Implementation
static num variance(List<num> values) {
if (values.isEmpty) throw ArgumentError('The list cannot be empty.');
final m = mean(values);
return mean(values.map((value) => math.pow(value - m, 2)).toList());
}