Author |
Message |
Fogmeister
I haven't seen my friends in so long
Joined: Thu Apr 23, 2009 7:35 pm Posts: 6580 Location: Getting there
|
Hi all,
Quick question...
I know to work out the average (or mean) of a list of numbers you add them up and then divide the total by the number of numbers.
BUT!
Can you do it this way...
Take the first number. Add the second number and divide the total by 2. Add the third number and divide the total by 2. ... Add the nth number and divide the total by 2.
Does that work?
Thanks!
|
Tue Aug 24, 2010 7:33 pm |
|
 |
bubbles
Occasionally has a life
Joined: Thu Apr 30, 2009 6:34 pm Posts: 309
|
no
_________________ iam_bored_ok on cpc panda's are awesome
|
Tue Aug 24, 2010 7:36 pm |
|
 |
Fogmeister
I haven't seen my friends in so long
Joined: Thu Apr 23, 2009 7:35 pm Posts: 6580 Location: Getting there
|
|
Tue Aug 24, 2010 7:38 pm |
|
 |
Fogmeister
I haven't seen my friends in so long
Joined: Thu Apr 23, 2009 7:35 pm Posts: 6580 Location: Getting there
|
Hmm...
It seems that it doesn't work but my brain doesn't accept that fact.
LOL!
|
Tue Aug 24, 2010 7:42 pm |
|
 |
l3v1ck
What's a life?
Joined: Fri Apr 24, 2009 10:21 am Posts: 12700 Location: The Right Side of the Pennines (metaphorically & geographically)
|
There are three types of average. Mean, mode and median. One is the total divided by the number of samples, one is the most common number in the samples and one is the middle number if put in order. I forget which is which.
|
Tue Aug 24, 2010 7:43 pm |
|
 |
Fogmeister
I haven't seen my friends in so long
Joined: Thu Apr 23, 2009 7:35 pm Posts: 6580 Location: Getting there
|
Ah, I've just figures out why it doesn't work.  LOL! Brain fade moment for a second there 
|
Tue Aug 24, 2010 7:56 pm |
|
 |
EddArmitage
I haven't seen my friends in so long
Joined: Thu Apr 23, 2009 9:40 pm Posts: 5288 Location: ln -s /London ~
|
I can prove it doesn't work by means of a trivial counterexample, but it's bugging me. And I guess it makes sense, although initially I half expected it to work. Trivial counterexample:  And I guess it makes sense. If you have an average, then you're averaging your cumulative average with each new piece of data, so you increase the weighting of the nth datum as n increases exponentially, ie: 
|
Tue Aug 24, 2010 7:57 pm |
|
 |
EddArmitage
I haven't seen my friends in so long
Joined: Thu Apr 23, 2009 9:40 pm Posts: 5288 Location: ln -s /London ~
|
Bugger, sorry it took so long! I was scribbling on a copy of the metro in green highlighter (not that green is a particularly slow colour, mind) and then used a quick online LaTeX compiler.
|
Tue Aug 24, 2010 7:58 pm |
|
 |
Fogmeister
I haven't seen my friends in so long
Joined: Thu Apr 23, 2009 7:35 pm Posts: 6580 Location: Getting there
|
LOL, no problem. I had the same feeling as you and then the same thought (i.e. the weighting of the accumulative average.
|
Tue Aug 24, 2010 8:12 pm |
|
 |
jonlumb
Spends far too much time on here
Joined: Thu Apr 23, 2009 6:44 pm Posts: 4141 Location: Exeter
|
Sorry, but that post contains sooooo much win. We really need rep on here.
_________________ "The woman is a riddle inside a mystery wrapped in an enigma I've had sex with."
|
Tue Aug 24, 2010 8:22 pm |
|
 |
EddArmitage
I haven't seen my friends in so long
Joined: Thu Apr 23, 2009 9:40 pm Posts: 5288 Location: ln -s /London ~
|
Hmmm, I think I'd be into negative rep overall! What's so win-y about that post?
|
Tue Aug 24, 2010 8:43 pm |
|
 |
Nick
Spends far too much time on here
Joined: Thu Apr 23, 2009 11:36 pm Posts: 3527 Location: Portsmouth
|
Post counts and sticky threads are the devils work.
Rep should replace post count IMO.
_________________
|
Tue Aug 24, 2010 8:50 pm |
|
 |
Fogmeister
I haven't seen my friends in so long
Joined: Thu Apr 23, 2009 7:35 pm Posts: 6580 Location: Getting there
|
The Metro, the green highlighter, the comment about the green highlighter, the "quick" LaTex compiler, the rushed nature of it, etc... It is a very funny and perfectly put together post  Almost worthy of Douglas Adams 
|
Tue Aug 24, 2010 8:50 pm |
|
 |
EddArmitage
I haven't seen my friends in so long
Joined: Thu Apr 23, 2009 9:40 pm Posts: 5288 Location: ln -s /London ~
|
Why thank thee. And I was still too slow!
|
Tue Aug 24, 2010 8:55 pm |
|
 |
JJW009
I haven't seen my friends in so long
Joined: Thu Apr 23, 2009 6:58 pm Posts: 8767 Location: behind the sofa
|
I now know you know now, but it amused me that you thought of it. I remember following the same logic many years ago, although I forget what the project was. The simplest way is to keep a tally of how many samples are taken, and a rolling total of all previous samples. At the very least, you need to know how many samples there have been so you can adjust the weighting accordingly. Producing a "rolling average" is a bit of a pain in practice, because you require infinite precision numbers. Otherwise, you eventually reach a saturation point where no further changes to the readout are possible. I'd be interested in what algorithms are used to display the "average fuel consumption" on trip computers. I know they're not all the same, and I suspect many of them weight recent samples more heavily. That is to say, it's a different kind of "average" all together.
_________________jonbwfc's law: "In any forum thread someone will, no matter what the subject, mention Firefly." When you're feeling too silly for x404, youRwired.net
|
Tue Aug 24, 2010 10:23 pm |
|
|