# Calculate percentile from ranks

I am trying to come up with a formula to calculate my percentile finish in fantasy sports games while also learning some statistics along the way. Rather than trying to work with the complete list of scores and places for each contest, I want to calculate percentile from the aggregate data they allow me to download from the site. I Googled and found several examples of determining percentile from a list of scores but not from one's finishing place in a contest.

For example:

         Contest A
Places Paid:   100
Entries:       200
My Finish:     153


I lost this contest as can be seen from the results. And intuitively I would guess I am in something like the 25th percentile, but I don't know how to write that out quantitatively or generalize it into an Excel formula that I can use on an ongoing basis. I would like to have this formula ready to see if my entries are improving, staying the same, or getting worse in terms of my percentile rank vs my opponents.

• Without the original scores, all you can do is say you are $100\times\frac{(200-153)}{200} = 23.5\%$ of the way up from the bottom. – gung Jan 25 '16 at 18:03
• Thanks, OK, that is the formula I needed just to get the percentage from the bottom. Thanks again! – jrdevdba Jan 25 '16 at 19:24
• OK, I'll make that an official answer then. – gung Jan 25 '16 at 19:36

Without the original scores, all you can do is say what percentage of the way up from the bottom of the rankings you are. Here are the general formula and your specific case:
\begin{align} {\rm percentage} &= 100\times \frac{(N_r - r_i)}{N_r} \\[10pt] 23.5\% &= 100\times \frac{(200−153)}{200} \end{align} where $N-r$ is the total number of ranks, and $r_i$ is the rank for a particular person (you, in this case).

To track your progress, I would recommend using a $p$-chart. The chart tracks your percentages of non-conforming (in your case you can use the percentage of the ranking) along with upper and lower control limits which vary based upon sample size. (This is because 25% out of 200 entries is very different than 25% of 4 entries.)

The basic chart is based upon a time series of your position and the total number or entries. The plotted point is the fraction nonconforming: $$p=\frac{np}{n}$$ where $n$ is the total number and $np$ is the number nonconforming or in your example $$.765=\frac{153}{200}$$

The centerline is then calculated as the average of all of the $p$ values: $$\overline{p}=\frac{\Sigma n p }{\Sigma n}$$
Control limits are calculated and plotted for each unit of time. The formula is: $$CL=\overline{p}\pm \frac{3\sqrt{\overline{p}\left(1-\overline{p}\right)}}{\sqrt{n}}$$ Control limits are at a default of $\pm 3 s$; if you would like to plot limits at each standard deviation away from the centerline, simply multiply the previously calculated control limits by $\frac{1}{3}$ and $\frac{2}{3}$ or by simply changing the leading $3$ in the fraction to nothing or a 2, depending on if you want to plot one or two standard deviations away.
In your case, you would like to improve from where you are now and not maintain some constant score. As a result, having data points "out of control" or in a definite trend in a desired direction would be a good thing. Once you are playing at a level you want to maintain, you should recalculate your $\overline{p}$and move forward from that point.
If you would prefer to use a fraction conforming chart, simply subtract the above values from $1$.