5
$\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$
  • 1
    $\begingroup$ "The scale does not have to be linear" how fortunate! $\endgroup$ – mdup Feb 17 '19 at 19:44
  • $\begingroup$ @mdup, lol!, yeah... I have very mild requirements.... until something changes lol $\endgroup$ – gbenroscience Feb 17 '19 at 22:12
6
$\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). $$

| cite | improve this answer | |
$\endgroup$
  • 2
    $\begingroup$ And in fact there is no need for the squares as the function is needed on the nonnegative reals only. $\endgroup$ – Servaes Feb 17 '19 at 11:37
  • 1
    $\begingroup$ Good point. Edited. $\endgroup$ – John Hughes Feb 17 '19 at 11:41
  • $\begingroup$ A slight addition could be "y=1 / (1 + M/ x)". This maps x=M to y=0.5 $\endgroup$ – gebbissimo Oct 22 at 15:58
6
$\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.

| cite | improve this answer | |
$\endgroup$
  • 1
    $\begingroup$ $6$ seconds before me! $\endgroup$ – Peter Foreman Feb 17 '19 at 11:31
  • 1
    $\begingroup$ Are you sure this satisfies the second requirement? $\endgroup$ – Keatinge Feb 17 '19 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 '19 at 11:34
  • $\begingroup$ a=0, b=1 is a counterexample though, right? $\endgroup$ – Keatinge Feb 17 '19 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$ – gbenroscience Feb 17 '19 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.

| cite | improve this answer | |
$\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.