x404.co.uk http://www.x404.co.uk/forum/ |
|
Working out the average http://www.x404.co.uk/forum/viewtopic.php?f=3&t=10173 |
Page 1 of 2 |
Author: | Fogmeister [ Tue Aug 24, 2010 7:33 pm ] |
Post subject: | Working out the average |
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! |
Author: | bubbles [ Tue Aug 24, 2010 7:36 pm ] |
Post subject: | Re: Working out the average |
no |
Author: | Fogmeister [ Tue Aug 24, 2010 7:38 pm ] | |||||||||
Post subject: | Re: Working out the average | |||||||||
Are you sure? |
Author: | Fogmeister [ Tue Aug 24, 2010 7:42 pm ] |
Post subject: | Re: Working out the average |
Hmm... It seems that it doesn't work but my brain doesn't accept that fact. LOL! |
Author: | l3v1ck [ Tue Aug 24, 2010 7:43 pm ] |
Post subject: | Re: Working out the average |
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. |
Author: | Fogmeister [ Tue Aug 24, 2010 7:56 pm ] |
Post subject: | Re: Working out the average |
Ah, I've just figures out why it doesn't work. ![]() LOL! Brain fade moment for a second there ![]() |
Author: | EddArmitage [ Tue Aug 24, 2010 7:57 pm ] |
Post subject: | Re: Working out the average |
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: ![]() |
Author: | EddArmitage [ Tue Aug 24, 2010 7:58 pm ] |
Post subject: | Re: Working out the average |
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. |
Author: | Fogmeister [ Tue Aug 24, 2010 8:12 pm ] | |||||||||
Post subject: | Re: Working out the average | |||||||||
LOL, no problem. I had the same feeling as you and then the same thought (i.e. the weighting of the accumulative average. |
Author: | jonlumb [ Tue Aug 24, 2010 8:22 pm ] | |||||||||
Post subject: | Re: Working out the average | |||||||||
Sorry, but that post contains sooooo much win. We really need rep on here. |
Author: | EddArmitage [ Tue Aug 24, 2010 8:43 pm ] | ||||||||||||||||||
Post subject: | Re: Working out the average | ||||||||||||||||||
Hmmm, I think I'd be into negative rep overall! What's so win-y about that post? |
Author: | Nick [ Tue Aug 24, 2010 8:50 pm ] |
Post subject: | Working out the average |
Post counts and sticky threads are the devils work. Rep should replace post count IMO. |
Author: | Fogmeister [ Tue Aug 24, 2010 8:50 pm ] | |||||||||||||||||||||||||||
Post subject: | Re: Working out the average | |||||||||||||||||||||||||||
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 ![]() |
Author: | EddArmitage [ Tue Aug 24, 2010 8:55 pm ] | |||||||||
Post subject: | Re: Working out the average | |||||||||
Why thank thee. And I was still too slow! |
Author: | JJW009 [ Tue Aug 24, 2010 10:23 pm ] | |||||||||
Post subject: | Re: Working out the average | |||||||||
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. |
Page 1 of 2 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |