Interesting (?) Property of Least Square Line Fit to Evenly-Spaced Data.



This probably isn't new or particularly noteworthy. I mention it

only because it recently occurred to me while I was detrending

(not by least squares) television audience time series data.



Consider a straight line, fit by OLS, to a sequence of evenly-spaced

points, where the Y values have a deterministic linear or nonlinear

functional relationship with the X values. The data may have noise of

uniform variance or they may be noiseless.



The definite integral of the least squares line over its range of X values

should be approximately equal to the definite integral of the function

over the same range. This is true even if the underlying functional

relationship is nonlinear, and thus even if the residuals are not randomly

distributed about the line.



Consider a noiseless sequence for a moment. The areas between line and

function above and below the line should be approximately equal, because

the sum of the residuals is zero and the data are equally spaced. The

definite integral of the function should be



I(Function) = I(Line) +AreaAboveLine - AreaBelowLine ~= I(Line)



Adding noise of uniform variance with an expected value of zero should not

alter the approximate relationship.



Results from examples are variable. Unsurprisingly, the accuracy of the

relationship turns out to be better for functions that are themselves
symmetric

about the line, but it still works roughly for very asymmetric functions.



For single variables, there are much better methods. Thought it might work,
in

the multivariate case with first-order interactions.In that context, it
could be

convenient at times.



Regards,

Larry C.


.



Relevant Pages

  • Re: Question regarding QR Factorization
    ... re-visit the columns in i & i-1 for which zero has been placed in row i. ... there is a standard problem of updating a QR decomposition ... Algorithms or Ake Bjorck's book on Least Squares. ...
    (sci.math.num-analysis)
  • Re: Solving linear system
    ... squares fit" is probably a useful search phrase. ... assignment of values to the variables, ... the left hand variables for all of the equations at ... difference from zero of the left hand sides. ...
    (sci.math)
  • Re: lsqnonlin question again
    ... the sum of the values of the residuals ... >,rather than the sum of squares add up to zero. ... > the lsqnonlin code, but this behavior is making me suspect that the ...
    (comp.soft-sys.matlab)
  • Re: lsqnonlin - any difference for myfunc() to return vector or norm(vector)^2 ?
    ... The documentation says to return a vector of residuals ... but I prefer to return the sum of squares error - is there any ...
    (comp.soft-sys.matlab)
  • Re: Zero the Hero.
    ... the mathematical concept of zero, once in the "new world" (they invented ... Cross out all the even numbers in the left hand column and the ... Draw a lattice with 3 x 3 squares for a total of 9 squares and divide ...
    (soc.culture.scottish)