Metode Pemulusan Winter (Aditif) - stat.ipb.ac.id series/Kuliah 5 - Metode... · Kapan metode...

38
Metode Pemulusan Winter (Aditif) KULIAH 5|METODE PERAMALAN DERET WAKTU [email protected]

Transcript of Metode Pemulusan Winter (Aditif) - stat.ipb.ac.id series/Kuliah 5 - Metode... · Kapan metode...

Page 1: Metode Pemulusan Winter (Aditif) - stat.ipb.ac.id series/Kuliah 5 - Metode... · Kapan metode pemulusan eksponensial tunggal ... Holt Winter≈Triple Exponential Smoothing Double

Metode PemulusanWinter (Aditif)KULIAH 5|METODE PERAMALAN DERET WAKTU

[email protected]. id

Page 2: Metode Pemulusan Winter (Aditif) - stat.ipb.ac.id series/Kuliah 5 - Metode... · Kapan metode pemulusan eksponensial tunggal ... Holt Winter≈Triple Exponential Smoothing Double

Review Untuk apa metode pemulusan (smoothing)

dilakukan terhadap data deret waktu?

Kapan metode pemulusan eksponensial tunggaldigunakan?

Kapan metode pemulusan eksponensial gandadigunakan?

Page 3: Metode Pemulusan Winter (Aditif) - stat.ipb.ac.id series/Kuliah 5 - Metode... · Kapan metode pemulusan eksponensial tunggal ... Holt Winter≈Triple Exponential Smoothing Double

Review: The Process of Smoothing Data Set

Page 4: Metode Pemulusan Winter (Aditif) - stat.ipb.ac.id series/Kuliah 5 - Metode... · Kapan metode pemulusan eksponensial tunggal ... Holt Winter≈Triple Exponential Smoothing Double

Outline Data deret waktu yang mengandung komponen

musiman aditif

Pemulusan metode Winter untuk data deretwaktu musiman aditif

Contoh aplikasi pada data

Page 5: Metode Pemulusan Winter (Aditif) - stat.ipb.ac.id series/Kuliah 5 - Metode... · Kapan metode pemulusan eksponensial tunggal ... Holt Winter≈Triple Exponential Smoothing Double

Seasonal Data

Page 6: Metode Pemulusan Winter (Aditif) - stat.ipb.ac.id series/Kuliah 5 - Metode... · Kapan metode pemulusan eksponensial tunggal ... Holt Winter≈Triple Exponential Smoothing Double

Seasonal Data

50.00

55.00

60.00

65.00

70.00

75.00

1 4 7 10 13 16 19 22 25 28 31 34 37 40 43 46 49 52 55 58

Aditif

30.00

40.00

50.00

60.00

70.00

80.00

90.00

100.00

110.00

1 4 7 10 13 16 19 22 25 28 31 34 37 40 43 46 49 52 55 58

Multiplikatif

Additive Multiplicative

Page 7: Metode Pemulusan Winter (Aditif) - stat.ipb.ac.id series/Kuliah 5 - Metode... · Kapan metode pemulusan eksponensial tunggal ... Holt Winter≈Triple Exponential Smoothing Double

Ilustrasi: US Clothing Sales

Page 8: Metode Pemulusan Winter (Aditif) - stat.ipb.ac.id series/Kuliah 5 - Metode... · Kapan metode pemulusan eksponensial tunggal ... Holt Winter≈Triple Exponential Smoothing Double

EXPONENTIAL SMOOTHING FOR SEASONAL DATA Originally introduced by Holt (1957) and Winters (1960)

Generally known as Winters’ method

Basic idea:

seasonal adjustment linear trend model

Two types of adjustments are suggested: Additive

Multiplicative

Page 9: Metode Pemulusan Winter (Aditif) - stat.ipb.ac.id series/Kuliah 5 - Metode... · Kapan metode pemulusan eksponensial tunggal ... Holt Winter≈Triple Exponential Smoothing Double

Additive Model

