Professional Documents
Culture Documents
(W-3-2) SI-5101 Forecasting (2021)
(W-3-2) SI-5101 Forecasting (2021)
SI-5101
Engineering Analysis
Forecasting
BIEMO W. SOEMARDI
b.soemardi@itb.ac.id
Scatter Diagram
02
Agenda and Time Series
Measures of Forecast
Forecasting 03 Accuracy
Time Series
04 Forecasting Models
Monitoring and
05 Controlling Forecast
2
01
Review
Forecast
Concept
24/08/2021 SI-5101 ANALISIS REKAYASA – Ir. Biemo W. Soemardi Ph.D 3
Principles of Forecasting
• Perfection is rare. There’ll be some error
• Forecast for grouped data is better (more accurate)
than for individual items
• Shorter-term forecasting is better than longer time
periods
• Qualitative forecasting techniques are used when past data are not available.
These techniques are subjective, based on the opinion and judgment of
consumers, experts. Educated guess
24/08/2021 SI-5101 ANALISIS REKAYASA – Ir. Biemo W. Soemardi Ph.D 5
Principles of Forecasting
QUANTITATIVE QUALITATIVE
Qualitative Causal
Models Time-Series Methods
Methods
Delphi Moving
Methods Average Regression Analysis
Consumer
Decomposition Figure 5.1
Market Survey
24/08/2021 SI-5101 ANALISIS REKAYASA – Ir. Biemo W. Soemardi Ph.D 7
Time – Series
Models
• Time-series models attempt to predict the future based on the past
• Common time-series models are
• Moving average
• Exponential smoothing
• Trend projections
• Decomposition
Scatter Diagram
and Time Series
24/08/2021 SI-5101 ANALISIS REKAYASA – Ir. Biemo W. Soemardi Ph.D 12
Scatter
Diagram
Scatter diagrams are helpful when forecasting time-series data because they depict
the relationship between variables.
450
400
350
Annual Sales
300 Televisions
250
200
150
100
50
0
0 2 4 6 8 10 12
Time (Years)
50 –
| | | | | | | | | |
0 1 2 3 4 5 6 7 8 9 10
Time (Years)
Figure 5.2
⚫
360 –
⚫
⚫ Sales = 290 + 10(Year)
340 – ⚫
⚫ ▪ A reasonable estimate of sales in year 11 is
320 – ⚫
⚫
300 – ⚫
⚫ 400 televisions
280 –
| | | | | | | | | |
0 1 2 3 4 5 6 7 8 9 10
Time (Years)
Figure 5.2
24/08/2021 SI-5101 ANALISIS REKAYASA – Ir. Biemo W. Soemardi Ph.D 16
Scatter
Diagram
▪ This trend line may not be perfectly accurate
(c)
200 –
because of variation from year to year
⚫ ⚫
Annual Sales of CD Players
| | | | | | | | | |
0 1 2 3 4 5 6 7 8 9 10
Time (Years)
Figure 5.2
24/08/2021 SI-5101 ANALISIS REKAYASA – Ir. Biemo W. Soemardi Ph.D 17
03
Measures of
Forecast Accuracy
24/08/2021 SI-5101 ANALISIS REKAYASA – Ir. Biemo W. Soemardi Ph.D 18
Measures of
Forecast Accuracy
• We compare forecasted values with actual values to see how
well one model works or to compare models
MAD =
forecast error
n
MSE =
( error ) 2
n
• The mean absolute percent error
error
actual
MAPE = 100%
n
• And bias is the average error and tells whether the forecast tends to be too
high or too low and by how much. Thus, it can be negative or positive.
n
error
MAPE forecast accuracy (in %)
actual
MAPE = 100%
n
Time – Series
Forecasting Models
24/08/2021 SI-5101 ANALISIS REKAYASA – Ir. Biemo W. Soemardi Ph.D 26
Time-Series Forecasting
Models
• A time series is a sequence of evenly spaced events (weekly,
monthly, quarterly, etc.)
• Time-series forecasts predict the future based solely of the past
values of the variable
• Other variables, no matter how potentially valuable, are ignored
Ft +1 =
( Weight in period i )( Actual value in period)
( Weights )
▪ Mathematically
w1Yt + w2Yt −1 + ... + w nYt − n +1
Ft +1 =
w1 + w2 + ... + w n
where
wi = weight for the ith observation
New forecast = Last period’s forecast + (Last period’s actual demand - Last period’s forecast)
Where is a weight (or smoothing constant) with a value between 0 and 1 inclusive
A larger gives more importance to recent data while a smaller value gives more
importance to past data
Ft +1 = Ft + (Yt − Ft )
where
Ft+1 = new forecast (for time period t + 1)
Ft = pervious forecast (for time period t)
= smoothing constant (0 ≤ ≤ 1)
Yt = pervious period’s actual demand
ACTUAL
TONNAGE FORECAST FORECAST
QUARTER UNLOADED USING =0.10 USING =0.50
1 180 175 175
2 168 175.5 = 175.00 + 0.10(180 – 175) 177.5
3 159 174.75 = 175.50 + 0.10(168 – 175.50) 172.75
4 175 173.18 = 174.75 + 0.10(159 – 174.75) 165.88
5 190 173.36 = 173.18 + 0.10(175 – 173.18) 170.44
6 205 175.02 = 173.36 + 0.10(190 – 173.36) 180.22
7 180 178.02 = 175.02 + 0.10(205 – 175.02) 192.61
8 182 178.22 = 178.02 + 0.10(180 – 178.02) 186.30
9 ? 178.60 = 178.22 + 0.10(182 – 178.22) 184.15
Best choice
24/08/2021 SI-5101 ANALISIS REKAYASA – Ir. Biemo W. Soemardi Ph.D 41
Exponential Smoothing
with Trend Adjustment
• Like all averaging techniques, exponential smoothing does not
respond to trends
• A more complex model can be used that adjusts for trends
• The basic approach is to develop an exponential smoothing
forecast then adjust it for the trend
Forecast including trend (FITt) = New forecast (Ft) + Trend correction (Tt)
Tt +1 = (1 − )Tt + ( Ft +1 − Ft )
where
Tt+1 = smoothed trend for period t + 1
Tt = smoothed trend for preceding period
= trend smooth constant that we select
Ft+1 = simple exponential smoothed forecast for period t + 1
Ft = forecast for pervious period
24/08/2021 SI-5101 ANALISIS REKAYASA – Ir. Biemo W. Soemardi Ph.D 43
Selecting a Smoothing
Constant
▪ As with exponential smoothing, a high value of makes the forecast
more responsive to changes in trend
▪ A low value of gives less weight to the recent trend and tends to smooth
out the trend
▪ Values are generally selected using a trial-and-error approach based on
the value of the MAD for different values of
▪ Simple exponential smoothing is often referred to as first-order smoothing
▪ Trend-adjusted smoothing is called second-order, double smoothing, or
Holt’s method
Yˆ = b0 + b1 X
where
Ŷ = predicted value
b0 = intercept
b1 = slope of the line
X = time period (i.e., X = 1, 2, 3, …, n)
Dist7 *
* Dist3 *
Dist4
Dist1 * Dist2
*
*
Time
24/08/2021 SI-5101 ANALISIS REKAYASA – Ir. Biemo W. Soemardi Ph.D 48
Midwestern Manufacturing
Company Example
• Midwestern Manufacturing Company has experienced the following dem
and for its electrical generators over the period of 2001 – 2007
• Likewise for X = 9
(sales in 2009) = 56.71 + 10.54(9)
= 151.57, or 152 generators
24/08/2021 SI-5101 ANALISIS REKAYASA – Ir. Biemo W. Soemardi Ph.D 50
Midwestern Manufacturing
Company Example
Figure 5.5 160 –
150 – ⚫
140 – ⚫
Trend Line
130 –
Generator Demand Yˆ = 56.71+ 10.54 X
120 – ⚫
110 –
⚫
100 –
90 – ⚫
80 – ⚫ ⚫
70 – ⚫ Actual Demand Line
60 –
50 –
| | | | | | | | |
1,200 1,200
Jan. 0.957 = 96 July 1.117 = 112
12 12
1,200 1,200
Feb. 0.851 = 85 Aug. 1.064 = 106
12 12
1,200 1,200
Mar. 0.904 = 90 Sept. 0.957 = 96
12 12
1,200 1,200
Apr. 1.064 = 106 Oct. 0.851 = 85
12 12
1,200 1,200
May 1.309 = 131 Nov. 0.851 = 85
12 12
1,200 1,200
June 1.223 = 122 Dec. 0.851 = 85
12 12
24/08/2021 SI-5101 ANALISIS REKAYASA – Ir. Biemo W. Soemardi Ph.D 54
Regression with Trend and
Seasonal Components
• Multiple regression can be used to forecast both trend and seasonal components
in a time series
• One independent variable is time
• Dummy independent variables are used to represent the seasons
• The model is an additive decomposition model
Yˆ = a + b1 X 1 + b2 X 2 + b3 X 3 + b4 X 4
where
X1 = time period
X2 = 1 if quarter 2, 0 otherwise
X3 = 1 if quarter 3, 0 otherwise
X4 = 1 if quarter 4, 0 otherwise
24/08/2021 SI-5101 ANALISIS REKAYASA – Ir. Biemo W. Soemardi Ph.D 55
Regression with Trend and
Seasonal Components
▪ The resulting regression equation is
Yˆ = 104.1 + 2.3 X 1 + 15.7 X 2 + 38.7 X 3 + 30.1X 4
▪ Using the model to forecast sales for the first two quarters of next
year
Ŷ = 104.1 + 2.3(13) + 15.7(0) + 38.7(0) + 30.1(0) = 134
▪ These are different from the results obtained using the multiplicative
decomposition method
▪ Use MAD and MSE to determine the best model
RSFE
Tracking signal =
MAD
where
RSFE = Σ(Forecast error) Running sum of forecast errors
Acceptable R
0 MADs ange
–
Lower Control Limit
Time
Cyclical,
Seasonal,
Forecast by averaging
Seeks to develop
Delphi consensus amongst experts
Good for long-term Time consuming
Seasonal Peaks
Actual Demand
Line
Average Demand
over 4 Years
| | | |
Year Year Year Year
1 2 3 4
Time
UCL = +4.0
Tracking Signal
Value of
CL
LCL = -4.0
Period
24/08/2021 SI-5101 ANALISIS REKAYASA – Ir. Biemo W. Soemardi Ph.D 73
Tracking Error in
Forecasting
• e = At - Ft
• eave =
• MSE = e2 =
eave
Value of
• Data arus penumpang dan barang pada tabel di atas adalah jumlah total yang
dari ke dua arah (Benoa – Lombok & Lombok – Benoa)
• Dengan menggunakan teknik Moving Average (MA), buat perkiraan demand
dari data di atas mulai setelah hari ke tiga, dan hitung Mean Actual Demand
(MAD) dan Mean Square Error (MSE) dari forecasting Saudara tersebut.
• Plotkan hasil perkiraan dan kenyataan demand tersebut dalam suatu grafik
Tracking Signal (TS) dan berikan komentar.
• Berikan penjelasan strategi apa yang akan Saudara terapkan untuk
menghadapi situasi seperti ini. Sebagai pertimbangan, di wilayah usaha
Saudara terdapat sebuah usaha pesaing dengan sebuah ferry dengan kapasitas
yang sama