Statistics · Ch 4 — Time Series
Measurement of Trend: The Method of Least Squares
Measurement of Trend: The Method of Least Squares
Meaning and Principle
The method of least squares fits a straight-line trend
where is the estimated (trend) value, is the value of at , and is the trend's slope — the average change in per unit of . The line is chosen so that the sum of the squares of the deviations of the actual values from the trend values, , is the minimum possible — hence "least squares".
Coding the time variable ()
To keep the arithmetic simple, years are coded as deviations from a convenient origin so that :
- Odd number of years: take the middle year as the origin () and code the years on either side as — each unit of equals one year.
- Even number of years: there is no single middle year, so the two central years are coded and , and the rest as (the "" method) — here each unit of equals half a year.
Normal equations
With , the two normal equations of least squares reduce to:
where is the number of years in the series.
A built-in check
A genuinely useful property of the least squares line is that the trend values it produces always satisfy
Recomputing after fitting the line and confirming it equals the original is therefore a free, mechanical cross-check on the whole calculation — exactly the kind of independent second check a Gujarat board Std-12 statistics answer should show, not just the final equation.
Why it is preferred over moving averages …
A method of fitting a trend line such that the sum of squared deviations of the actual values from the trend values i …
The year (or point in time) coded as ; chosen as the middle year for an odd number of years, or the mid-point between the two central …