8
$\begingroup$

Can we arrange all numbers x; such that x lies between 0 and Infinity, between 0 and 1? The scale does not have to be linear, but for any a and b in x, where a <= b, then a' and b', the equivalent numbers on the new scale must also be such that: a' <= b'.

I am really curious about this as I need it for a ratings system.

Thanks!

$\endgroup$
2
  • 2
    $\begingroup$ "The scale does not have to be linear" how fortunate! $\endgroup$
    – mdup
    Feb 17, 2019 at 19:44
  • $\begingroup$ @mdup, lol!, yeah... I have very mild requirements.... until something changes lol $\endgroup$ Feb 17, 2019 at 22:12

4 Answers 4

8
$\begingroup$

$\exp$ is a great tool, but there's also $$ x \mapsto \frac{x^2}{1+x^2} $$ which may be slightly easier to work with in some situations.

As @Servaes points out, you can also use $$ x \mapsto \frac{x}{1+x} $$ because you're working on the nonnegative reals rather than all reals.

And a personal favorite of mine is $$ x \mapsto \frac{2}{\pi} \arctan(x). $$

$\endgroup$
3
  • 2
    $\begingroup$ And in fact there is no need for the squares as the function is needed on the nonnegative reals only. $\endgroup$ Feb 17, 2019 at 11:37
  • 1
    $\begingroup$ Good point. Edited. $\endgroup$ Feb 17, 2019 at 11:41
  • 1
    $\begingroup$ A slight addition could be "y=1 / (1 + M/ x)". This maps x=M to y=0.5 $\endgroup$
    – gebbissimo
    Oct 22, 2020 at 15:58
8
$\begingroup$

There are many options, one example is the function $f(x)=e^{-x}$. It maps the domain $(0,\infty)$ onto the range $(0,1)$, though it reverses the ordering. That is, if $x<y$ then $f(x)>f(y)$. This is of course easily fixed by taking $$g(x)=1-f(x)=1-e^{-x},$$ instead.

$\endgroup$
6
  • 1
    $\begingroup$ $6$ seconds before me! $\endgroup$ Feb 17, 2019 at 11:31
  • 1
    $\begingroup$ Are you sure this satisfies the second requirement? $\endgroup$
    – Keatinge
    Feb 17, 2019 at 11:33
  • 2
    $\begingroup$ Given that if $a\leq b$ then $a'\leq b'$ I think $1-e^{-x}$ should be what OP is looking for. $\endgroup$
    – Infiaria
    Feb 17, 2019 at 11:34
  • $\begingroup$ a=0, b=1 is a counterexample though, right? $\endgroup$
    – Keatinge
    Feb 17, 2019 at 11:35
  • 1
    $\begingroup$ Wow, I . am impressed with the dexterity and eagerness here. Thanks so much for helping out! I have to accept the other answer by @John Hughes, though. Because I need the answers not to converge too quickly towards 1. Thanks all the same! $\endgroup$ Feb 17, 2019 at 11:56
2
$\begingroup$

The expression you are looking for is a one-to-one mapping from positive reals into $[0,1]$. Consider the exponential mapping $f_k(x) = exp(- (x^k))$. Other people suggested $f_2$. There exist other mappings.

$\endgroup$
0
$\begingroup$

You can use $$g(x) = 1-2^{-x},$$ and any numbers between 0 and Infinity will be mapped to between 0 and 1.

I'm not very well versed in what's covered in the rest of the answers, so this may have already been stated a different way, but this is here if it hasn't.

$\endgroup$

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.