How to normalize data to 1 such that each value receives a weight proportional to their own value

StackOverflow https://stackoverflow.com/questions/22819502

  •  26-06-2023
  •  | 
  •  

Question

I have some data that do not sum to 1 that I would like to have sum to 1.

  • 0.0232
  • 0.05454
  • 0.2154
  • 0.5
  • 0.005426
  • 0.024354
  • 0.00000456
  • sum: 0.82292456

    I could just multiply each value by 1.0/0.82292456 and then have the sum be 1.00, but then all values would receive a factor adjustment of the same proportion (i.e 0.17707544).

    I'd like to increase each value based on the size of the value itself. In other words, 0.5 would get a proportionally larger adjustment than 00000456 would.

    I am not sure how to determine these adjustments that could potentially be additive, multiplicative, or both.

    Any hints or suggestions would be helpful!

    Thanks!

    Was it helpful?

    Solution

    I could just multiply each value by 1.0/0.82292456 and then have the sum be 1.00, but then all values would receive a factor adjustment of the same proportion (i.e 0.17707544).

    OK, That's what I'd do. Why is "a factor adjustment of the same proportion" a problem?

    I'd like to increase each value based on the size of the value itself.

    In that case, you should multiply each value by 1.0/0.82292456 because that's what multiplication does.

    Licensed under: CC-BY-SA with attribution
    Not affiliated with StackOverflow
    scroll top