Solved

Sum of all weights equal to 1

Posted on 2011-03-22
8
783 Views
Last Modified: 2012-06-21
I have the following formula: can i add something to it to be sure that the sum of all the weight is equal to 1?
the weights are between 0.1 and 0.9:
Where N = 11 number of elements to be weighted
i = index of each element
Min = 0.1
Max = 0.9

value = min +(max - min)* (i-1.0)/(N-1)

That's shouldn't be so hard for experts no?
0
Comment
Question by:dadadude
  • 3
  • 2
  • 2
  • +1
8 Comments
 

Author Comment

by:dadadude
ID: 35190731
Found the solution:
When you use your own weight set in an interpolation procedure, you will have the option of normalizing the weights.  This means that each individual weight value (geographic multiplied by user-assigned weight) is divided by the sum of the weights assigned to all of the units being interpolated. Thus, the sum of all weights will equal one.  This option allows you to compute a population-weighted average when applied to rate data weighted by a population dataset, or by other types of count data.
http://www.biomedware.com/files/documentation/spacestat/Statistics/Interpolation/Spatial_Interpolation.htm#Normalize

Thank you. Hope that it can help other also.
0
 
LVL 31

Expert Comment

by:GwynforWeb
ID: 35195096
The principle is as follows:-

Given n values

   W1, W2, W3.....Wn

then define their sum S as

    S = W1 + W2 + W3.....+ Wn

then the values

   W1/S, W2/S, W3/S.....Wn/S

will add up to 1.

As

W1/S + W2/S + W3/S.....+ Wn/S =  ( W1 + W2 + W3.....+ Wn )/S = S/S = 1

0
 
LVL 37

Expert Comment

by:TommySzalapski
ID: 35201149
That will normalize the values for the particular set (which may be what you want) but if you want the normalization to be standardized on different sets then you should divide by max*N. That way, any set of the same size is normalized the same way so you won't give preference to some values that shouldn't get it.
0
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 
LVL 3

Expert Comment

by:InfoStranger
ID: 35204879
I was almost tricked into solving an impossible equation.  ha ha ha...  This is a trick question.

If you have N = 11 and the weight must be a minimum of 0.1, there is no way that that the sum can ever be 1.  The minimum sum of the weights would be 1.1 and no possible solution.

If N = 10, there is only one possible solution for the weights since the weight must be a minimum of 0.1.  All the weights must be 0.1.

Therefore, N needs to be less than 10 in order to have a logical equation, if the minimum is 0.1.  LOL  Good one.
0
 

Author Comment

by:dadadude
ID: 35208351
0.1      0.066666667
0.2      0.133333333
0.3      0.2
0.4      0.266666667
0.5      0.333333333

1.5      1

1.5 is the summation of 0.1 + 0.2 + 0.3 + 0.4 + 0 .5 = 1.5
u devide all the other by 1.5 and add them u'll get 1 lol
0
 

Author Comment

by:dadadude
ID: 35208360
well of course the sum will never be 1 if they are not normalized that's for sure
0
 
LVL 37

Expert Comment

by:TommySzalapski
ID: 35209622
If you want the weight to always sum to exactly 1 then you just divide each one by the sum of all of them as you mentioned.
If you want the weights to be normalized in a more standardized way, you should divide by max*N as I previously mentioned.
If you want suggestions for which to use, what application is this for?
0
 
LVL 3

Accepted Solution

by:
InfoStranger earned 500 total points
ID: 35292244
If you normalize the data as you said, your weights are the normalized data not the weights.  Which means that your weights are really meaningless.

They are just arbitrary figures.

All that means is that you randomly pick any 11 numbers sum them up and divide each number by the sum.  It will always add up to 1.  Weights are meaningless in the question.

Like what GwynforWeb said.  You new weights are Wi/S lets call that Zi.

So, now your new weights are Zi the normalized weights.  All you really did was shift all your data to fit.  Your min and max are not needed as well, since you have a new weight.  You will need to shift the min and max on the new weight to be consistent.

The question does not make sense unless you remove the minimum from the weight.
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Foreword (May 2015) This web page has appeared at Google.  It's definitely worth considering! https://www.google.com/about/careers/students/guide-to-technical-development.html How to Know You are Making a Difference at EE In August, 2013, one …
We are taking giant steps in technological advances in the field of wireless telephony. At just 10 years since the advent of smartphones, it is crucial to examine the benefits and disadvantages that have been report to us.
This is a video describing the growing solar energy use in Utah. This is a topic that greatly interests me and so I decided to produce a video about it.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question