1

Given the Mean and Variance of $n$ samples $x_i$:

$$M_n=\frac {1}{n}\sum_{1}^{n} x_i$$

$$V_n=\frac {1}{n}\sum_{1}^{n}(x_i-μ_n)^2$$

How do Mean and Variance change, when we take into account one more sample?

In other words, what are the function $f(x_n,\space...)$ and $g(x_n,\space...)$ such that:

$$M_n = f(x_n,\space n, \space M_{n-1})$$

$$V_n = g(x_n, \space n, \space M_{n-1}, \space V_{n-1})$$

Thank you!

elemolotiv
  • 1,048
  • 7
  • 20
  • 1
    Outliers defined as what? Often people define outliers as values that lie some number of standard deviations from the mean. In such case, it gets circular. – Tim Jun 09 '19 at 09:11
  • ok I'll remove the word "outlier" to focus my question better. thanks! – elemolotiv Jun 09 '19 at 09:12
  • 2
    This answer seems to give you what you're looking for: [https://math.stackexchange.com/questions/374881/recursive-formula-for-variance](https://math.stackexchange.com/questions/374881/recursive-formula-for-variance) – rzch Jun 09 '19 at 10:38

0 Answers0