Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I am not really sure what this operation might be called, but I have some numbers, for example:

40

10

I need to format these numbers so that they form the sum 1, but they should keep their "weight".

In this specific case

40 would become 0.80, and 10 would become 0.2

But if I have more values (like 40, 10, 25, 5 for example), I am really lost because I don't know the formula.

If anybody can help, could he please reply in words (for example: "Sum up all values then divide through...", and not in a formula? I am really not good at reading formulas at all.

Thank you so much!

share|improve this question
    
how should $[40,10]$ become $[0.75,0.25]$? $\frac{40}{10} \neq \frac{0.75}{0.25}$ –  Jan Dvorak Jan 14 '13 at 6:38
1  
Shouldn't $[40,10]$ become $[0.8,0.2]$? Then it's easy - just divide each element by the sum. –  Jan Dvorak Jan 14 '13 at 6:43
    
@Jan Dvorak Thank you very much!! Can you please set your reply as an answer? –  tmighty Jan 14 '13 at 6:50
    
Answer posted . –  Jan Dvorak Jan 14 '13 at 6:52

4 Answers 4

up vote 2 down vote accepted

Why not just divide each number in your sample by the sum of all the numbers in your sample?

share|improve this answer

From the text description, it seems this is what you want:

  • calculate the sum of all elements
  • divide each element by the sum

Note that, however, then your example $[40, 10]$ normalises as $[0.8, 0.2]$, not $[0.75,0.25]$. The latter doesn't preserve the ratio of both elements.

share|improve this answer

Divide $100$ by the sum which is $80$ to get $1.25$. Then you multiply the the terms and use simple proportion where $80*1.25=100$ is proportional to one. You will get answers like $05,0.125,0.3125$ and $0.0625$.

share|improve this answer

Just divide all the numbers through by 50. Should normalise it to the scale you want 0 - 1. For example: 40/50 = 0.8 25/50 = 0.5 5/50 = 0.1

etc.

I think you get the idea!

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.