# Formula to generate a score from 1 to 100 based on 2 percentages?

I am trying to come up with a formula that will result in a score of 1 to 100 (never anything lower or higher). I have two numbers that I can use to come up with this score, a specific percent and an average percent (from all of the others in the set).

The score would essentially not be able to reach the upper or lower bounds, just get infinitely closer. The idea would be to assign a score of 50 if the specific percent matched the average percent, and scale from there. I know I've done something like this in the past, but I've been racking my brain off and on all day and haven't been able to come up with anything. Any ideas?

Edit: I forgot to mention the most important part. The percentages will for the most part be between 0.01% and 2.0%. So the average could be something like 0.42%, etc.

-

Do you need to come up with the function before you have the data, or can you look at the whole data set before choosing the function? If you have all the data, percentiles sound like they do what you want.

If you can't examine the data in advance, it would still help to have some idea of the scale. For example the specific scores might always stay within +-10% of the average, or they might range by a factor of 1000. If you choose a function that keeps the ones a factor of 1000 within bounds, the ones within 10% will be very compressed. One example would be to start with the logistic function $f(t)=\frac{1}{1+\exp(-t)}$, which takes input in $(-\infty,\infty)$ and returns values in $(0,1)$. If values in (0,100) are acceptable, you could set t=(specific percent-average percent)/scale, then score$=\frac{1}{1+\exp(-t)}$, choosing scale to reflect the range of interest.

Added: with your edit, maybe setting average percent to 1% and scale to 0.5% or 1% will meet your needs. You could try some values in a spreadsheet and see what you think.

Added2: that is why I talked about the scale factor, as your values are so close arithmetically. If scale$=1, t=0.003-0.0042=-0.0012$ and score$=0.4997$. But maybe you should use a scale of $0.001$. Then $t=-1.2$ and score$=23\%$. An idea how this works using average$=0.0042=0.42\%$, scale$=0.1\%$ is (all amounts in percent-the percent signs ruin the formatting) $$\begin {array}{c c} raw & score \\ 0.00 & 1.48 \\ 0.10 & 3.92 \\ 0.20 & 9.98 \\ 0.30 & 23.15 \\ 0.40 & 45.02 \\ 0.50 & 69.00\\ 0.60 & 85.81\\ 0.70 & 94.27\\ 0.80 & 97.81\\ 0.90 & 99.18\\ 1.00 & 99.70 \end{array}$$

-
I must be doing something wrong, I keep getting a score of around 50 for pretty much any percent I try. Its only been 4 years since I last had a college calculus class, and now that I'm graduated and actually need this stuff I'm struggling to remember how to use it! So if in my example the mean is 0.42%, and for example my specific percent is 0.3%, would t not be 0.2? – James Simpson Jun 14 '11 at 5:29
Thank you for the very detailed answer, it was extremely helpful! – James Simpson Jun 14 '11 at 14:32

Won't normally distributing your dataset do this, anyway? Your average percent from the others in the set should be your score of 50. And no one can score any higher or lower than your bounds.

Maybe I'm just not reading you correctly.

Re your edit: The particular percentages don't matter, just fitting them to a normal distribution does. Wiki link.

If your average percentage is 0.42%, 0.42% is $\mu$ (that is, the mean, that is a score of 50) on your normal distribution.

Additional: If you can't examine the data ahead of time, Ross's would likely be the way to go.

-
Sorry, updated the question (see my edit). – James Simpson Jun 14 '11 at 5:02
@James Simpson And I've edited mine to reflect that. What you've described (unless I'm way off base) is a normal distribution, so normalizing your dataset should handle it. – Jack Henahan Jun 14 '11 at 5:04
@James Simpson In essence, what I'm saying is that you can't determine the mean unless you have the data at hand, and when you have that, you can put your data on a normal curve. By mapping your data to the curve, you have a built in scoring system. A score of 50 points occurs at $\mu$, since 50 is the mean score. Everything beyond that can be calculated with a bit of algebra. Unless your dataset is especially unsuited to the normal curve, it seems like your best option. – Jack Henahan Jun 14 '11 at 5:51