Linear regression angle too large

54 Views Asked by At

Am trying to find linear regression slope (angle) of a line with the following set of coordinates.

x axis    y axis 
123.4415,  5
123.4414,  4
123.4413,  3
123.4412,  2
123.4411,  1

the slope am getting is: 9999.9238554096.. Is it possible to have such an angle? or what am i missing about linear regression?

1

There are 1 best solutions below

2
On BEST ANSWER

The points are exactly aligned and the relation is $$y=-1234410+10000\,x$$ $10000$ is not an angle (as you wrote, it is just the slope). Concerning the angle $$\tan^{-1}(10000)=\frac \pi 2-\tan^{-1}\left(\frac 1{10000}\right)$$ Now, you can easily approximate the last term using Taylor series of $\tan^{-1}(x)$ for $x$ close to $0$.

This should give you (more or less) $$\tan^{-1}\left(\frac 1{10000}\right)=\frac{299999999}{3000000000000}$$ corresponding to an "almost" vertical line (just as a scatter plot of the data would show).