How to get the equation of relation between 2 sets of numbers

1.6k Views Asked by At

I have these two sets of number, group A : numbers from 49 to 225
and group B : from 84 to 16.

how can i conclude an equation to get the value of any number from set B (lets say 50) according to value of group A ? hope i explain my question enough.

In other way i need to change the value of group A according to value of group B (within the given limits), and actually my math knowledge is limited...

1

There are 1 best solutions below

1
On BEST ANSWER

If you're looking to map the interval from $49$ to $225$ linearly onto the interval from $84$ to $16$, in that order, then you can use the function

$$b(a) = 84 + (16-84)\cdot\left(\frac{a-49}{225-49}\right)$$

As $a$ ranges from $49$ to $225$, the value of $b(a)$ above ranges from $84$ to $16$, and does so linearly. That means, for example, that when you choose $a$ to be $\tfrac13$ of the way between $49$ and $225$, the value of $b(a)$ will also be $\tfrac13$ of the way between $84$ and $16$ (try it!).

Examples:

  • if $a=49$, then $b(49) = 84+(-68)\cdot 0 = 84$, left end
  • if $a=225$, then $b(225) = 84 + (-68)\cdot 1 = 16$, right end
  • if $a=137$, then $b(137) = 84 + (-68)\cdot(\tfrac{88}{176}) =50$, midpoint

And if you need the map to go the other way, just swap the numbers in the formula for the endpoints of the intervals (that's why I left the formula unsimplified, so you could see how the interval endpoints "feed into" the formula):

$$a(b) = 49 + (225-49)\cdot\left(\frac{b-84}{16-84}\right)$$