2. Forecasting
We will look at four different forecasting methods
1. Naive
2. Weighted Moving Average
3. Exponential Smooth
4. Linear Trend
In addition, we will look Forecast Accuracy
● MAE
● MSE
3. Naive
Naive is a quick and easy, but not highly accurate forecast. Sometimes the Naive
is used in teaching examples to start another forecast method.
Simply you assume that the forecast for the next period will be the same as the
current period.
If in January sales where $200,000, then February sales are forecasted at
$200,000.
Naive is responsive but not smooth.
4. Weighted Moving Average
Weighted averages are used to smooth a forecast. Smoothing removes some of
the quick reaction to one jump or dip in a forecast to maintain a long term trend
line.
To break down the parts, first let us look at the “average”. The average is just the
sum divided by how many periods the forecast covers. For example if we have 3
months sales of $120K (March), $110K (February), and $100K (January) our
average would be $110K.
● Average = (120+110+100)/3 = 110
The Moving part is we always look at the most recent months. As a new month is
add an old month drops off of the back end.
5. Weighted Average
Alternatively, we could write the average as
● Avg = ⅓*100 + ⅓*110 + ⅓*120 = 110
The ⅓ is a weight. For a straight average we assign the same weight to each
number. For a weighted forecast, we assign different weights. We typically assign
the most current month a greater weight.
WA3 = (.2)100 + (.3)110 + (.5)120 = 123
● The three in the subscript denotes a 3 month Weight Average
● Most recent month, March given the greatest weight.
6. Exponential Smooth
Exponential Smooth introduces the statistical concepts of “error”, “Alpha” (𝜶 -
symbol for alpha), and subscript notation.
In statistical terms, Error is the difference between actual and estimated value and
is often expressed as a percentage (5%).
● Errort = At - Ft
For example, if we forecasted March Sales as $17,000 and at the end of March we
added up transactions a post actual sales of $20,000, then we had an error of
$3000 or 15%. Error can be positive or negative.
7. Exponential Smooth
Alpha is the smoothing factor
In forecasting it determines the percentage of error to be added to the next
forecast.
In general, Alpha can range from 0.1 to 1.0 (10% to 100%)
8. Exponential Smooth - Subscripts
Subscript t
Current time or period
Subscript t+1
The forecast for the next period (current time plus one)
Subscript t-1
The previous period (or current time minus one)
For example
Ft+1 = is the Forecast for the next time period
F = is the Forecast for the current time period
9. Exponential Smooth
Equation
Ft+1 = αAt + (1-α)Ft
Simplified equation
Ft+1 = αAt + 1Ft-αFt → Multiple current forecast by one minus alpha
Ft+1 = 1Ft + αAt - αFt → rearrange terms
Ft+1 = Ft + α(At - Ft) → Factor out Alpha
Ft+1 = Ft + α(At - Ft)
10. Exponential Smooth
Example, Find the forecast for May using Exp Smooth
Alpha is 0.5
Naive Forecast is used to get process moving, organizations would have historical data
May’s Forecast is $17,156
Month Sales Naive Error Exp Smooth
Jan 16,250
Feb 17,000 16,250 750
Mar 20,000 3,375 16,625 =16250 + 0.5*750
Apr 16,000 -2,313 18,313 =16625 +
0.5*3375
May 17,156
11. Linear Trend
Linear Trend is the mathematical relationship between demand and some other
factor that causes demand. When demand displays a trend over time then a linear
trend model can be used to forecast demand. Demand may be revenue or a stock
price.
Y = mt + b (in statistics textbooks → T1 = b0 + b1t)
Y is the forecasted demand for period t
t is the time period (x is used for regression)
m is the slope of the line (rise over run)
b is the y-axis intercept
12. Linear Trend
We must calculate the following values for the Linear Trend
M - Slope calculated using least squares formulas
Sub-caluclations tY, t2, ΣtY, Σt2, tbar (t average), ybar (y average)
B - the slope intercept
Sub-calculations tbar and ybar from above
13. Linear Trend
Simple Example of 4 months worth of revenue
(in millions)
Month (t) Revenue (Y)
Jan 14
Feb 18
Mar 17
Apr 22
Start by setting up a table for calculations
t is the month of revenue (1st month, 2nd
month, and so on), y is revenue, tY is
multiplication and t2 is the square of t.
Next create a row for summation (sigma)
and average (tbar, ybar)
Month Revenue
t Y tY t2
1 14
2 18
3 17
4 22
Sum
Avg
14. Linear Trend
Table Calculations
Month Revenue
t Y tY t2
1 14 14 1
2 18 36 4
3 17 51 9
4 22 88 16
Sum 10 71 189 30
Avg 2.5 17.75 47.25 7.5
Month Revenue
t Y tY t2
1 14 =B3*C3 =B3^2
2 18 =B4*C4 =B4^2
3 17 =B5*C5 =B5^2
4 22 =B6*C6 =B6^2
Sum =SUM(B3:B6) =SUM(C3:C6) =SUM(D3:D6) =SUM(E3:E6)
Avg =AVERAGE(B3:B6)
=AVERAGE(C3:C6
)
=AVERAGE(D3:
D6)
=AVERAGE(E3:
E6)
15. Linear Trend
Table ∑ty is the sum of the ty column, 189
Ybar is average of the Y column, 17.75
tbar is average of t column, 2.5
∑t2 is the sumof t2 column, 30
(tbar)2 is avg of tbar column squared , 2.52 = 6.25
n is the number of months in forecast, 4
Month Revenue
t Y tY t2
1 14 14 1
2 18 36 4
3 17 51 9
4 22 88 16
Sum 10 71 189 30
Avg 2.5 17.75 47.25 7.5
16. Linear Trend
Calculate the slope of the line
M = (∑ty - n*Ybar*tbar) / (∑t2 - n* t2
bar )
M =(D7-B6*B8*C8)/(E7-B6*B8^2)
Plug in numbers
M = (189-4*2.5*17.75)/(30-4*6.25)
M = 2.3
From Table
∑ty is the sum of the ty column, 189
Ybar is average of the Y column, 17.75
tbar is average of t column, 2.5
∑t2 is the sum of t2 column, 30
(tbar)2 is avg of tbar column squared , 2.52 = 6.25
n is the number of months in forecast, 4
17. Linear Trend
Calculate b, the intercept
Y = mt + b, so solve for b
b = Ybar - mtbar
b = C8-C10*B8
Plug in the numbers
b = 17.57 - 2.3 * 2.5
b = 12
From Table
∑ty is the sum of the ty column, 189
Ybar is average of the Y column, 17.75
tbar is average of t column, 2.5
∑t2 is the sum of t2 column, 30
(tbar)2 is avg of tbar column squared , 2.52 = 6.25
n is the number of months in forecast, 4
m is 2.3
18. Linear Trend
Let’s make a forecast!
Y= mt + b
Y = 2.3t + 12
What is the forecast May (month 5) and June (month 6)?
Ymay = 2.3(5) + 12 = 23.5
Yjune = 2.3.(6) + 12 = 25.8