Finding the current average of an indefinitely increasing sequence
You might find this Wiki article on the moving average useful. Specifically, the section on the cumulative moving average looks to me like what you're looking for, but there are discussions and derivations of other methods therein.
Another really simple way to do it is to do
newAverage = prevAverage * (i - 1) / i + newValue / i;
, where i starts at 1 and increments after every time you want to add something to the running average. Granted, this is only as good as the floating point precision you're using, but then again, that could be said about almost everything :P
I'm sorry about any spelling or grammar mistakes or any undue brevity, as I'm most likely typing on my phone
"Hell, there's more evidence that we are just living in a frequency wave that flows in harmonic balance creating the universe and all its existence." ~ GDchat