Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: THEend8_
QBUS6840 Predictive Analytics
Mid-term exam sample question solutions
You might try to refine and improve the given sample solutions. Question 1 () Solution: The simple exponential smoothing for forecasting in the weighted average form can be shown as: Ŷt+1 = αYt + (1− α)Ŷt The forecast Ŷt+1 at time t + 1 is equal to a weighted average between the most recent observation Yt and its forecast Yˆt. The naive forecast method uses the most recent value Yt as the forecast Ŷt+1 at time t+ 1 and follows the form: Ŷt+1 = Yt = 1× Yt. Therefore, the simple exponential smoothing method includes the naive method as a special case. When α = 1, the simple exponential smoothing method has 100% weight on the most recent observation Yt and becomes the naive method. Question 2 () Solution: (1) There is an obvious up-trend in linear way. There is no obvious cycle compo- nent. Although the graph is cluttered, we can still see a potential seasonal component presented in the data. The seasonal magnitude (or the gap between each rise and fall) does not proportionally change along with the time. Also there is sharp drop around time range from 155 to 165 (these numbers are just some estimates), then it resumes the main trend. (In the exam, you will not lose marks if you miss this point). (2) Given the patterns identified in (1), the following methods can be tried: a. Additive decomposition model. This method is capable of picking up all the components identified in (1). In this method, the trend can be estimated by linear regression model. b. Additive Holt-Winters (Seasonal) Smoothing Model. This model could be used as its level, trend component and seasonal components can be all time-dependent. Question 3 () Solution: 1. Smooth the data to remove seasonality, leading to the initial trend-cycle esti- mate. Compute the de-trend series Yt T̂t 2. For each season (M in total), compute the average of the de-trended values for that season. 3. Compute the seasonal indices by normalising the previous step M values to make sure that they add up to M 4. The estimated seasonal component Ŝt is obtained by concatenating these sea- sonal indices, then compute seasonally adjusted series 5. If forecasting, fit a trend model such as linear regression to the seasonally adjusted time series, otherwise smooth the seasonally adjusted time series 6. Check the estimated remainder and see whether it shows any pattern. If no pattern displayed, stop; otherwise, estimate the cycle-reminder and go to the next step 7. Smooth the cycle-reminder to estimate the cycle 8. Finally estimate the remainder by removing the cycle, seasonal and trend components from the original series Yt Page 2 Question 4 () Solution: (1) Note: as mentioned in the question: “You only need to present your final solution.” Therefore, you only need to type your answers as below: ̂̂ Y t = 1 9(Yt−2 + Yt+2) + 2 9(Yt−1 + Yt+1) + 1 3Yt (2) Note: as mentioned in the question: “You only need to present your final solution.” Therefore, you only need to type your answers as below: ̂̂ Y t = 1 21(Yt−4 + Yt+4) + 2 21(Yt−3 + Yt+3) + 1 7(Yt−2 + Yt−1 + Yt + Yt+1 + Yt+2) (3) For part (1) of this question, we will lose 2 data points at the start and 2 data points at the end. For part (2) of this question, we will lose 4 data points at the start and 4 data points at the end. (4) The smoother in part (1) of this question is a WMA-5, so we have k = 5. The smoother in part (2) of this question is a WMA-9, so we have k = 9. (5) Both smoothers in part (1) and (2) of this question are symmetric. Both smoothers are symmetric since the coefficients of Yt−i and Yt+i are the same in the average formula. Solution: The details of the solutions for part (1) and (2) of this questions are shown below, while you do NOT have to type such solving details into the answer box. (1) In step 1, we do three MA-3 on the given time series for time t− 1, t, t+ 1: Page 3 Ŷt−1 = Yt−2 + Yt−1 + Yt 3 . Ŷt = Yt−1 + Yt + Yt+1 3 . Ŷt+1 = Yt + Yt+1 + Yt+2 3 . In step 2, we do another MA-3 over the smoothed series of step 1: ̂̂ Y t = Ŷt−1 + Ŷt + Ŷt+1 3 = 1 9(Yt−2 + Yt+2) + 2 9(Yt−1 + Yt+1) + 1 3Yt (2) In step 1, we do three MA-7 on the given time series for time t− 1, t, t+ 1: Ŷt−1 = Yt−4 + Yt−3 + Yt−2 + Yt−1 + Yt + Yt+1 + Yt+2 7 . Ŷt = Yt−3 + Yt−2 + Yt−1 + Yt + Yt+1 + Yt+2 + Yt+3 7 . Ŷt+1 = Yt−2 + Yt−1 + Yt + Yt+1 + Yt+2 + Yt+3 + Yt+4 7 . In step 2, we do another MA-3 over the smoothed series of step 1: ̂̂ Y t = Ŷt−1 + Ŷt + Ŷt+1 3 = 121(Yt−4 + Yt+4) + 2 21(Yt−3 + Yt+3) + 1 7(Yt−2 + Yt−1 + Yt + Yt+1 + Yt+2) Question 5 () Solution: Note: as mentioned in the question: “For all questions, you only need to present your final solution.” Therefore, you only need to type your answers as below: (1) Page 4 The error correction form of lt equation is: lt = lt−1 + αεt. (2) The 1, 2 and 3-step-ahead point forecasts of the model are all equal to lt: ŶT+1 = ŶT+2 = ŶT+3 = lt (3) The 1-step-ahead forecast variance of the model is: Var(Yt+1|Y1:t) = σ2. The 2-step-ahead forecast variance of the model is: Var(Yt+2|Y1:t) = σ2(1 + α2) The 3-step-ahead forecast variance of the model is: Var(Yt+3|Y1:t) = σ2(1 + 2α2) Solution: The details of the solutions are shown below, while you do NOT have to type such solving details into the answer box. (1) The error correction form of lt equation can be derived as: lt = αYt + (1− α)lt−1 = lt−1 + α(Yt − lt−1) = lt−1 + αεt. (2) For the 1-step-ahead point forecast, we have: Ŷt+1 =E(lt + εt+1|Y1:t) =E(lt) + E(εt+1|Y1:t) = lt + E(εt+1) = lt + 0 = lt where we have used the assumption εt+1 ∼ N(0, σ2), so E(εt+1) = 0. For the 2-step-ahead point forecast, we have: Ŷt+2 = E(lt+1 + εt+2|Y1:t) = E(lt + αεt+1|Y1:t) = lt Page 5 For the 3-step-ahead point forecast, we have: Ŷt+3 = E(lt+2 + εt+3|Y1:t) = E(lt+1 + αεt+2|Y1:t) = E(lt + αεt+1|Y1:t) = lt (3) For the 1-step-ahead forecast variance, we have: Var(Yt+1|Y1:t) = Var(lt + εt+1|Y1:t) = Var(lt) + Var(εt+1|Y1:t) = 0 + σ2 = σ2. For the 2-step-ahead forecast variance, we have: Var(Yt+2|Y1:t) = Var(lt+1 + εt+2|Y1:t) = Var(lt + αεt+1 + εt+2|Y1:t) = Var(lt) + Var(αεt+1) + Var(εt+2|Y1:t) = 0 + α2Var(εt+1) + Var(εt+2|Y1:t) = α2σ2 + σ2 = σ2(1 + α2) For the 3-step-ahead forecast variance, we have: Var(Yt+3|Y1:t) = Var(lt+2 + εt+3|Y1:t) = Var(lt+1 + αεt+2 + εt+3|Y1:t) = Var(lt + αεt+1 + αεt+2 + εt+3|Y1:t) = σ2(1 + 2α2) Question 6 () Solution: (1) Page 6 Note: as mentioned in the question: “You only need to present your final solution.” Therefore, you only need to type your answers as below: The lt equation error correction form is: lt = lt−1 + bt−1 + αεt. The bt equation error correction form is: bt = bt−1 + βαεt. (2) Note: as mentioned in the question: “You only need to present your final solution.” Therefore, you only need to type your answers as below: The 1-step-ahead point forecast is: Ŷt+1 = lt + bt. The 2-step-ahead point forecast is: Ŷt+2 = lt + 2bt. The 3-step-ahead point forecast is: Ŷt+3 = lt + 3bt. (3) When we simply applying a linear trend (regression), we assume the trend inter- cept and slope keep as constants in the entire time span. In Holt’s linear method (or trend corrected exponential smoothing), the intercept (the level lt) and slope (the trend/direction bt) both changes as the time changes. This demonstrates the Holts linear method is potentially more flexible and accurate than simply apply- ing a linear trend (regression). However in the forecast stage, as we do not have any future true data available, the forecast of Holt’s linear method is calculated according to the most recent level lt and the most recent trend bt (times h). Solution: The details of the solutions for part (1) and (2) of this question are shown below, while you do NOT have to type such solving details into the answer box. (1) The error correction form for the lt equation can be derived as: lt = αYt + (1− α)(lt−1 + bt−1) = lt−1 + bt−1 + α(Yt − lt−1 − bt−1) = lt−1 + bt−1 + αεt Page 7 The error correction form for the bt equation can be derived as: bt = β(lt − lt−1) + (1− β)bt−1 = bt−1 + β(lt − lt−1 − bt−1) = bt−1 + βαεt (2) The 1-step-ahead point forecast can be derived as: Ŷt+1 = E(Yt+1|Y1:t) = E(lt + bt + εt+1|Y1:t) = lt + bt The 2-step-ahead point forecast can be derived as: Ŷt+2 = E(lt+1 + bt+1 + εt+2|Y1:t) = E(lt + 2bt + α(1 + β)εt+1 + εt+2|Y1:t) = lt + 2bt The 3-step-ahead point forecast can be derived as: Ŷt+3 = E(lt+2 + bt+2 + εt+3|Y1:t) = E((lt+1 + bt+1 + αεt+2) + (bt+1 + βαεt+2) + εt+3) = E(lt+1 + 2bt+1 + α(1 + β)εt+2 + εt+3) = E((lt + bt + αεt+1) + 2(bt + βαεt+1) + α(1 + β)εt+2 + εt+3) = E(lt + 3bt + α(1 + 2β)εt+1 + α(1 + β)εt+2 + εt+3) = lt + 3bt END OF EXAMINATION.