level or linear trend component the seasonal adjustment

St = St+m = St+2m =… for t = 1,…, m − 1

length of the season (period) of the cycles

can in turn be represented by 𝛽0 + 𝛽1t

Page 10: Metode Pemulusan Winter (Aditif) - stat.ipb.ac.id series/Kuliah 5 - Metode... · Kapan metode pemulusan eksponensial tunggal ... Holt Winter≈Triple Exponential Smoothing Double

Double Exponential Vs Additive Holt-Winter’s Method

𝑦𝑡+ℎ 𝑡 = 𝐿𝑡 + 𝑇𝑡ℎ

𝑦𝑡+ℎ 𝑡 = 𝐿𝑡 + 𝐵𝑡ℎ + 𝑆𝑡+ℎ−𝑚

Level Trend

Level

Trend

Seasonal

Holt Winter≈Triple Exponential Smoothing

Double Exponential:

Holt-Winter:

Page 11: Metode Pemulusan Winter (Aditif) - stat.ipb.ac.id series/Kuliah 5 - Metode... · Kapan metode pemulusan eksponensial tunggal ... Holt Winter≈Triple Exponential Smoothing Double

Holt-Winters Additive Formulation Suppose the time series is denoted by 𝑦1, … , 𝑦𝑛 with 𝑚

seasonal period.

𝑙𝑡 = 𝛼 𝑦𝑡 − 𝑠𝑡−𝑚 + 1 − 𝛼 𝑙𝑡−1 + 𝑏𝑡−1

𝑏𝑡 = 𝛾 𝑙𝑡 − 𝑙𝑡−1 + 1 − 𝛾 𝑏𝑡−1

𝑠𝑡 = 𝛿 𝑦𝑡 − 𝑙𝑡 + 1 − 𝛿 𝑠𝑡−𝑚

Estimate of the level:

Estimate of the trend:

Estimate of the seasonal factor:

Page 12: Metode Pemulusan Winter (Aditif) - stat.ipb.ac.id series/Kuliah 5 - Metode... · Kapan metode pemulusan eksponensial tunggal ... Holt Winter≈Triple Exponential Smoothing Double

ℎ-step-ahead forecast Let 𝑦𝑡+ℎ 𝑡 be the ℎ-step forecast made using data to

time 𝑡

𝑦𝑡+ℎ 𝑡 = 𝑙𝑡 + 𝑏𝑡ℎ + 𝑠𝑡+ℎ−𝑚

Page 13: Metode Pemulusan Winter (Aditif) - stat.ipb.ac.id series/Kuliah 5 - Metode... · Kapan metode pemulusan eksponensial tunggal ... Holt Winter≈Triple Exponential Smoothing Double

The Procedure

Step 1: Initialize the value of 𝑙𝑡 , 𝑏𝑡, and 𝑠𝑡

Step 2: Update the estimate of 𝑙𝑡

Step 3: Update the estimate of 𝑏𝑡

Step 4: Update the estimate of 𝑠𝑡

Step 5: Conduct the ℎ-step-ahead forecast

Page 14: Metode Pemulusan Winter (Aditif) - stat.ipb.ac.id series/Kuliah 5 - Metode... · Kapan metode pemulusan eksponensial tunggal ... Holt Winter≈Triple Exponential Smoothing Double

Initializing the Holt-Winters method

1. Fit a 2×𝑚 moving average smoother to the first 2 or 3 years of data.

2. Subtract smooth trend from the original data to get de-trended data. The initial seasonal values are then obtained from the averaged de-trended data.

3. Subtract the seasonal values from the original data to get seasonally adjusted data.

4. Fit a linear trend to the seasonally adjusted data to get the initial level ℓ0 (the intercept) and the initial slope b0.

Hyndman (2010)

Page 15: Metode Pemulusan Winter (Aditif) - stat.ipb.ac.id series/Kuliah 5 - Metode... · Kapan metode pemulusan eksponensial tunggal ... Holt Winter≈Triple Exponential Smoothing Double

