0
$\begingroup$

Considering the following dataset, how do I find the angle when the two lines intersect at time 4. Please not that the two lines don't represent a function, this is just a data set.

Time     Line 1     Line 2 0        20         19.95 1        20.5       20 2        21         20.05 3        20.5       20 4        22         23 5        23         25 

Thanks for the help!

  • 0
    "we can consider that line 1 and line 2 are straight lines between Time 3 and Time 4" - then I suppose you can *interpolate* instead of *regressing*...2011-05-06

1 Answers 1

2

Use Ordinary Linear Regression to fit each data set to a line, and pay attention to the slope of the two lines. Then use arctan to extract the angle. Alternatively, parametrize the two lines and use the dot product to find the angle.

  • 0
    Note that the "angle" will depend on the units of measure for the vertical and horizontal/time axes. Taking these units to be consistent with the tabulated values, and assuming the question is narrowed as the last comment from Martin indicates, to the straight line intersection between Time 3 and Time 4, then the first line has slope 1.5 there and the second line slope 3. The difference in angles is then arctan(3) - arctan(1.5), or roughly 15.25 degrees (0.266252... radians).2011-05-06