# various weighted values as a percentage of 100

If I have various values, $x,\, y,\, z,\, t$. And I want to give each of these values a weight such as $x(30),\,y(10),\,z(40),\,t(20)$. This weight relates to that values part off $100\%$, so if each value was the most it could be and we added all values it would be 100. How can I make this type of equation ? for example in the event that $x$ was $50\% x = 30$, y was $100\%y = 10$, and $z$ and $t$ are $50\%$ I could get a score of $80$.

So basically I want the answer to be a value less or equal to $100$ were the values that are added to get the score are weighted and take up different portions of the overall score.

If you split a number $s$ into 4 parts with relative proportions $x:y:z:t$ you get $\frac{xs}{x+y+z+t}$, $\frac{ys}{x+y+z+t}$, $\frac{zs}{x+y+z+t}$, and $\frac{ts}{x+y+z+t}$.
It is obvious that these numbers are simply $x,y,z,t$ multiplied by $\frac{s}{x+y+z+t}$, so they have the right proportions. Their sum is $\frac{xs+ys+zs+ts}{x+y+z+t} = \frac{(x+y+z+t)s}{x+y+z+t} = s$ as required.
• @dmnte Are these four independent values also in the range 0-100? If so, just take their weighted average: $(w_1x+w_2y+w_3z+w_4t)/(w_1+w_2+w_3+w_4)$. If not, you'll have to scale those independent values first to make them fall in that 0-100 range before taking the weighted average.. – Jaap Scherphuis Nov 29 '17 at 7:47