1
mean and stddev
3d985337-0393-4e88-96d0-c10b54b6c057
isee systems, inc.
iThink
0
50
0.25
false
NORMAL(10, 1)
0
accumulate_values
value/DT
0
accumulate_squares
(value^2)/DT
IF n > 0 THEN running_sum/n ELSE running_sum
Note n*mean^2/(n - 1) = running_sum^2/(n*(n - 1)). Either is fine. The former is faster if you have the mean handy, the latter is faster if you do not.
Also note that this form of the equation (versus repeatedly taking the sum of the square of the differences from the mean) suffers loss of precision if the magnitudes of E(x^2) is close to that of E(x)^2, i.e., the left side of the difference is the same magnitude as the right.
IF n > 1 THEN SQRT(running_sum_of_squares/(n - 1) - (running_sum^2)/(n*(n - 1))) ELSE SQRT(running_sum_of_squares)
(TIME - STARTTIME)/DT + 1
value
accumulate_values
value
accumulate_squares
n
running_mean
n
running_stddev
running_sum
running_mean
running_sum_of_squares
running_stddev
running_sum
running_stddev
0