2004-09-17
Position-Weighted Average Formula
A full year ago, I wanted a simple formula that would give the average value of a set of positioned values (such as points on a graph, where x is the position and y is the value), but with more weight given to values with positions closer to a specific point of reference. I was sure such an equation must be known, and I still am, but I haven't yet managed to find it. So I made my own.
I created a formula that did just this, and I even made special algorithms to recompute the position-weighted average with new data, using minimal data reinput. It worked, and it was great.
That was a year ago. Earlier this week, I wanted to use that equation again, and I couldn't find it! I had pages and pages of stuff relating to it, but it's all probably mixed in with all of my leftover junk from last schoolyear or mistakenly thrown away.
So, I had to invent it again. So I did. Sort of. I only spent an hour trying to figure it out again, but I managed to get something pretty much like what I had before. However, this new formula is different in a few ways, such as the fact that the new formula doesn't incorporate a point of reference since the output remains the same if all value positions are shifted equally, whereas in the old formula the further the point of reference was from the positions of the values, the closer the output was to the zero-weighted (simple) average.
The new formula is as follows: position-weighted average = sum ( value * ( 2 ^ weight ) ^ position ) / sum ( ( 2 ^ weight ) ^ position )
I think the effect of the original formula was more what I was trying to get, and I am still trying to rediscover it. Hopefully I can find the original papers, or at least a script on my old computer that made use of it.
0 comments
Comment moderation policy: Your comment will be reviewed before it is added to the site. This is in response to spam and other forms of abuse. I gladly accept comments containing criticism as long as the language is clean.
This weblog is powered by Blogger.