0
$\begingroup$

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?

$\endgroup$
1
  • $\begingroup$ Do you also need to calculate the new standard deviation, or only the new average? $\endgroup$ May 19, 2013 at 15:38

1 Answer 1

1
$\begingroup$

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.)

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .