Keep the relationship between two values

122 Views Asked by At

I have two variables.

$x$ represent the number of months that a human will live, and $y$ is the quality of his life for those months. I want to use these two values to get a new one.

If I do that $x = 120$ and $y = 90\%$ will be equivalent to 1 because they are the best that I human greater than 65 years old can live. I need to compute how less that than are the following pairs of values:

All of the following pairs of values will be equivalent to less than 1.

$x = 3$ and $y = 40\%$
$x = 84$ and $y = 80\%$

I've thought to multiply the pairs this way:

$$120 * 0.9 = 108$$ $$3 * 0.4 = 1.2$$ $$84 * 0.8 = 67.2$$

And after that, convert it into percentages:

If $108$ is equivalent to $100\%$, then $1.2$ will be equivalent to...

If I do it this way, will I keep the relationship between all the pairs values?

1

There are 1 best solutions below

0
On BEST ANSWER

You have a function $f(x,y)$ where you know (or declare) that $f(120, 90) = 100$.

You want $f(3, 40) <100$ and $f(84, 80)<100$. I would guess in general you want $f(x,y) < 100$ whenever both $x < 120$ and $y < 90$. There are still an infinite number of functions that satisfy that.

$f(x,y) = 100 \times {xy \over 120\times 90}$ is certainly one of them.

Another obvious one is $f(x,y) = 100 \times {x + y \over 120 + 90}$ or more generally $100 \times {ax + by \over 120a + 90b}$ for any pair of positive "weighing coefficients" $a, b$.

But you can also do some weird transformations first, e.g. some monotonic ones like $f(x,y) = 100 \times {(a \log x) \circ (b\, y^c) \over (a\log 120)\circ (b\, 90^c)}$ for some positive constants $a,b,c$ and where $\circ$ can be $+$ or $\times$.

All of these would satisfy $f(x,y) < 100$ whenever $x < 120$ and $y < 90$.

But you also need to decide what happens if e.g. $x < 120$ but $y > 90$. You also need to decide if $f()$ needs to be explicitly capped at $100$ as its max value.