[RC5] Another request

Niels Teglsbo Teglsbo at image.dk
Mon Jan 8 21:18:42 EST 2001


On Mon, 8 Jan 2001 16:05:34 +0100 you, "Franklin Eekhout"
<franklin at online.no> wrote:

> Don't know, does it matter? The formula calulates using the date, it seems.
> What does the originator of the Excel file have to say, or a maths guy?

When I calculated the exponential average I used a formula like this:

newAverage = decayvalue ^ (today - lastBlockDate) * average + (1 -
decayvalue) * blocksToday

which takes care of the missing days.

The total running average can be calculated with a column of days since
the beginning, a column of total blocks so far, and the total running
average is
(the total blocks so far) / (days since the beginning)


But Excel's regular average couldn't take care of the missing days, so I
made the exponential average not take care of it too. It doesn't really
matter when it's to show the difference between regular averages and
exponential averages, because you wouldn't care if I have submitted
every day or not.

It's probably possible to make an average function in Excel, using some
scripting, that will take care of the missing days.

Another solution would be to write some Perl script or whatever that
would insert the missing days with zeros.

-- 
Niels, The Offspring Mailinglist www.image.dk/~teglsbo
--
To unsubscribe, send 'unsubscribe rc5' to majordomo at lists.distributed.net
rc5-digest subscribers replace rc5 with rc5-digest



More information about the rc5 mailing list