How would I get the percentage of a value, but in relation to other values?

40 Views Asked by At

So to calculate the percentage, you would do:

(val/total)*100

However, I want to get a percentage based off some form of a scale since I want to calculate a percentage to show rarity of an animal based off its population. The number 10million is extremely high in comparison to other animal populations but is nothing in comparison to the total population - leading to a low % value.

I want for the animal with 10m population to have a high % such as 95%, as it is a very high population in comparison to other populations - but an animal with 1000 population should have a low % like 5%.

I thought about a normal distribution and calculating area underneath the graph but the problem still persists as the mean is extremely high for the majority of animals population - but has been made extremely high due to some outliers making it a lot higher.

I thought about coming up with a percentage based off the highest value, but for example, using:

highest_val = 10,200,000
(population/highest_val)*100

a population of 100,000 comes out with a value of 0.98%, but in reality a population of 100,000 in a single country isn't that rare and should be nearer to around 50%.

1

There are 1 best solutions below

0
On

I ended up plotting points on an exponential graph with the y axis being percentage and the x axis being the population. So using the points

(1, 10200000)
(100, 1)

and forming an equation,

x = $\log_{b}{\frac{y}{a}}$
where b = $\sqrt[99]{\frac{1}{10200000}}$
and a = $\frac{10200000}{b}$

This allows for me to take into account values that are extreme in comparison to the mean - and get a percentage which takes into account the other values.