Calculate the new average using standard deviation?

618 Views Asked by At

This is for a programming exercise. I have:

  • the last average value
  • the last standard deviation
  • the total number of values

I need to be able to add a new value to my average without knowing the preceding ones but I can't figure out how to do this.

Can anybody help me on this?

1

There are 1 best solutions below

0
On

Hint: If you know the number of preceding values and also their average, then you know their sum. Then you can calculate the new sum.

(Note that the standard deviation is irrelevant to all of this.)