1
$\begingroup$

I have some data which looks like this:

I get a number in the -6/+4 range and I need to express it with percent. If I get 4 of course the result is 100%, If I get -6 is 0%, etc.

Is there a quick formula I can use to obtain the percent value of, say, -3.25?

$\endgroup$
  • $\begingroup$ I'm not sure if got the question, but your interval can be shifted in the interval $[0,10]$, now you multiply by $10$ and you get the percentage. Summarizing, take $x\in [-6,4]$ then your percentage is $((x+6)\cdot 10 )\%$. $\endgroup$ – Bman72 Jan 13 '15 at 12:18
  • $\begingroup$ Say I have a -4.5/+4.5 range and I get a 0 value. Shouldn't that be equal to 50%? With you formula I get 45%. Am I doing something wrong? $\endgroup$ – JessyP Jan 13 '15 at 12:31
0
$\begingroup$

For $x \in [-6, 4]$ the function $$p(x) = \frac{x+6}{10}$$ is what you are looking for. You should note however that this gives numbers between $0$ and $1$. If you want the actual percentages, just use the function $$q(x) = p(x) * 100 = 10 (x + 6)$$ instead.

In general for an interval $[a, b]$ you can use the formulas $$p(x) = \frac {x-a} {b-a}$$ and $$q(x) = 100 * p (x) = 100 * \frac {x-a} {b-a}$$

$\endgroup$
  • $\begingroup$ Please see my comment to the original question, how does this work in the case of a 0 value in a -4.5/+4.5 interval? $\endgroup$ – JessyP Jan 13 '15 at 12:35
  • $\begingroup$ @JesseP I edited my answer to include the formulas for the general case. $\endgroup$ – GenericNickname Jan 13 '15 at 12:44
  • $\begingroup$ that's it, thank you. $\endgroup$ – JessyP Jan 13 '15 at 13:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.