Harmonization of scores between 0 and 100

59 Views Asked by At

I'm looking for a way to "harmonize" scores between 0 and 100. Let's say I have n scores, the smallest one is 0, the biggest one is 100, and I know all the other values.

I would like to harmonize the scores between 0 and 100 so that the smallest one is still 0, the biggest one still 100, but spread the other between 0 and 100.

Examples:

If my current scores are 0, 0, 0, 1, 2, 5, 100, I want my end values to be somehow closer to 0, 0, 0, 10, 20, 60, 100 for instance.

If my current scores are 0, 88, 95, 100, I want my end values to be somehow closer to 0, 20, 75, 100.

I haven't been able to express this clearly and hence couldn't find any formula / algorithm to calculate the end values. I guess it should be based on the standard deviation somehow ?

Thanks a lot for putting me in the right direction

1

There are 1 best solutions below

0
On

Think about this method: If I use the notation $x_0, x_1, ..., x_n$ for your sample, the transform T that makes:

$$T(x_k) = (\frac{1}{X} \sum_{i=0}^{k} x_i)*(100)\ ,$$

with $X = \sum_{i=0}^{n} x_i$ (total sum of your sample). T is the normalized cumulated sum of your samples (I multiply by 100 for getting integers between 1 and 2).

If it is not enough just restart it again.

In the first example the result is transformation into :

$0,0,0,0.09,2.7,7.4,100$

In the second example:

$0,31,64.6,100$

The only problem is that it reduces the lowest value. For the first example you could also try to apply the method to $100 - x_0, 100- x_1, ..., 100 - x_n$ and then apply $T(x) = 100-x$ to the results.

The method is the method of histogram equalization in image proccessing. It is supposed to transform a random histogram (which, in fact, is a distribution of probabilities) into an equalized histogram. I just considered your scores as probabilities.