Need help finding weighted percentages

seph ir oth

Mod'n Dat News Jon
Reaction score
262
Hello,

Please see the following figures in the imgur link below:

http://imgur.com/txqDONS

So the situation: I am given anywhere from 1 to X numbers between -0.5 and 0.5. I need to give them weighted percentages based off of how close they are to 0.

I think it should look something like:

(1/X) * weight

And the weight is something like:

1 - abs(difference between red-line value and 0) / 0.5

But that's not quite correct ... Figure 2, the 2 red lines close to the center will have too great a % ... I want all the red line's % to add up to 100% ...

Any ideas?
 

jonas

You can change this now in User CP.
Reaction score
64
Normalize the distance...

Code:
distance_i = | 1/X_i | 
totalDistance = \sum_i distance_i
normalizedDistance_i = distance_i / totalDistance

Clearly the sum of all normalized distances is 1:
Code:
\sum_i normalizedDistance_i = \sum_i distance_i / totalDistance 
  = (\sum_i distance_i) / totalDistance 
  = totalDistance / totalDistance 
  = 1
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top