# How does 'Top n% this week' work with Reputation league?

On my Android.SE profile, `top 2% this week` is displayed in Reputation box:

But, when I click it, I found that my week rank is 1:

So, how does this `n%` work?

• Looks like its broken for Chance and Richard Borcsik as well if the accepted answer to this question is to be believed Mar 22, 2012 at 17:31
• @ConradFrix Means, I can add `bug` tag.. Mar 22, 2012 at 18:02
• Its not broken. See my answer. I have removed bug tag.. Mar 23, 2012 at 14:44

There were only 104 users with rep changes this week, so that works out (with rounding) to the top user being the top 2%, the text is correct.

• It was really broken. Now, it has been corrected with `top 0.96% this week`. Mar 23, 2012 at 12:15
• From answer of this question, (1/104)*100 returns 0.96% after round off. Here, 1 is rank & 104 is no. of users having rep change.. Mar 23, 2012 at 12:17
• So, remove `status-bydesign` moderator tag from question, please. Mar 23, 2012 at 12:52
• FYI, when this question was first posted, the rep leagues showed 91 people with rep gain. I think top 2% was correct with regard to that number (it would put you right on the edge between top 2% and top 1% if I'm thinking about this correctly). I meant to post an answer at that time, but I forgot =) Mar 23, 2012 at 13:13
• @jadarnel27 still, its bug because exact value is 1.098% which rounds off to 1%, not 2%. Mar 23, 2012 at 13:20
• @SachinShekhar - that's not a bug, it rounds up intentionally, doing otherwise would be incorrect. Mar 23, 2012 at 14:01
• @NickCraver Now, I get it (see my answer). But, you've confused me after calculating it with 104 users (with 104 users, it would be 0.96%)! Mar 23, 2012 at 14:53

Now, I get it. At this time situation is:

Calculating it is easy with this formula: (Rank/No. of Users with Rep Change)*100%
Rank=1; Users with Rep Change in week=104
So, (1/104)*100% = 0.96% (after round off)

At the time I asked question, users with rep change were 91. After applying this formula & rounding off after considering percentile rank, it was 2%. I am attaching @balpha's comment here (which explains more):

The top 2%, by definition, are the users whose rep change is above the 98th percentile. The top 1% are those above the 99th percentile. At 98.9, your rep change is below the 99th percentile, but above the 98th. Thus, you're in the top 2%, but not in the top 1%.

• Not a bug. At the time you posted this, you were 1/91 = 1.09%. 100-1.09 gives you 98.9, so you were still just within the top 2%. It only gets more specific than whole numbers once you get below 1%. Mar 23, 2012 at 13:15
• Nearest rounded no. is 1, not 2. Mar 23, 2012 at 13:23
• @SachinShekhar - We're talking percentiles here, rounding down is incorrect...so we round up very intentionally (there's literally a line of code that does this). If on your SAT you rounded a 99.9% to 100% it would not be correct, you score better than 99% of people, yes, but you did not score better than 100%. Mar 23, 2012 at 14:01
• @NickCraver Looks reasonable if its percentile. But, why is `%` symbol used? Mar 23, 2012 at 14:35
• The top 2%, by definition, are the users whose rep change is above the 98th percentile. The top 1% are those above the 99th percentile. At 98.9, your rep change is below the 99th percentile, but above the 98th. Thus, you're in the top 2%, but not in the top 1%.
– balpha StaffMod
Mar 23, 2012 at 14:52
• @balpha Thanks.. I have added you comment in answer. Mar 23, 2012 at 15:02