It is a common scenario: A practitioner has sales data for the past several months and wants to forecast next month's sales volume. This type of forecasting can help manufacturers and distributors ensure they have enough product to meet customer demands. But how is this forecasting done? Statistical analysis software offers two ways to plot the data in order to make a forecast: 1) a linear trend model or 2) a quadratic trend model. It is important for practitioners to understand both methods, as each can be beneficial, depending on the type of process being analyzed.
Part 1 - Linear Trend
The following explanations use the sample data shown in Table 1.
Table 1: Sample Volume Data
Month
Volume
Jan. 2009
98
Feb. 2009
105
March 2009
116
April 2009
119
May 2009
135
June 2009
156
July 2009
177
Aug. 2009
208
To begin, use statistical analysis software to create a time series plot with a linear trend analysis (Figure 1).
Figure 1: Trend Analysis Plot for Volume - Linear Trend Model
The software will generate a fitted line using the equation Yt = 71.43 + (15.1 x t). The t represents the time period during which each data point was collected - i.e., the first time period is 1, the second is 2 and so on. Hence, if someone wants to know the fitted value for January 2009, it is 71.43 +15.1*(1) = 86.53.
Table 2: Fitted Values for Past Months
Month
Volume
Fitted Value
t
Jan. 2009
98
86.53
1
Feb. 2009
105
101.63
2
March 2009
116
116.73
3
April 2009
119
131.83
4
May 2009
135
146.93
5
June 2009
156
162.03
6
July 2009
177
177.13
7
Aug. 2009
208
192.23
8
To forecast for September 2009, the practitioner would get 207.33 (71.43 + (15.1 x 9)).
But how does the software get the equation Yt = 71.43 + (15.1 x t)? It is nothing but linear regression. If practitioners used the linear regression function in their statistical analysis software instead, using volume for Y and the t (1, 2, 3, 4, etc.) for X they would get the same equation:
Regression Analysis: Volume versus t The regression equation isVolume = 71.4 + 15.1 t
Predictor Coef SE Coef T PConstant 71.429 8.626 8.28 0.000t 15.071 1.708 8.82 0.000
S = 11.0701 R-Sq = 92.8% R-Sq(adj) = 91.7%
Analysis of Variance
Source DF SS MS F PRegression 1 9540.2 9540.2 77.85 0.000Residual Error 6 735.3 122.5Total 7 10275.5
Another potentially confusing element of the linear trend plot is the forecast accuracy measures: MAD, MAPE and MSD. These are used to determine how well the trend will accurately predict the future volume.
MAD
MAD stands for mean absolute deviation, which is the average of the absolute deviations. An absolute deviation is the absolute value of the actual data minus the fitted value (Table 3).
Table 3: Sample Data Including Absolute Deviation
Month
Volume
Fitted Value
t
Absolute Deviation
Jan. 2009
98
86.53
1
11.47
Feb. 2009
105
101.63
2
3.37
March 2009
116
116.73
3
0.73
April 2009
119
131.83
4
12.83
May 2009
135
146.93
5
11.93
June 2009
156
162.03
6
6.03
July 2009
177
177.13
7
0.13
Aug. 2009
208
192.23
8
15.77
Sum
62.26
n
8
MAD
7.7825
Table 4: Forecast Using Last Month's Volume
Month
Volume
Fitted Value
t
Absolute Deviation
Jan. 2009
98
80
1
18
Feb. 2009
105
98
2
7
March 2009
116
105
3
11
April 2009
119
116
4
3
May 2009
135
119
5
16
June 2009
156
135
6
21
July 2009
177
156
7
21
Aug. 2009
208
177
8
31
Sum
128
n
8
MAD
16
The MAD value allows the practitioner to conclude that the model generated by linear regression is better than the model generated by last month's volume.
MSD
The linear trend plot also uses the accuracy measure MSD, which stands for mean square deviation. It is very similar to MAD, but instead of summing the absolute deviations, this measure sums up the squared deviations (Table ...