in reply to Average over time
But if you are willing to relax the uniformity requirement, it is easily to do something real time. Consider the recursive estimate for the time between emails
where t[i]-t[i-1] is the time interval between the current and previous email and k is a wieghting coefficient. This expression only needs the most recent interval and average to compute the current average.avg( i ) = (1-k)*(t[i] - t[i-1]) + k*avg( i-1 ) k < 1
For k < 1, the previous elements will be exponentially weighted k**n for avg(i-n) and k is adjusted to vary the aproximate number of events averaged in.
From the average interval between emails, you can easily derive the emails per time:
Update: corrected first equation.rate[i] = 1/avg[i];
-Mark
|
|---|