Given two variables and their ranges, get a third value.

116 Views Asked by At

I'm building a model but I got stuck at this:

I have $x,y$ whose ranges are ($10,000$ to $2,000,000$) and (1 to 36) respectively. Also I have a z that ranges from 16 to 30. I know their relations in certain cases. I know that when:

Case 1: $X=10,000$ and $Y=1$ then $Z=16$ //When $X$ and $Y$ are at their lower ranges, then $Z$ is at it's low

Case 2: $X=2,000,000$ and $Y=36$ then $Z=30$ //When $X$ and $Y$ are at their top ranges, then $Z$ is at it's top

Case 3: $X=1,005,000$ and $Y=18.5$ then $Z=23$ //The middle

Given this how could I make an equation system correctly that given $X$,$Y$ I get $Z$?

I tried using case 1 and 2 for a two variable solution (using $Z$ as a constant, didn't worked), then I tried using the three cases as equations but the same. Don't know if this is too low level for this site but google searches gave me no clue.

1

There are 1 best solutions below

7
On BEST ANSWER

Basically, you have these two points (we don't need the 3rd)

$(10000,1,16)$ and $(2000000,36,30)$

you can think of it this way:

$$z = \alpha x + \beta y$$ $$16 = \alpha * 10000 + \beta $$ $$30 = \alpha * 2000000 + \beta *36$$

Solve for $\alpha$ and $\beta$ ($\frac{-273}{820000}$ and $\frac{1585}{82}$ respectively I think)

Then, you're done.