I have a set of numbers $S$, and for each $s_i\in S$, $0\lt s_i \lt 1$. I would like to transform them so that they sum up to $1$.

An obvious way to do it is to calculate $t_i=\frac{s_i}{\sum_i{s_i}}$, so that $\sum_i{t_i}=1$. I wonder if there is any other way to achieve the same effect, and what are the differences between them.


A little generalization of this would be: $t_i=\frac{f(s_i)}{\sum f(s_i)}$ with $\sum f(s_i)$ not equal to zero. $f$ would allow you to "bend" $S$ (give different weights).

| cite | improve this answer | |
  • $\begingroup$ I almost updated the same. I am deleting my post. $\endgroup$ – vinux Jan 10 '12 at 16:05
  • $\begingroup$ @Arthur, thanks for the generalization, could you please elaborate with an example for what you mean by "bending" the set $S$? Appreciated. $\endgroup$ – MLister Jan 10 '12 at 16:07
  • 2
    $\begingroup$ +1. But the "little generalization" is too general: given any target set of values $t_i$ (summing to unity), you can find such an $f$ for which each $s_i$ is transformed into $t_i$, effectively losing all information about the original $s$'s. Normally, then, we restrict $f$ to be positive, continuous, and strictly monotonically increasing so that at least the order of the original sequence is preserved. $\endgroup$ – whuber Jan 10 '12 at 16:57
  • $\begingroup$ MLister, some illustrated examples of such re-expressions appear at stats.stackexchange.com/a/10979. When $f$ is linear (with zero constant term), its effect is identical to your "obvious" formula. When $f$ is nonlinear, it expands or contracts the differences between the $t_i$ by different amounts: this is the "bending" Arthur refers to. $\endgroup$ – whuber Jan 11 '12 at 13:17
  • $\begingroup$ @whuber that's true. However it really depends on what you're looking for. You could imagine that $s_i$ is the proportion of women in profession $i$, and use $f(x)=|x-0.5|$ as the "distance from perfect diversity". Moreover, nothing in the question forbids choosing $f=1_{\mathbb{Q}}$, although I agree my generalization is not "little" at all. $\endgroup$ – Arthur Jan 11 '12 at 14:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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