Class OnlineStatistics

extends Object
Online algorithm for computing simple statistics.
This uses Welford's online algorithm (see more here https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance).

Class summary


constructor
Constructs an empty statistics.

Constructors

Constructs an empty statistics.

Statics

Constructs statistics from the bytes.
Works with byte arrays generated by to-byte-array.

Methods

Count of the collected values.

max -> num
Maximum of the collected values.
Returns null if no values have been collected.

Mean of the collected values.
Returns null if no values have been collected.

min -> num
Minimum of the collected values.
Returns null if no values have been collected.

operator == other/any -> bool
See super.

Estimated population variance of the collected values.
Returns null if one or fewer values have been collected.

Estimated sample variance of the collected values.
Returns null if one or fewer values have been collected.

Stringifies this object.
Inheritance
Objects that need a human-friendly string representation should overwrite this method. The default string is based on the internal class-ID.

Serializes the OnlineStatistics.

update value/num -> none
Updates the estimated variance with the value.