1 Dr. Kusman Sadik, M.Si Departemen Statistika IPB, 2016
This part presents some basic statistical methods essential to modeling, analyzing, and forecasting time series data. Both graphical displays and numerical summaries of the properties of time series data are presented. 2 2
Forecasts are based on data or observations on the variable of interest. This data is usually in the form of a time series. Suppose that there are T periods of data available, with period T being the most recent. We will let the observation on this variable at time period t be denoted by: y t, t = 1, 2,..., T. 3 3
4 4
5 5
6 6
Developing a forecasting model should always begin with graphical display and analysis of the available data. Many of the broad general features of a time series can be seen visually. 7 7
Time Series Plots. Plotting Smoothed Data. 8 8
This is just a graph of y t versus the time period, t, for t = 1, 2,..., T. Features such as trend and seasonality are usually easy to see from the time series plot. It is interesting to observe that some of the classical tools of descriptive statistics, such as the histogram and the stem-and-leaf display, are not particularly useful for time series data because they do not take time order into account. 9 9
10 10
11 11
12 12
Berikut data profit bulanan (dalam milyar) suatu perusahaan di bidang ekspor impor selama 10 bulan terakhir. a. Tentukan data termuluskan melalui teknik rataan bergerak sederhana dengan rentang N = 3. Kemudian buat time-series plotnya bersama dengan data asal. b. Tentukan ramalan besarnya profit pada setiap satu waktu ke depan. Berapa ramalan profit pada bulan ke-11 dan ke-12? Bulan (t) Profit (Y t ) 1 11 2 18 3 16 4 22 5 24 6 20 7 16 8 14 9 10 10 13 13 13
a. Tentukan data termuluskan melalui teknik rataan bergerak sederhana dengan rentang N = 3. Kemudian buat time-series plotnya bersama dengan data asal. Bulan (t) y t M T 1 11-2 18-3 16 15.0 4 22 18.7 5 24 20.7 6 20 22.0 7 16 20.0 8 14 16.7 9 10 13.3 10 13 12.3 14 14
a. Tentukan data termuluskan melalui teknik rataan bergerak sederhana dengan rentang N = 3. Kemudian buat time-series plotnya bersama dengan data asal. 30 25 20 15 10 yt MT 5 0 1 2 3 4 5 6 7 8 9 10 Bulan (t) 15 15
b. Tentukan ramalan besarnya profit pada setiap satu waktu ke depan. Berapa ramalan profit pada bulan ke-11 dan ke-12?. Bulan (t) y t M T 1 11-2 18-3 16 15.0 4 22 18.7 15.0 5 24 20.7 18.7 6 20 22.0 20.7 7 16 20.0 22.0 8 14 16.7 20.0 9 10 13.3 16.7 10 12 12.3 13.3 11 - - 12.3 12 - - 12.3 16 16
17 17
Metode rataan bergerak sederhana (simple moving average) hanya relevan untuk data deret waktu yang stasioner. Untuk data deret waktu yang tidak stasioner, memerlukan pendekatan teknik pemulusan yang berbeda. 18 18
A very important type of time series is a stationary time series. A time series is said to be strictly stationary if its properties are not affected by a change in the time origin. That is, if the joint probability distribution of the observations y t, y t+1. y t+n is exactly the same as the joint probability distribution of the observations y t+k, y t+k+1. y t+k+n then the time series is strictly stationary. 19 19
20 20
21 21
22 22
Measure of forecast accuracy should always be evaluated as part of a technique validation effort. When more than one forecasting technique seems reasonable for a particular application, these forecast accuracy measures can also be used to discriminate between competing models. 23 23
Mean Error (ME). Mean Absolute Deviation (MAD). Mean Squared Error (MSE). Mean Percent forecast-error (MPE). Mean Absolute Percent forecast-error (MAPE). 24 24
25 25
26 26
27 27
28 28
29 29
The mean percent forecast error (MPE) is 30 30
31 31
32 32
33 33
34
Gunakan data (the sales of mature pharmaceutical product) di dalam buku Montgomery (Appendix B, Table B.2, hlm. 412). a. Tentukan data termuluskan melalui teknik rataan bergerak sederhana dengan rentang N = 3. Hitung ramalan untuk 3 waktu ke depan. b. Tentukan data termuluskan melalui teknik rataan bergerak sederhana dengan rentang N = 5. Hitung ramalan untuk 3 waktu ke depan. c. Buat time-series plotnya masing-masing bersama dengan data asal. d. Tentukan nilai ME, MAD, MSE, dan MAPE masing-masing untuk (a) dan (b). Apa kesimpulan Anda? Catatan: Kerjakan terlebih dahulu poin (a) s.d. (d) di atas menggunakan Excel. Kemudian bandingkan hasilnya dengan keluaran Minitab, SAS, dan Eviews. 35 35
36 36
Gunakan data (Chemical Process Viscosity ) di dalam buku Montgomery (Appendix B, Table B.3, hlm. 413). a. Tambahkan m pada seluruh data reading pada Table B.3 tersebut. b. Pada data (a) di atas, tentukan data termuluskan melalui teknik rataan bergerak sederhana dengan rentang N = 4. Hitung ramalan untuk 3 waktu ke depan. c. Pada data (a) di atas, tentukan data termuluskan melalui teknik rataan bergerak sederhana dengan rentang N = 6. Hitung ramalan untuk 3 waktu ke depan. d. Buat time-series plotnya masing-masing bersama dengan data asal. e. Tentukan nilai ME, MAD, MSE, dan MAPE masing-masing untuk (b) dan (c). Apa kesimpulan Anda? Catatan: Kerjakan terlebih dahulu poin (a) s.d. (e) di atas menggunakan Excel. Kemudian bandingkan hasilnya dengan keluaran Minitab. 37 37
38 38
Montgomery, D.C., et.al. 2008. Forecasting Time Series Analysis 2nd. John Wiley. Cryer, J.D. and Chan, K.S. 2008. Time Series Analysis with Application in R. Springer. Wei, William, W.S. 1990. Time Series Analysis, Univariate and Multivariate Methods. Adison-Wesley Publishing Company Inc, Canada. Abraham, B. and Ledolter, J. 2005. Statistical Methods for Forecasting. John Wiley. 39 39
Bisa di-download di http://www.stat.ipb.ac.id/en/index.php?page=dr-kusman-sadik 40 40
41 41