Trend Estimation - Fitting A Trend: Least-squares

Fitting A Trend: Least-squares

Given a set of data and the desire to produce some kind of model of those data, there are a variety of functions that can be chosen for the fit. If there is no prior understanding of the data, then the simplest function to fit is a straight line with the data plotted vertically and values of time (t = 1, 2, 3, ...) plotted horizontally.

Once it has been decided to fit a straight line, there are various ways to do so, but the most usual choice is a least-squares fit. This method minimises the sum of the squared errors in the data series, denoted the y variable.

Given a set of points in time, and data values observed for those points in time, values of and are chosen so that

is minimised. Here at + b is the trend line, so the sum of squared deviations from the trend line is what is being minimised. This can always be done in closed form since this is a case of simple linear regression.

For the rest of this article, “trend” will mean the slope of the least squares line, since this is a common convention.

Read more about this topic:  Trend Estimation

Famous quotes containing the word fitting:

    1st Guard. Is this well done?
    Charmian. It is well done, and fitting for a princess
    Descended of so many royal kings.
    William Shakespeare (1564–1616)