# Source of error in Linear Regression?

Suppose we are given n data points (observations) for random variable Y and variable X. We are to find regression equation of Y on X. As I’ve read these given values of Y (observations) are realisations of random variable Y, that is, for a given X=a we have picked one value of Y=b by chance from many values of Y at that level of X.

Now suppose the regression equation after finding m and n through method of least squares comes out to be,

Y = mX + n + E , where calculated values of m and n can be substituted

My doubt is, whats the source of error? As in if this error came from the fact that Y is random and for every value of X we put in we can expect values of Y in a range

OR, the error is due to the fact that one straight line cannot determine value of Y accurately, when there are many data points. (to elaborate, suppose the purely mathematical problem of having to fit a straight line through n distinct 2-D tuples through least squares method. The error in straight line thus obtained is solely due to the fact that one straight line cannot accurately determine many distinct points.)

• Could you explain what you mean by "error"? In many (probably most) applications $E$ isn't any kind of error or mistake at all: it simply represents deviations between a line and the data.
– whuber
Jan 21 at 16:17