0
$\begingroup$

If I currently have a sum of N elements (I don't have the elements them self), their mean and the corresponding standard deviation. Later on I receive M (known) other elements. I want to update the mean and standard deviation that I already have according to this new elements. Is it possible to do so ?

  • 0
    ...squared to get the new variance.2012-03-26

1 Answers 1

0

We need to save the sum of the $N$ elements (to be able to compute the mean later) as well as the sum of squared $N$ elements (to be able to compute the variance later). Then the variance when we have $M$ new elements will be: the last sum of squared N elements plus the sum of squared $M$ elements, minus the square of the new mean (which can be computed easily by dividing the sum of all elements by $N+M$).