Forecasting-Timeseries-Smoothing and Decomposition

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 38

FORECASTING ANALYSIS

TIME SERIES
S M O O T H I N G AND
DECOMPOSITION
METHODS
CONTENTS
PL 5101 FORECASTING ANALYSIS
PLANNING ANALYTICAL TIME SERIES
METHOD Smoothing and Decomposition Methods

1. Introduction
A. BACKGROUND 2. Types of Data Pattern
3. Evaluation Model

B. SMOOTHING METHODS 1. Averaging Methods


2. Exponential Smoothing Methods

1. Explanation
C. DECOMPOSITION METHODS 2. Example

1. Smoothing Method by using


D. CASE STUDY Exponential Smoothing
A. BACKGROUND
1. INTRODUCTION
 2 major types of quantitative forecasting : Time-Series and Regression (Causal) Methods.
 Quantitative forecasting can be applied when three conditions quantitative exist:
1. Information about the past is available.
2. This information can be quantified in the form of numerical data.
SOURCE : Makridakis Et Al, 2008

3. It can be assumed that some aspects of the past pattern will continue into the future.

 The objective of Time – Series is to discover the pattern in the historical data series and
extrapolate the pattern into the future.
 The reasons :
1. The system may not be understood (Makridakis et al, 2008)
2.Explanatory is necessary to be predicted but it is too difficult (Rob J Hyndman, 2009)
3.Only to predict what will happen (Makridakis et al, 2008)
Look at the data Forecast using one or Evaluate the technique
(Scatter Plot) more techniques and pick the best one.
Diagram Basics Procedur in Forecasting (source : http://www2.gsu.edu/~dscsss/teaching/mgs3100/sum07/Ch_5.ppt
A. BACKGROUND
2. TYPES OF DATA PATTERN

 For time series, the most obvious time plot graphical form is a time plot in which the data
are plotted over time.
 The major task of time series analysis is to describe the nature of the past variation of a
variable in order that its future values can be predicted and acted upon accordingly
(Kachigan, 1986)
 An important step in selecting an appropriate forecasting method is to consider the types
of data patterns, so that the methods most appropriate to those patterns can be utilized.
 Four types of time series patterns data patterns can be distinguished: horizontal, seasonal,
cyclical, and trend.

SOURCE : Spyros Et Al, 1997


A. BACKGROUND
2. TYPES OF DATA PATTERN
A HORIZONTAL (H) PATTERN
exists when the data values fluctuate around a constant mean or
Stationary
SOURCE : Makridakis Et Al, 2008

https://www.cengage.com
A. BACKGROUND
2. TYPES OF DATA PATTERN
A SEASONAL (S) PATTERN
exists when a series is influenced by seasonal factors or in regular interval.
(e.g., the quarter of the year, the month, or day of the week).
SOURCE : Makridakis Et Al, 2008
A. BACKGROUND
2. TYPES OF DATA PATTERN
A CYCLICAL (C) PATTERN
exists when the data exhibit rises and falls that are not of a fixed period.
SOURCE : Makridakis Et Al, 2008
A. BACKGROUND
2. TYPES OF DATA PATTERN
A TREND (T) PATTERN
exists when there is a long-term increase or decrease in the
data.
SOURCE : Makridakis Et Al, 2008
A. BACKGROUND
3. EVALUATION MODEL
 ME - The arithmetic mean of the errors  Mean Square Error - MSE

ME 
 (Actual - Forecast)   Error •
MSE   (Actual -nForecast) 2
  (Error) 2

n
n
SOURCE : Makridais Et Al, 2008

 n is the number of forecast errors • Excel: =SUMSQ(error


 n
Excel: =AVERAGE(error range) range)/COUNT(error range)

 Mean Absolute Deviation - MAD  Mean Absolute Percentage Error


- MAPE
| Actual- Fore cast|
 | Actual - Forecast |  | Error |
 Actual
MAD   M APE  n
n • In general,*100%
the lower the error measure (ME,
MAD, MSE) the better the forecasting
n model
B. SMOOTHING METHODS

The basis of the smoothing methods is the simple weighting or smoothing of


past observations in a time series in order to obtain a forecast for the future.
If the time series involves a trend (in an upward or downward direction), or a
seasonal effect or both a trend and pattern, we consider a variety of smoothing
methods seasonal effect that seek to improve upon the mean as the forecast for
the next period(s).
 The major advantages of smoothing methods are their low cost, the ease with
which they can be applied, and the speed with which they can be adopted.
These characteristics make them particularly attractive when a large number
of items are to be forecasted, such as would be the case in many inventory
situations, and when the time horizon is relatively short (less than 1 year).
B. SMOOTHING METHODS
STRATEGY FOR APPRAISING ANY OF THE SMOOTHING METHODS OF FORECASTING (SPYROS ET AL, 1997)
B. SMOOTHING METHODS

 Pegels (1969) has provide a simple but useful framework for separating trend and seasonal aspects is
whether or not the model should be additive (linear) or multiplicative (non linear) in smoothing methods.
B. SMOOTHING METHODS 1. AVERAGING
METHODS
a. The Mean & Single Moving Avarage

The method of the mean is simply The single moving averages method uses
to take the average of all observed the average of the most recent k data values in
data as the forecast. the time series as the forecast for the next
 THE EQUATION IS : period.
 THE EQUATION IS :

 It cannot handle trend or seasonality very well, although it can do better than the total
mean. It is useful for time series with a slowly changing mean.
B. SMOOTHING METHODS 1. AVERAGING
METHODS
c. Double Moving Avarages and Other Moving
Avarages Combination
The double moving averages method uses
the technique of single average moving with an  THE EQUATION for Moving
adjustment for trend from period t to period t+1 Avarages
Method is :
 THE EQUATION IS :

o where m=2k+1. That is, the estimate of the


trend-cycle at time t is obtained
averaging
by values of the time series within
k periods of t.
 Latter used in Decomposition Method in
It can handle trend but due to the generally various way for Smoothing not for
superior of Exponential Smoothing Methods, Forecasting
this method not used often for forecasting.
B. SMOOTHING METHODS 2. EXPONENTIAL SMOOTHING METHODS

 Exponential smoothing method often used to forecast due their simplicity and low cost
Exponential smoothing methods provide forecasts using weighted averages of past values of
data and forecast errors.
In exponential smoothing (as opposed to in moving averages smoothing) older data is given
progressively-less relative weight (importance) whereas newer data is given progressively-
greater weight.

 It require that certain parameters be defined, and that parameters value lie between 0
and 1
 Four types of Exponential Smoothing : 3. Double Exponential Smoothing
1. Single Exponential Smoothing (SES) a. Brown One Parameter (Linear method)
2.Single Exponential Smoothing – b. Holt Two Parameter(Linear method)
Adaptive Approach 4. Triple Exponential Smoothing
a. Brown (Squared method)
b. Holt-Winter (Trend and Seasonality)
B. SMOOTHING METHODS 2. EXPONENTIAL SMOOTHING METHODS

a. Single Exponential Smoothing (SES) and Single Exponential


Smoothing – An Adaptive Approach
 SES method gives the most  SES – An Adaptive Approach has principle
observation with a weight value (α) and
recent like SES but α value could change
weighting the most recent previous forecast in a
controlled manner, as changes in
with a weight (1-α). pattern of data occur.
the
 Used for Horizontal Data Pattern  Used for Horizontal Data Pattern
Stationary
or with no Trend Stationary
or with Trend (Linier)
 THE EQUATION and INITIATION :  THE EQUATION and INITIATION :
B. SMOOTHING METHODS 2. EXPONENTIAL SMOOTHING METHODS

b. Double Exponential Smoothing (Brown One Parameter and Holt


Two Paramater
 Double exponential smoothing Brown One  Double exponential smoothing Holt
Parameter Linier Method suppose the  is Two
Parameter Linier Method smooth the
lies between 0.1 to 0.2 and the  used For trend seperatelyby using two smoothing
twice smoothing stages. constant (α and γ) between 0 to 1.
 Used for Horizontal Data Pattern  Used for Horizontal Data Pattern
Stationary
or with Trend (Linier). Stationary
or with Trend (Linier).
 THE EQUATION and INITIATION :  THE EQUATION and INITIATION :
B. SMOOTHING METHODS 2. EXPONENTIAL SMOOTHING METHODS

c. Triple Exponential Smoothing (Brown One Parameter Quadratic


Method and Winter Three Paramater Trend & Seasonality Method)

 THE EQUATION and INITIATION :  Used for Horizontal Data Pattern


or Stationary with Trend and
Seasonality
 THE EQUATION and INITIATION :
B. SMOOTHING METHODS 2. EXPONENTIAL SMOOTHING METHODS

d. Comparison of Smoothing Method

 If the data series is stationary  Only Triple Exponential Smoothing


nonseasonal,
and the Adaptive-Response-Rate Winter’s
: Method that widely used for
Single Exponential Smoothing is often seasonal data series although it require 3
preffered as the optimal  will change if the parameters (,  and ) provided by trial
pattern in basic data is change. and error.
 For data series is nonstationary  The initialization or the value of the first
nonseasonal,
and it is preffered to use the forecast (F1) for most of the smoothing
Double Exponetial Smoothing : Brown’s One method are the value of first data (X1).
Parameter Linier Method due to the
easiness of the method for  value.
 If the data series involved a turning points, it
is often recommended to apply the Triple
Exponential Smoothing : Brown’s One-
Parameter Quadratic Method and adjust the
 below 0.1
C. DECOMPOSITION METHODS

 Classical time series decomposition separates a time series into five components: mean, long-
range trend, seasonality, cycle, and randomness.
 The decomposition model is Value = (Mean) x (Trend) x (Seasonality) x (Cycle) x (Random).
 Time series decomposition can be used to separate or decompose a time series into seasonal,
trend, and irregular components.
 A general mathematical model takes the following form:
 In this model, the trend and seasonal
tX = f(I , T , C , E ),
t t t t and irregular components are multiplied to
 Where : the value of the time series. Trend is
give
measured in units of the item being forecast.
Xt is the Time Series Value (Actual Data) At Period t
However, the seasonal and irregular
It Is the Seasonal component (Index) at period t
components are measured in relative terms,
Tt is the Trend component (Index) at period t with values above 1.00 indicating
Ct is the Cycal component (Index) at period t above the effects below 1.00
Et is the Error or Random component at period indicating effects
trendbelow
andthe
values
trend.
t
C. DECOMPOSITION METHODS

 Commonly, there are two types of decomposition method which are Classical (1920s) Additive
Form that appropriate if the magnitude of the seasonal does not vary and Multicative Form. This
two types have same mathematical model.

 The process of decomposition methods :


1. Step 1, For the actual series Xt, compute a moving average whose length,N, is equal to the
length of seasonality;
2. Step 2, Separate the N period moving average (step 1) from the original data series to obtain
trend and cyclicality;
3. Step 3, Isolate the seasonal factors by averaging them for each of the periods making up the
complete length of seasonality;
4. Step 4, Identify the appropriate form of the trend (linear, exponential, etc) and calculate its
value at each period Tt;
5. Step 5, Separate the outcome of step 4 from step 2 to obtain the cyclical factor;
6. Step 6, Separate the seasonality, trend, and cycle from the original data series to isolate the
remaining randomness.
C. DECOMPOSITION METHODS

 To illustrate the process of Multicative Decomposition, we take a data of the television set sales
in 4 year that divided in 4 quarter each year.
Sales
Continued Television Sale
Year Quarter (Thousand) 0.01

Thousands
1 1 4.80 3 1 6.00
0.01

1 2 4.10 3 2 5.60
1 3 6.00 3 3 7.50 0.01

1 4 6.50 3 4 7.80 0.01

2 1 5.80 4 1 6.30 0.01

2 2 5.20 4 2 5.90
0.00

2 3 6.80 4 3 8.00
0.00
2 4 7.40 4 4 8.40 1
15 16
2 3 4 5 6 7 8 9 10 11 12 13 14
C. DECOMPOSITION METHODS

 Step 1 & 2 : Calculate the Moving Avarages and Substract the moving avarages values to result Seasonality
and Randomness
Four-Quarter Moving Centered Moving
Year Quarter Sales ( Thousand)
Avarage Average
1 1 4.80
1 2 4.10 5.350
1 3 6.00 5.600 5.475
1 4 6.50 5.875 5.738
2 1 5.80 6.075 5.975
2 2 5.20 6.300 6.188
2 3 6.80 6.350 6.325
2 4 7.40 6.450 6.400
3 1 6.00 6.625 6.538
3 2 5.60 6.725 6.675
3 3 7.50 6.800 6.763
3 4 7.80 6.875 6.838
4 1 6.30 7.000 6.938
4 2 5.90 7.150 7.075
4 3 8.00
4 4 8.40
C. DECOMPOSITION METHODS

 Step 3 : Separates the Randomness from the Seasonality


Centered
Four-Quarter Deseasonalized
Seasonal Year Quarter Sales
Moving Avarage Moving Sales
Quarter Seasonal Irregular Average
Index 1 1 4.80 5.15
1 2 4.10 5.350 4.89
1 0.91
0.971 0.918 0.93 1 3 6.00 5.600 5.475 5.49
1 4 6.50 5.875 5.738 5.69
2 1 5.80 6.075 5.975 6.22
2 0.83
0.840 0.839 0.84 2 2 5.20 6.300 6.188 6.21
2 3 6.80 6.350 6.325 6.22
2 4 7.40 6.450 6.400 6.47
3 1.11
1.096 1.075 1.09 3 1 6.00 6.625 6.538 6.44
3 2 5.60 6.725 6.675 6.68

4 1.14 3 3 7.50 6.800 6.763 6.86


1.133 1.156 1.14 3 4 7.80 6.875 6.838 6.82
4 1 6.30 7.000 6.938 6.76
4 2 5.90 7.150 7.075 7.04
4 3 8.00 7.32
4 4 8.40 r 7.35
C. DECOMPOSITION METHODS

 Step 4 & 5 : Separates the Trend and the Cycle


 To identify this trend, we will fit a linear
trend equation to the deseasonalized
time series .
The trend line will fitted to the
deseasonalized be datainstead of the
original data.
 A linear the estimated
trend
regression equation is

 From manual calculation


by excel,
the estimated linear
equation
trend is
C. DECOMPOSITION METHODS

 Step 4 & 5 : Separates the Trend and the Cycle


T 136.000
Deseasonalized Sales T-t Y-y (T-t) x (Y-y) (T-t)2
5.15 (7.50) (1.20) 9.006698 56.25
t 8.50
4.89 (6.50) (1.46) 9.46395 42.25
5.49 (5.50) (0.86) 4.742501 30.25
5.69 (4.50) (0.66) 2.991279 20.25 Y 101.60
6.22 (3.50) (0.13) 0.448568 12.25
6.21 (2.50) (0.14) 0.357415 6.25
6.22 (1.50) (0.13) 0.195864 2.25 y 6.35
6.47 (0.50) 0.12 -0.06123 0.25
6.44 0.50 0.09 0.043192 0.25
6.68 1.50 0.33 0.501747 2.25
6.86 2.50 0.51 1.274147 6.25
6.82 3.50 0.47 1.65314 12.25
6.76 4.50 0.41 1.836913 20.25
7.04 5.50 0.69 3.80928 30.25
7.32 6.50 0.97 6.285301 42.25
7.35 7.50 1.00 7.478399 56.25
101.60 - 0.00 50.03 340.00
6.35
0.14714
5.10
C. DECOMPOSITION METHODS

 Step 6 : Isolates the Randomness


 The slope of 0.147 indicates that over the past 16 quarters, the firm averaged a deseasonalized
growth in sales of about 147 sets per quarter. If we assume that the past 16-quarter trend in
sales data is a reasonably good indicator of the future, this equation can be used to develop a
trend projection for future quarters. For example, substituting t 17 into the equation yields
next quarter’s deseasonalized trend projection, T17.

Deseasonalized Trend
Year Quarter
Foorecast
5 1 7.601
2 7.748
3 7.895
4 8.042
C. DECOMPOSITION METHODS

 The forecast for 17, 18 , 19 and 20 are


Quarterly
Deseasonalized Trend Seasonal
Year Quarter Forecast
Foorecast Index
(Thousand)
5 1 7.601 0.93 7.086
2 7.748 0.84 6.491
3 7.895 1.09 8.632
4 8.042 1.14 9.195
CASE
STUDY
The Use of Exponential Smoothing Method to Predict Missing Service E-Report
2017 2nd International Conferences on Information Technology, Information Systems and Electrical Engineering (ICITISEE)

AHMAD CHUSYAIRI
Information Technology STIKOM PGRI
Banyuwangi
PELSRI RAMADAR N.S.
Information Technology STIKOM PGRI
Banyuwangi
BAGIO
Planning Departement Police Resort
Banyuwangi

In this research examines the selection of an appropriate forecasting model in accordance with
time series data available for predicting the missing reports in a period.
ALOGARITHM ANALYSIS

 Forecasting missing report at Police Resort


Banyuwangi by using Time Series in
Smoothing Methods.

 The forecasting techniques used are single,


double, and triple exponential smoothing.

 The error value of the predicted data obtained


based on the data being tested using MAD,
MSE, and MAPE method for every single
technique.
DATA REPORT
VARIABLE USED IN SMOOTHING METHOD

 The value of Alpha, Betha and


Gamma
determained by Trial and Error

 The double exponential smoothing method


used Holt’s Two-Parameter Method while
used Winter’s
the triple Three-Parameter
exponential Trend and
smoothing method
Seasonality Method.
 The actual value used in Single
Exponetial Smoothing was  = 0.6,
not  = 0.8
RESULT OF THE RESEARCH

o Review :
1. SES actualy was the lowest one only in
MAD not in MSE (DES was the lower).
2. I try using other method by using DES:
Brown’s Linier Method and TES Brown
Quadratic Method which is easier to
apply than DES Holt’s Method or TES
 Conclusion : Winter’s Method. The DES Brown’s
The most suitable method in predicting Method is as simple as SES but provide
moving data up and down (fluctuation)in the
the lower result in MAD and MSE
data report is by using the Single Exponential
No. Method MAD MSE MAPE
Smoothing method because it has the error
value of the prediction data using Mean Absolute 1 DES Brown 4.92 725.89 282.29
Deviation (MAD), and Mean Square Error
(MSE), however triple exponential smoothing 2 TES Brown 4.17 521.68 295.58
method has a smallest error value using Mean
Absolute Percentage Error (MAPE). DES :  = 0.2 and Initialization S’=S’’= X
TES :  = 0.15 and Initialization S’=S’’=S’’’=X
REFFERENCE
 Spyros G. Makridakis, Steven C. Wheelwright, Rob J Hyndman - Forecasting
Methods and Applications - Wiley (1997)
 The Use of Exponential Smoothing Method to Predict Missing Service E-
Report - Ahmad Chusyairi, Pelsri Ramadar N.S. and Bagio,
https://ieeexplore.ieee.org/
 http://www2.gsu.edu/~dscsss/teaching/mgs3100/sum07/Ch_5.ppt
 https://otexts.org/fpp2/
 https://ec.europa.eu/eurostat/statistics-explained
 http://www.businessdictionary.com/definition/exponential-smoothing
 http://www.ncss.com
 https://
www.cengage.com/resource_uploads/downloads/0840062389_34
7257.pdf
 https://arumprimandari.files.wordpress.com/2015/03/course-5_pegels-
classification.pdf

You might also like