Time Series Trend Calculator公式

## How to Estimate a Time Series Trend

### Method

Fit a least-squares regression line Y = a + b*t where t is the time period (1, 2, 3, ...). The slope b is the average change per period. The intercept a is the estimated value at t=0. Extrapolating the line gives forecasts for future periods.

**Slope b = [n*Sum(t*y) - Sum(t)*Sum(y)] / [n*Sum(t^2) - (Sum(t))^2]**

计算示例

Five periods with values 100, 108, 115, 120, 130.

  1. Sum(y) = 573, Sum(t) = 15, Sum(t^2) = 55
  2. Sum(t*y) = 1*100 + 2*108 + 3*115 + 4*120 + 5*130 = 1791
  3. Slope = (5*1791 - 15*573) / (5*55 - 225) = (8955-8595)/50 = 7.2
  4. Intercept = (573 - 7.2*15)/5 = (573 - 108)/5 = 93
  5. Forecast for period 6: 93 + 7.2*6 = 136.2