Kier i have been wondering how hard an average would be. Ok i am going to write my thoughts on how to do this as it is a stat i would love.
First, it is only going to work on a site relativly busy, ie with a hit on forumhome every few minutes or so.
So:
i) person hits forumhome (after installing hack).
it records:
i) number of users online
ii) that this is the 1st reporting
iii) the time reported
iv) the average online.
now it needs a couple of times for this to work so lets say we have this:
users: 10, 15, 23, 23, 8
id: 1, 2, 3, 4, 5
minutes (clearly the difference in times): 5, 2, 5, 2 (obviously we can't count the last one)
so to do average we do:
(10x5 + 2x15 + 5x23 + 2x23) / 4
which gives the average.
So any ideas on how this could be done. I would think what you want is a running total that an average can still be generated from but it is too late for me to think of a way to do that.
|