# Set of data that needs to be weighted to be put on the same scale. Possible with this data?

I've never posted on this forum, so I hope this question is valid...

I have sets of data that are composed of these values (simplified)

data1: 1396.53, 1, 1396.53, 106.85, 1, 55.6949
data2: 370.155, 1, 370.155, 16.2414, 1, 13.3966


The idea is to get the average of each column, then apply a weighting to give each the same scale. For example, the averages come out to be:

Averages: 883.3425, 1, 883.3425, 61.5457, 1, 34.54575


Then the goal would be to apply weights to put each column on roughly the same scale:

(883.3425 * 0.01) + (1) + (883.3425 * 0.01) + (61.5457 * 0.1) + (1) + (34.54575 *0.1)


I'm rather poor with thinking of algorithms, so I cant quite find a systematic way of calculating the weights. I hope this question makes sense and thank you for your help!

-
I'm not sure what your goal is, but if the weights must always be powers of ten, then a natural choice would be to use $10^{-n}$ for the column whose average is between $10^n$ and $10^{n+1}$. That is, $n = floor( log(a) )$, where $log$ is logarithm in base $10$, and $a$ is the average value of that column – Shaun Ault Oct 19 '11 at 2:36
Thank you! Actually, this is for a program I'm writing for practice. :) I tried to make my own ranking algorithm, but while I could figure out the concept on paper, I didnt know how to programmatically figure out to find the appropriate weights. – kurisukun Oct 19 '11 at 2:50
Ok, sounds good. I'll post it as an answer then. – Shaun Ault Oct 19 '11 at 2:55

If the weights must always be powers of ten, then a natural choice would be to use $10^{−n}$ for the column whose average is between $10^n$ and $10^{n+1}$. That is, $n=\lfloor \log_{10} a \rfloor$, where $a$ is the average value of the column.
You could subtract the average of each column from each data point. Now each column has average $0$. If you want each column to have the same standard deviation ($\sigma$) you can take the standard deviation of each column and divide by that. What is special about powers of $10$? That is an artifact of our notation.