Linear Models
We are given a table of values of x and y.
The first we need to determine is if the relationship between them is linear or not.
There are several ways to find that out. The quickest way is to try to find a pattern in the data. If that pattern is constant, we know there is a function that can be derived to find the required equation.
Please, note that for each time the x increases by 1, the y decreases by 3:
From x = 3 to x =4, y goes from y = 97 to y = 94
From x = 4 to x =5, y decreases from y = 94 to y = 91
This pattern is constant throughout all the data and allows us to say the function is linear.
Once determined the linearity between x and y, we need to find the parameters m and b of the equation of the form:
y = mx + b
Let's use any pair of points like (3, 97) and (4, 94). Substituting:
97 = 3m + b
94 = 4m + b
Subtracting both equations:
3 = -m
Or, equivalently:
b = -3
Substituting in the first equation:
97 = 3(-3) + b
Operating:
97 = -9 + b
Adding 9:
b = 106
Thus the linear model for the function is:
y = -3x + 106