standardDeviation method

double standardDeviation({
  1. bool population = false,
})

Returns the square root of the (population) variance of this Iterable, or double.nan if the iterable contains less than 2 (1 for population variance) values.

For details, see https://en.wikipedia.org/wiki/Standard_deviation.

Example: [2, 5].standardDeviation() returns 2.1213....

Implementation

double standardDeviation({bool population = false}) =>
    sqrt(variance(population: population));