For the overall average you need is the total time and total characters.  Do
the division at presentation time.

If you want a decaying moving average, then a variant on Welford's method is
useful for an on-line estimate.  I just had such a discussion in the hbase
group.  For that you need state, however, and atomic updates.  A useful
approximation might be possible if you can report many moving averages which
can themselves be averaged.

Can you say a bit more about your context?  Is this in hadoop?  Did you want
to maintain the average across the cluster?  Did you want real averages or a
moving average?  Do you have constant sampling rate?

On Mon, Mar 14, 2011 at 7:33 AM, Benson Margulies <[email protected]>wrote:

> Please excuse the following ignorant question.
>
> I want to maintain summary statistics of a rate. At each 'event', I
> know the number of characters and the time it took to process them,
> and I want to maintain summary statistics for the rate of
> chars/second. I imagine that I'm missing something basic, but I don't
> see how to do this.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to