# Calculating the weighted average with a minimum

average

I'm looking for a way to calculate the weighted average of a range of numbers, but where the lowest need to be 5% (and thus the total still needs to be 100%).

Let me try to explain:

[
0.98077,
0.99038,
0.99279,
0.99279,
0.99519
]


Weighted average is simple:

total = +- 5


The problem I'm having with this is that there is too little difference to differentiate between a good and the best. They're all the same (on a piechart).

So what I was thinking is: Let's assume the minimum = 5%.
So: 0.98077 = 5%

But how to display this on the piechart? How can I calculate the other percentages?

Though their relative sizing should stay the same.

In this way I'm hoping that you will see a bigger difference.

I was thinking to remove the minimum from all of them:

[
0.0
0.009610000000000007,
0.01201999999999992,
0.01201999999999992,
0.014419999999999988,
]


But then I'm getting as weighted average:

[
0.0,
0.19991678801747537,
0.25005200748907763,
0.25005200748907763,
0.2999791970043694,
]


Which is already closer to what I need as now the differences are much better visible. However, the 0% isn't visible anymore.

So this part I want it to be 10%.

This is how it looks when drawing in excel. It's very visible the minimum is not as good as the others.

Thanks!

numbers = [1, 2, 3, 4, 5]

total = 15

set specific number (e.g. 1) to be a certain weight e.g. 10%

Now you have 90% left to distribute among a total of 15-1=14

Now redistribute the weights for the remaining numbers:

[0.10 (10% for the first number), 2/14 * 0.9, 3/14 * 0.9, 4/14 * 0.9, 5/14 * 0.9]

Is this what you want?