Returns an accumulator function which incrementally computes an arithmetic mean and corrected sample standard deviation.
output array
accumulator function
var accumulator = incrmeanstdev();
var ms = accumulator();
// returns null
ms = accumulator( 2.0 );
// returns [ 2.0, 0.0 ]
ms = accumulator( -5.0 );
// returns [ -1.5, ~4.95 ]
ms = accumulator( 3.0 );
// returns [ 0.0, ~4.36 ]
ms = accumulator( 5.0 );
// returns [ 1.25, ~4.35 ]
ms = accumulator();
// returns [ 1.25, ~4.35 ]
If provided a value, the accumulator function returns updated results. If not provided a value, the accumulator function returns the current results.
Notes
NaN
, the arithmetic mean and corrected sample standard deviation values are equal toNaN
for all future invocations.input value
output array or null