[RC5] Stats suggestion

Ben Clifford benc at hawaga.org.uk
Fri Jan 5 21:46:05 EST 2001


> Right, you could have three fields, plug in zero for the previous day's
> value on the first iteration, then after seven days the 7-day value
> would reflect reality, 

No, after 7-days, the value would be half of the "right" value.

A 7-day half life has K=0.9057

Assume that I compute 1000 units per day.

 Start avg = 0
 Day 1: 0.9057 * 0      +   (1-0.9057) * 1000     =   94.3
 Day 2: 0.9057 * 94.3   +   (1-0.9057) * 1000     =   179.7
 Day 3: 0.9057 * 179.7  +   (1-0.9057) * 1000     =   257.1
 Day 4: 0.9057 * 257.1  +   (1-0.9057) * 1000     =   327.2
 Day 5: 0.9057 * 327.2  +   (1-0.9057) * 1000     =   390.6
 Day 6: 0.9057 * 390.6  +   (1-0.9057) * 1000     =   448.1
 Day 7: 0.9057 * 448.1  +   (1-0.9057) * 1000     =   500

The half-life is the time it takes for the average to get to half way
between the current value and the true value.

So after 7 days, the average will be 500, which is half way between 0
(the starting value) and 1000 (the true rate).

After another 7 days, the average will be half way between 500 and 1000,
which is 750.

After another 7 days, the average will be half way between 750 and 1000,
which is 875.

And so on and so on, gradually getting closer and closer to the true
value.

So, even with a 7 day half life, it will probably take about 4 lots of
half lives to get reasonably close to the value. With a 30-day half-life,
it would take about 4 months.

-- 
http://www.hawaga.org.uk/travel/ for my rotating world map applet
http://www.hawaga.org.uk/benc_key.txt PGP / GPG key 0x30F06950 - please use it!


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