How to find relationship between 2 variables?

Sparsh

New member
Joined
Apr 29, 2019
Messages
1
I have 2 variables 'i' and 'z'. The value of z depends on the value of i as:

If i=6, z=7
If i=7, z=5
If i=8, z=3
If i=9, z=1

How to find an equation involving i and z that satisfies all the values above for i and z?
 

MarkFL

Super Moderator
Staff member
Joined
Nov 24, 2012
Messages
1,823
It appears that every time \(i\) increases by 1, \(z\) decreases by 2, so a linear relationship would work. Can you state the slope of such a line?
 

Jomo

Elite Member
Joined
Dec 30, 2014
Messages
3,656
So z = -2i +??
 

HallsofIvy

Elite Member
Joined
Jan 27, 2012
Messages
5,044
Given any "n" values, there exist a unique polynomial of degree n-1 or less that gives those values. Here you are given 4 values so there exist a unique polynomial of degree 3 or less such, which we can write as \(\displaystyle z= ai^3+ bi^2+ ci+ d\). The four given values give four equations to solve for a, b, c, and d:
216a+ 36b+ 6c+ d= 7
343a+ 49b+ 7c+ d= 5
512a+ 64b+ 8c+ d= 3
729a+ 81b+ 9a+ d= 1

Of course, here that's overkill. Solving those equations we quickly find that a and b are 0.
 
Top