Initializing the Holt-Winters method

use the least squares estimates of the following model:

Montgomery (2015):

𝑙0 𝑏0

𝑠𝑗−𝑠 = 𝑦𝑗 for 1 ≤ 𝑗 ≤ 𝑚 − 1 , and 𝑠0 = − 𝑗=1𝑚−1 𝑦𝑗

Page 16: Metode Pemulusan Winter (Aditif) - stat.ipb.ac.id series/Kuliah 5 - Metode... · Kapan metode pemulusan eksponensial tunggal ... Holt Winter≈Triple Exponential Smoothing Double

Initializing the Holt-Winters method

• fitting a regression with linear trend to the first few years of data (usually 3 or 4 years are used)

• the initial level ℓ0 is set to the intercept

• the initial slope 𝑏0 is set to the regression slope

• the initial seasonal values 𝑠−𝑚+1, … , 𝑠0 are computed from the detrended data.

Bowerman, O’Connell & Koehler (2005)

Page 17: Metode Pemulusan Winter (Aditif) - stat.ipb.ac.id series/Kuliah 5 - Metode... · Kapan metode pemulusan eksponensial tunggal ... Holt Winter≈Triple Exponential Smoothing Double

Procedures of Additive Holt-Winters Method

Consider the Mountain Bike example,

Slide 17

Page 18: Metode Pemulusan Winter (Aditif) - stat.ipb.ac.id series/Kuliah 5 - Metode... · Kapan metode pemulusan eksponensial tunggal ... Holt Winter≈Triple Exponential Smoothing Double

Slide 18

Procedures of Additive Holt-Winters Method

0

10

20

30

40

50

60

0 2 4 6 8 10 12 14 16 18

Time

Bik

e sa

les

(y)

Observations:

Linear upward trend over the 4-year period

Magnitude of seasonal span is almost constant as the level of the time series increases

Additive Holt-Winters method can be applied to forecast future sales

Page 19: Metode Pemulusan Winter (Aditif) - stat.ipb.ac.id series/Kuliah 5 - Metode... · Kapan metode pemulusan eksponensial tunggal ... Holt Winter≈Triple Exponential Smoothing Double

Slide 19

Procedures of Additive Holt-Winters Method

Step 1: Obtain initial values for the level ℓ0, the growth rate b0, and the seasonal factors sn-3, sn-2, sn-1, and sn0, by fitting a least squares trend line to at least four or five years of the historical data. ◦ y-intercept = ℓ0; slope = b0

Page 20: Metode Pemulusan Winter (Aditif) - stat.ipb.ac.id series/Kuliah 5 - Metode... · Kapan metode pemulusan eksponensial tunggal ... Holt Winter≈Triple Exponential Smoothing Double

Slide 20

Procedures of Additive Holt-Winters Method

Example ◦ Fit a least squares trend line to all 16 observations

◦ Trend line

ℓ0 = 20.85; b0 = 0.9809tyt 980882.085.20ˆ

Page 21: Metode Pemulusan Winter (Aditif) - stat.ipb.ac.id series/Kuliah 5 - Metode... · Kapan metode pemulusan eksponensial tunggal ... Holt Winter≈Triple Exponential Smoothing Double

Slide 21

Procedures of Additive Holt-Winters Method

Step 2: Find the initial seasonal factors1. Compute for each time period that is used in finding

the least squares regression equation. In this example, t = 1, 2, …, 16.

ˆty

1

2

16

ˆ 20.85 0.980882(1) 21.8309

ˆ 20.85 0.980882(2) 22.8118

......

ˆ 20.85 0.980882(16) 36.5441

y

y

y

Page 22: Metode Pemulusan Winter (Aditif) - stat.ipb.ac.id series/Kuliah 5 - Metode... · Kapan metode pemulusan eksponensial tunggal ... Holt Winter≈Triple Exponential Smoothing Double

Slide 22

Procedures of Additive Holt-Winters Method

