How to count proportional distribution of given numbers?

853 Views Asked by At

I am trying to figure out how to count proportional distribution of given numbers - for example:

Number A: 5
Number B: 5
Number C: 5

In this case it means that the proportional distribution of each number is 33%.

But what if:

Number A: 17
Number B: 8
Number C: 59

I am trying to come up with a versatile formula (with rounding on zero decimal positions), but not successful so far.

I'd welcome every help with solving this case.

Thank you guys.

1

There are 1 best solutions below

0
On BEST ANSWER

If $x_1, x_2,\dots, x_n$ are positive real numbers, then it seems to me like the "proportion" you are looking for, $p_i$, can be calculated as

$$p_i = \frac{x_i}{\sum_{j=1}^n x_j}$$