are computed over a set of N values of x, denoted as x1, ..., xN: Given the results of these running summations, the values N, s1, s2 can be used at any time to compute the current value of the running standard deviation: Where N, as mentioned above, is the size of the set of values (or can also be regarded as s0). Similarly for sample standard deviation, In a computer implementation, as the two 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 = 1, ..., n: where A is the mean value. Note: since or Sample variance: Population variance: Weighted calculation When the values xi are weighted with unequal weights wi, the power sums s0, s1, s2 are each computed as: And the standard deviation equations remain unchanged. s0 is now the sum of the weights and not the number of samples N. The incremental method with reduced rounding errors can also be applied, with some additional complexity. A running sum of weights must be computed for each k from 1 to n: and places where 1/n is used above must be replaced by wi/Wn: In the final division, and or where n is the total number of elements, and n''' is the number of elements with non-zero weights. The above formulas become equal to the simpler formulas given above if weights are taken as equal to one. History The term standard deviation was first used in writing by Karl Pearson in 1894, following his use of it in lectures. This was as a replacement for earlier alternative names for the same idea: for example, Gauss used mean error. Higher dimensions In two dimensions, the standard deviation can be illustrated with the standard deviation ellipse (see Multivariate normal distribution § Geometric interpretation''). See also 68–95–99.7 rule Accuracy and precision Chebyshev's inequality An inequality on location and scale parameters Coefficient of variation Cumulant Deviation (statistics) Distance correlation Distance standard deviation Error bar