repl.txt (862B)
1 2 {{alias}}( [mean] ) 3 Returns an accumulator function which incrementally computes an unbiased 4 sample variance. 5 6 If provided a value, the accumulator function returns an updated unbiased 7 sample variance. If not provided a value, the accumulator function returns 8 the current unbiased sample variance. 9 10 If provided `NaN` or a value which, when used in computations, results in 11 `NaN`, the accumulated value is `NaN` for all future invocations. 12 13 Parameters 14 ---------- 15 mean: number (optional) 16 Known mean. 17 18 Returns 19 ------- 20 acc: Function 21 Accumulator function. 22 23 Examples 24 -------- 25 > var accumulator = {{alias}}(); 26 > var s2 = accumulator() 27 null 28 > s2 = accumulator( 2.0 ) 29 0.0 30 > s2 = accumulator( -5.0 ) 31 24.5 32 > s2 = accumulator() 33 24.5 34 35 See Also 36 -------- 37