Statistics Majors: Ranking zero ratios

JDGiants

New Member
Joined
Nov 11, 2013
Messages
7
Probably a simple question. I am tracking a team's players donation ratio over various periods of time. Ratio is (IN) / (OUT). If I have multiple players with zero IN's, yet each with different amounts of OUT's, and I want to sort (rank) them by IN:OUT ratio, what is the best way to sort (rank) all of the players with a zero ratio? Am I off-base by simply adding 1 to all numerators of zero, and then calculating the ratio? Ultimate goal is to identify players with highest ratios. Will I lose accuracy in ranking when IN (or OUT) levels are extremely low, or conversely, extremely high? Simple example below (AdjustedRatio is numerator (IN) +1). TIA!

INOUTTrueRatioTR_RankAdjustedRatioAR_Rank
Alpha108630.00000140.001216
Alpha20510.00000140.019613
Alpha301280.00000140.007815
Alpha455000.01000130.012014
Bravo1782590.3011670.30507
Bravo2153830.03916110.041811
Bravo382020.03960100.044610
Charlie1652700.2407480.24448
Charlie2153830.03916110.041811
Charlie31397080.1963390.19779
Delta11603640.4395650.44235
Delta21394240.3278360.33026
Delta33925570.7037730.70563
Echo11,6205552.9189222.92072
Echo23,44122015.64091115.64551
Echo33925570.7037730.70563

<tbody>
</tbody>
 
Last edited:

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Hi,

Yes, you're off-base cause the ratio between 1 and 51, theoretically, will be the same as 71 and 3621 and hence will receive a higher number in your ranking.
I assume you don't want this to happen.
Solution could be to rank them on their possible ranking by using 1 as the numerator but always after you ranked all the true ratio's.
If that's a workable solution for you, try this:


Excel 2016 (Windows) 64 bit
ABCDEFG
1INOUTTrueRatioTR_RankAdjustedRatioAR_Rank
2Alpha108630140,00115917
3Alpha20510140,01960815
4Alpha301280140,00781316
5Alpha455000,01130,0113
6Bravo1782590,30115870,3011587
7Bravo2153830,039164110,03916411
8Bravo382020,039604100,03960410
9Charlie1652700,24074180,2407418
10Charlie2153830,039164110,03916411
11Charlie31397080,19632890,1963289
12Delta11603640,4395650,439565
13Delta21394240,3278360,327836
14Delta33925570,7037730,703773
15Echo116205552,91891922,9189192
16Echo2344122015,64091115,640911
17Echo33925570,7037730,703773
Sheet1
Cell Formulas
RangeFormula
F2=IF(B2=0,1,B2)/C2
G2=1+SUMPRODUCT(($B$2:$B$17<>0)*($D$2:$D$17>D2))+IF(B2=0,1+SUMPRODUCT(($B$2:$B$17=0)*($C$2:$C$17)),0)
D2=B2/C2
 
Last edited:
Upvote 0
Are you off base? Just compare alpha2 and alpha4.

The correct way to do this is to rank the non-zero IN players and *then* the zero IN players based on their OUT values.

I converted your data into an Excel table. Now, in a new column, add the formula =RANK.EQ([@TrueRatio],[TrueRatio])+SUMPRODUCT(([@IN]=0)*([IN]=0)*([OUT]<[@OUT]))

You'll get the expected results.
Probably a simple question. I am tracking a team's players donation ratio over various periods of time. Ratio is (IN) / (OUT). If I have multiple players with zero IN's, yet each with different amounts of OUT's, and I want to sort (rank) them by IN:OUT ratio, what is the best way to sort (rank) all of the players with a zero ratio? Am I off-base by simply adding 1 to all numerators of zero, and then calculating the ratio? Ultimate goal is to identify players with highest ratios. Will I lose accuracy in ranking when IN (or OUT) levels are extremely low, or conversely, extremely high? Simple example below (AdjustedRatio is numerator (IN) +1). TIA!

INOUTTrueRatioTR_RankAdjustedRatioAR_Rank
Alpha108630.00000140.001216
Alpha20510.00000140.019613
Alpha301280.00000140.007815
Alpha455000.01000130.012014
Bravo1782590.3011670.30507
Bravo2153830.03916110.041811
Bravo382020.03960100.044610
Charlie1652700.2407480.24448
Charlie2153830.03916110.041811
Charlie31397080.1963390.19779
Delta11603640.4395650.44235
Delta21394240.3278360.33026
Delta33925570.7037730.70563
Echo11,6205552.9189222.92072
Echo23,44122015.64091115.64551
Echo33925570.7037730.70563

<tbody>
</tbody>
 
Upvote 0
Are you off base? Just compare alpha2 and alpha4.

The correct way to do this is to rank the non-zero IN players and *then* the zero IN players based on their OUT values.

I converted your data into an Excel table. Now, in a new column, add the formula =RANK.EQ([@TrueRatio],[TrueRatio])+SUMPRODUCT(([@IN]=0)*([IN]=0)*([OUT]<[@OUT]))

You'll get the expected results.

Yep, works beautifully, thank you! Now, being me, I have to analyze the inner workings of your formula. I've recently started using tables in a small 'database', and this will definitely help my understanding, and use, of them. Much obliged - thanks!
 
Upvote 0
You are welcome. And, yes, it helps learn about the product if you take the time to understand how things work. :)
Yep, works beautifully, thank you! Now, being me, I have to analyze the inner workings of your formula. I've recently started using tables in a small 'database', and this will definitely help my understanding, and use, of them. Much obliged - thanks!
 
Upvote 0

Forum statistics

Threads
1,214,415
Messages
6,119,381
Members
448,888
Latest member
Arle8907

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top