How to represent a ranked number as a percentage?

4.1k Views Asked by At

I couldn't do better with the title so let me try and explain:

Say I have two numbers: items and rank.

items is the number of items in a sorted list.

rank is the rank of the item I'm concerned with.

If items=8 and rank=1, I would like the percentage to be 100%.

If items=8 and rank=8, I would like the percentage to be 0%.

What should the percentage be if items=8 and rank=3? I want to be able to figure this out for any rank.

I would greatly appreciate a solution with an explanation, and a name for what this concept is called.

Thank you.

1

There are 1 best solutions below

3
On BEST ANSWER

Sounds like percentile to me. Use linear equation. Let x=rank, y= percentage. We have two points: $(1,100)$ and $(8,0)$. Slope is then $\frac{0-100}{8-1}=\frac{-100}{7}$. Then use point slope form $y-0=\frac{-100}{7} (x-8)$. This gives the linear equation. Now plug $x=3$ into it, you will get the percentage when rank=3, which is 71.57.