A StdDevAggregator is an Aggregator that returns the sample standard deviation of a numeric property as a Double. The sample standard deviation is NaN if no values were found, and it is zero if exactly one value was found. This Aggregator overrides the terminateDoubleDouble method, so that the sample standard deviation is also available as a DoubleDouble. This allows the sample standard deviation to be used by other Aggregators as a high-precision DoubleDouble.
Create and use a StdDevAggregator, with one of the following methods:
The values returned by the property of the object must be numeric.
The sample standard deviation is calculated by summing up the squares of the values' differences from their arithmetic mean (average), then dividing that sum by (n - 1), where n is the number of non-null occurrences, then the square root is taken.