Step 2: Find the initial seasonal factors2. Detrend the data by computing for each

observation used in the least squares fit. In this example, t = 1, 2, …, 16.

ttt yyS ˆ

5441.115441.3625ˆ

......

1882.88112.2231ˆ

8309.118309.2110ˆ

161616

222

111

yyS

yyS

yyS

Page 23: Metode Pemulusan Winter (Aditif) - stat.ipb.ac.id series/Kuliah 5 - Metode... · Kapan metode pemulusan eksponensial tunggal ... Holt Winter≈Triple Exponential Smoothing Double

Slide 23

Procedures of Additive Holt-Winters Method

Step 2: Find the initial seasonal factors3. Compute the average seasonal values for each of the L

seasons. The L averages are found by computing the average of the detrended values for the corresponding season. For example, for quarter 1,

2162.144

)6015.14()6779.15()7544.14()8309.11(

4

13951

]1[

SSSSS

Page 24: Metode Pemulusan Winter (Aditif) - stat.ipb.ac.id series/Kuliah 5 - Metode... · Kapan metode pemulusan eksponensial tunggal ... Holt Winter≈Triple Exponential Smoothing Double

Slide 24

Procedures of Additive Holt-Winters Method

Step 2: Find the initial seasonal factors4. Compute the average of the L seasonal factors. The

average should be 0.

Page 25: Metode Pemulusan Winter (Aditif) - stat.ipb.ac.id series/Kuliah 5 - Metode... · Kapan metode pemulusan eksponensial tunggal ... Holt Winter≈Triple Exponential Smoothing Double

Slide 25

Procedures of Additive Holt-Winters Method

Step 3: Calculate a point forecast of y1 from time 0 using the initial values

7.6147(-14.2162)0.980920.85

)0(ˆ

1),0( )(ˆ

30041001

snbsnby

pTsnpbTy LpTTTpT

Page 26: Metode Pemulusan Winter (Aditif) - stat.ipb.ac.id series/Kuliah 5 - Metode... · Kapan metode pemulusan eksponensial tunggal ... Holt Winter≈Triple Exponential Smoothing Double

Slide 26

Procedures of Additive Holt-Winters Method

Step 4: Update the estimates ℓT, bT, and snT by using some predetermined values of smoothing constants.

Example: let = 0.2, = 0.1, and δ = 0.1

3079.22)9808.085.20(8.0))2162.14(10(2.0

))(1()( 004111

bsny

0286.1)9809.0(9.0)85.203079.22(1.0

)1()( 0011

bb

0254.14)2162.14(9.0)3079.2210(1.0

)1()( 41111

snysn

8895.295529.60286.13079.22

)1(ˆ21142112

snbsnby

Page 27: Metode Pemulusan Winter (Aditif) - stat.ipb.ac.id series/Kuliah 5 - Metode... · Kapan metode pemulusan eksponensial tunggal ... Holt Winter≈Triple Exponential Smoothing Double

Slide 27

Page 28: Metode Pemulusan Winter (Aditif) - stat.ipb.ac.id series/Kuliah 5 - Metode... · Kapan metode pemulusan eksponensial tunggal ... Holt Winter≈Triple Exponential Smoothing Double

Slide 28

Procedures of Additive Holt-Winters Method

Step 5: Find the most suitable combination of , , and δ that minimizes SSE (or MSE)

Example: Use Solver in Excel as an illustrationSSE

alpha

gamma

delta

Page 29: Metode Pemulusan Winter (Aditif) - stat.ipb.ac.id series/Kuliah 5 - Metode... · Kapan metode pemulusan eksponensial tunggal ... Holt Winter≈Triple Exponential Smoothing Double

Slide 29

Page 30: Metode Pemulusan Winter (Aditif) - stat.ipb.ac.id series/Kuliah 5 - Metode... · Kapan metode pemulusan eksponensial tunggal ... Holt Winter≈Triple Exponential Smoothing Double

Slide 30

Additive Holt-Winters Methodp-step-ahead forecast made at time T

Example

3,...) 2, 1,( )(ˆ psnpbTy LpTTTpT

1073.232162.149809.03426.36)16(ˆ417161617 snby

8573.445529.6)9809.0(23426.362)16(ˆ418161618 snby

8573.575721.18)9809.0(33426.363)16(ˆ419161619 snby

3573.299088.10)9809.0(43426.364)16(ˆ420161620 snby

Page 31: Metode Pemulusan Winter (Aditif) - stat.ipb.ac.id series/Kuliah 5 - Metode... · Kapan metode pemulusan eksponensial tunggal ... Holt Winter≈Triple Exponential Smoothing Double

Slide 31

Additive Holt-Winters MethodExample

Forecast Plot for Mountain Bike Sales

0

10

20

30

40

50

60

70

0 2 4 6 8 10 12 14 16 18 20

Time

Fo

recasts

Observed values

Forecasts

Page 32: Metode Pemulusan Winter (Aditif) - stat.ipb.ac.id series/Kuliah 5 - Metode... · Kapan metode pemulusan eksponensial tunggal ... Holt Winter≈Triple Exponential Smoothing Double

Another Example

See example 4.8 on Montgomery (2015) , chapter 4 page 309.

Page 33: Metode Pemulusan Winter (Aditif) - stat.ipb.ac.id series/Kuliah 5 - Metode... · Kapan metode pemulusan eksponensial tunggal ... Holt Winter≈Triple Exponential Smoothing Double

Chapter Summary Exponential smoothing Vs Holt-Winter’s

smoothing ?

Basic idea of additive Holt-Winter’s smoothing?

Procedure in additive Holt-Winter’s smoothing?

Page 34: Metode Pemulusan Winter (Aditif) - stat.ipb.ac.id series/Kuliah 5 - Metode... · Kapan metode pemulusan eksponensial tunggal ... Holt Winter≈Triple Exponential Smoothing Double

Exercise1. Montgomery (2015) exercise 4.30 part (a) and (b)

2. Montgomery (2015) exercise 4.32 part (a) and (b)

Page 35: Metode Pemulusan Winter (Aditif) - stat.ipb.ac.id series/Kuliah 5 - Metode... · Kapan metode pemulusan eksponensial tunggal ... Holt Winter≈Triple Exponential Smoothing Double

Next Topic…

“Multiplicative Holt-Winter’s Method”

Page 36: Metode Pemulusan Winter (Aditif) - stat.ipb.ac.id series/Kuliah 5 - Metode... · Kapan metode pemulusan eksponensial tunggal ... Holt Winter≈Triple Exponential Smoothing Double

ReferensiHyndman, R.J. 2010. Initializing the Holt-Winters method.

https://robjhyndman.com/hyndsight/hw-initialization/[March 7th, 2018]

Hyndman, R.J and Athanasopoulos, G. 2013. Forecasting:principles and practice. https://www.otexts.org/ fpp/6/2/[March 7th, 2018]

Montgomery, D.C., Jennings, C.L., Kulahci, M. 2015. Introductionto Time Series Analysis and Forecasting, 2nd ed. New Jersey:John Wiley & Sons.

Wan, A. 2017. Exponential Smoothing. http://personal.cb.cityu.edu.hk/msawan/teaching/ms6215/Exponential%20Smoothing%20Methods.ppt [March 7th, 2018]

36

Page 37: Metode Pemulusan Winter (Aditif) - stat.ipb.ac.id series/Kuliah 5 - Metode... · Kapan metode pemulusan eksponensial tunggal ... Holt Winter≈Triple Exponential Smoothing Double

Materi perkuliahan dapatdiakses pada:

stat.ipb.ac.id/en

37

Page 38: Metode Pemulusan Winter (Aditif) - stat.ipb.ac.id series/Kuliah 5 - Metode... · Kapan metode pemulusan eksponensial tunggal ... Holt Winter≈Triple Exponential Smoothing Double