Returns an accumulator function which incrementally computes an exponentially weighted standard deviation.
smoothing factor
accumulator function
var accumulator = increwstdev( 0.5 );
var s = accumulator();
// returns null
s = accumulator( 2.0 );
// returns 0.0
s = accumulator( -5.0 );
// returns 3.5
s = accumulator();
// returns 3.5
If provided a value, the accumulator function returns an updated standard deviation. If not provided a value, the accumulator function returns the current standard deviation.
Notes
NaN
or a value which, when used in computations, results inNaN
, the accumulated value isNaN
for all future invocations.value
standard deviation or null