# Updating mean and variance estimates

Here are the iterative formulas (with derivations) for the population (N normalized) and sample (N-1 normalized) standard deviations, which express the $\sigma_$ ($s_$ for sample) for the $n 1$ value set in terms of $\sigma_$ ($s_$ for sample), $\bar x_$ of the $n$ value set plus the new value $x_$ added to the set.

Essentially we need to find: $$\bar x_ = f(n, \bar x_n, x_)$$ and $$\sigma_ = g(n, \sigma_n, \bar x_n, x_)$$ Derivation for the Average For both cases, the average for $n\geqslant1$ is, for n values: $$ \bar x_n=\frac1n\sum_^nx_k $$ for n 1 values: $$ \bar x_=\frac1\sum_^x_k = \frac1(n\bar x_n x_) \leftarrow f(n, \bar x_n, x_) $$ Derivation for the Standard Deviation The standard deviation formulas for population and sample are: \begin \sigma_ &= \sqrt && \textit \textbf \textit\ \ s_ &= \sqrt && \textit \textbf \textit \ \end To consolidate the derivations for both population and sample formulas we'll write the standard deviation using a generic factor $\alpha_$ and replace it at the end to get the population and sample formulas.

These transaction prices are used to construct the broad range of PPIs.

BACON: blocked adaptive computationally efficient outlier nominators. $$ Thus, $(n,\bar x_n,x_)$ yield $\bar x_$ and $(n,\bar\sigma^2_n,\bar x_n,\bar x_,x_)$ yield $\bar\sigma^2_$.There are two problems in the preceding answer, the first being the formula for the variance is incorrect(see the formula below for the correct version) and the second is that the formula for the recursion ends up subtracting large, nearly equal, numbers. Robustness properties of S-estimators of multivariate location and shape in high dimension. Multivariate Behavioral Research, 33(4), 545-571, 1998.