Given that the trend line is straight, find the slope by selecting any two points and calculating:
(A) slope = (y1-y2) / (x1-x2)
Then you need to find the offset for the string. The line is given by the equation:
(B) y = offset + tilt * x
So you need to decide for the offset. Select any point on the line and decide to offset:
(C) offset = y / (tilt * x)
Now you can connect the slope and offset in linear equation (B) and have an equation defining your line. If your line has noise, you have to decide the averaging algorithm or use some kind of approach.
If your line is not straight, you will need to study Curve fitting or Least Square Fixing - non-trivial but skillful. You will see various types of fittings at the bottom of the webpage with the least squares (exponential, polynomial, etc.), if you know what shape you want.
Also, if it is a one-time use Excel.
-Adam
Adam Davis Sep 04 '08 at 6:07 2008-09-04 06:07
source share