Take a look at this applet.
Sometimes a relationship between two variables and is given in the form of a table of observations (measurements). If these points seem to lie (roughly) on a straight line, then you can set up a corresponding linear model. This comes with a linear function of the form .
If the line passes through and , then you can determine the linear formula as follows:
increases with ;
increases with ;
if therefore increases with , then increases with ;
the gradient of the line is therefore ;
the required formula is then ;
has to lie on the line, therefore , so .
The formula of the line is: .