1 Chap 9 Box-Jenkins Models Box-Jenkins 模式用於描述 stationary 序列 Stationary series ( 平穩序列 ) 定義: The statistical properties of the time series are constant through times. E(Y t ) =μ , var(Y t ) = σ 2 , cor(Y t,Y t+k ) = ρ k for all t 如果手中的時序資料不是 stationary, 必須將它轉為 stationary 如何轉換?
2 Stationary series Nonstationary series
3 Exp 9.1 The company would like to develop a prediction model that can be used to give prediction interval forecasts of weekly sales of Asorbent Paper Towels. For the past 120 weeks the company has recorded weekly sales of Absorbent Paper Towels. ty1stDiff First Differences Z t = Y t – Y t-1 The original series is not a stationary series
4 First Differences series becomes a stationary series Second Differences series is still a stationary series
5 圖形觀察:原資料圖、差方資料圖 檢定法: 如何檢測 stationarity?( 平穩性 ) Dickey-Fuller test Phillips-Perron test Random-walk with drift test
6 1.Backward 運算: B(Y t ) = Y t-1, B 2 (Y t ) = Y t-1 2.First difference 一階差分 : 3.Second differences 二階差分 : 差分運算 5.Difference with lag k :
7 差分功能 一階差分消去直線 trend 二階差方消去二次 trend 消除季節因素 四季節差分 月季節差分
8 Fig 9.1 nonstationary series First difference Second difference
9 9.2 The autocorrelation and partial autocorrelation function autocorrelation at lag k : cor(Y t,Y t+k ) = ρ k Sample autocorrelation at lag k, r k ACF : autocorrelation function, 由 r k, k= 0,1,2,….. 組成的函數 Standard error of r k :
10 LagCovarianceCorrelation Std Error | |********************| |. |******************* | |. |****************** | |. |***************** | |. |**************** | |. |*************** | |. |************** | |. |************* | |. |************ | |. |***********. | |. |**********. | |. |*********. | |. |*********. | |. |********. | |. |********. | |. |*******. | |. |******. | |. |******. | |. |*****. | |. |****. | |. |***. | |. |**. | |. |*. | "." marks two standard errors ACF for Exp9.1
11 Autocorrelation Check for White Noise To Lag Chi- Square DFPr > ChiSq Autocorrelations < < < < Test H 0 : ρ j = 0, j=1,2, … k 註: White noise ( 純雜訊 ) 是一獨立常態分佈的序列 ε t ~ NID(0, σ 2 ), then ε t is a white noise
12 LagCovarianceCorrelation Std Error | |********************| |. |****** | |. *|. | |. *|. | |. |**. | |. |**. | |. |. | |.***|. | |. **|. | |.***|. | |. **|. | |. *|. | |. |. | |. |*. | |. |. | |. *|. | |. |. | |. |***. | |. |**** | |. |*. | |. *|. | |. *|. | ACF for Exp9.1 with 一次差分
13 Autocorrelation Check for White Noise To LagChi-SquareDFPr > ChiSqAutocorrelations Test H0 : ρ j = 0, j=1,2, … k
14 In general, for nonseasonal data 1.If the ACF either cuts off fairly quickly or dies down fairly quickly, then the time series shoud be considered stationary. 2.If the ACF dies down extremely slowly, then the time series should be considered nonstationary. 以 ACF 判斷平穩性
15 Sample partial autocorrelation at lag k is PACF : partial autocorrelation function, 由 r kk, k= 0,1,2,….. 組成的函數 Standard error of r kk : ACF 及 PACF 是辨識 Box-Jenkins 模式的重要工具