Rapid Calculation Methods
See also: Algorithms for calculating varianceThe following two formulas can represent a running (continuous) standard deviation. A set of three power sums s0, s1, s2 are each computed over a set of N values of x, denoted as x1, ..., xN:
Note that s0 raises x to the zero power, and since x0 is always 1, s0 evaluates to N.
Given the results of these three running summations, the values s0, s1, s2 can be used at any time to compute the current value of the running standard deviation:
Similarly for sample standard deviation,
In a computer implementation, as the three sj sums become large, we need to consider round-off error, arithmetic overflow, and arithmetic underflow. The method below calculates the running sums method with reduced rounding errors. This is a "one pass" algorithm for calculating variance of n samples without the need to store prior data during the calculation. Applying this method to a time series will result in successive values of standard deviation corresponding to n data points as n grows larger with each new sample, rather than a constant-width sliding window calculation.
For k = 0, ..., n:
where A is the mean value.
Sample variance:
Standard variance:
Read more about this topic: Standard Deviation
Famous quotes containing the words rapid, calculation and/or methods:
“In a time of confusion and rapid change like the present, when terms are continually turning inside out and the names of things hardly keep their meaning from day to day, its not possible to write two honest paragraphs without stopping to take crossbearings on every one of the abstractions that were so well ranged in ornate marble niches in the minds of our fathers.”
—John Dos Passos (18961970)
“To my thinking boomed the Professor, begging the question as usual, the greatest triumph of the human mind was the calculation of Neptune from the observed vagaries of the orbit of Uranus.
And yours, said the P.B.”
—Samuel Beckett (19061989)
“A woman might claim to retain some of the childs faculties, although very limited and defused, simply because she has not been encouraged to learn methods of thought and develop a disciplined mind. As long as education remains largely induction ignorance will retain these advantages over learning and it is time that women impudently put them to work.”
—Germaine Greer (b. 1939)