Transcription of Answers to Selected Exercises - Statistics
1 16 Answers to Selected Exercises CHAPTER 1 1. (a) Plugging the polynomial into the requirement mt Y,ajmt-ji we j have k / k / \ J^ciU = >i(5>(* )') 1=0 j M=0 ' k . = ^- ^ 1=0 ^ j Now equate the corresponding coefficients for tl, I = 0,1,.. to ob-tain CO = CO ]P FLJ Cl = Cl ( ^ + j 2 The problem is completed with these equalities. 239 Time Series: Applications to Finance with R and S-PlusKy, Second Edition by Ngai Hang Chan Copyright 2010 John Wiley & Sons, Inc.)
2 240 Answers TO Selected Exercises Jan, 50 Jan, 52 Jan, 55 Jan, 57 Jan, 60 Time in months Fig. Time series plot of airline passengers. (b) Justify these required equalities in part (a). SPLUS will facilitate the vector computation. 2. Notice that the p-th power terms cancel in cp(tp (t l)p). Thus the coefficient of the tp term in Am( is 0. If we apply the operator recursively onto this polynomial, the degree of the resulting polynomial decreases by 1 at each step. Therefore, Ap+1rnt = 0.)
3 3. The data consist of 144 points, which represent monthly totals in thou-sands of passengers from January 1949 to December 1960. (a) There is an upward trend of the data. By inspecting the above plot, we notice an annual (12 months) cycle. The variance in the data is increasing with time, thus a transform is needed. (b) The logarithmic transform is appropriate in this case. As we can see from the plot, the variance of the transformed data Vt = log(.X't) is no longer increasing with time. (c) The medians rise from 1949 to 1960, hence there is a clear increas-ing trend. The inter-quantile range also appears to increase, but only slightly.
4 The range tends to increase from 1949 to 1954, then it remains almost constant. The boxplots from 1949 to 1951 look symmetrical, but from 1952 to 1960 they are slightly positively skewed. We have not noticed any outliers. CHAPTER 1 - 1 1 1 1 1 1 Jan, 50 Jan, 52 Jan, 55 Jan, 57 Jan, 60 Time in months Fig. Time series plot of log transformed data. IN 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 Fig.
5 Boxplots and yearly running median for the transformed data. 242 Answers TO Selected Exercises Jen, 50 Jan. 52 Jan, 55 Jan. 57 Jan, 60 Fig. Plot of the trend estimate. (d) There is a seasonal cycle of period 12 (months) starting in January and ending in December. We estimate the trend using a 13-point moving average filter running over a complete cycle: Tt = ^-X{-6 + Xt-5 + + Xt+5 + 2^t+6^ The trend is plotted with a dashed line in the figure below. (e) Use the formula: 1 11 St = +12' t=i that is, take the mean of the observations corresponding to each month.}
6 We drop the first six observations and the last six, because the filter has 13 points. We plotted the seasonal component in the figure below. We also include the SPLUS code used to calculate the seasonal component. > < ( [-(139:144)] + [-(1:6)]) > < ( + [-(139:144)] [-(1:6)]) CHAPTER 1 243 Jan, 49 Mar, 48 May. 49 Jul, 49 Sep, 49 Nov, 49 Fig. Estimated seasonal components. > < - > <-matrix( , 11, 12, + byrow=T) > <-apply( , 2, mean) > <-c( [7:12], + [1:6]) > [1] [4] [7] [10] There is a small peak in December during the winter holiday.
7 The traffic drops from January to March, then it begins to increase until July and August, when we can notice a huge peak during the summer holiday. The traffic drops fast until November, when it starts to increase again. (f) The deseasonalized data does not exhibit any seasonal component, as expected. All we can see is a steady increasing trend. We estimate this trend again using the same formula as in (d). (g) The residuals rt = Xt rht St do not show any clear pattern, although they do not look like white noise either. The variance is increasing and decreasing over time, hence further analysis might be needed.
8 244 Answers TO Selected Exercises 1 1 1 1 Jan 50 Jan 52 Jan 54 Jan 56 Jan 58 Jan 60 Time In months Fig. Estimated trend for deseasonalized data. Jan, 50 Jan, 52 Jan, 55 Jan, 57 Jan, 60 Time in months Fig. Residuals plot. CHAPTER 2 1. (a) Write A12Xt = (1 - Bl2)Xt = Xt - Xt-i2 = 12/3 + Zt - Zt_12. Denote Yt = a + Zt Zt_i2, where a 12/3.
9 Now show that (Yt)t is a stationary process. We have E(Yt) = and Var(Yt) = Var(Zt) + Var(Zt_12) = 2. Hence, E(Yt2) = Var(Ft) + [E(yt)]2 = CHAPTER 2 245 2 + 144/32 < oo,Vt. Also 7y(r + t, s + t) Cov(Yr+t,Ys+t) Cov(Zr+t, Za+t) - Cov(Zr+t-i2, Zs+t) -\-Cov(Zr+t-l2, Zs+t) + Cov(Zr+(_i2, Zs+t-\2) -Cov(Zr+t,Zs+t_i2) Cov(Zr - Zr-u, Zs - Zs-i2) Cov(Fr,Fs) 7y (r,s), Vr,s,i. Therefore, {Yt,t (b) We have 1,2,..} is stationary. We still have seasonal factors {St}, hence we haven't obtained a stationary process.)
10 Use the operator 22. Let Yt = A22Xt,Vi = 1,2,.. Then, Yt = (1 - Bl2)2Xt = (1 - 2S12 + B2A)Xt = Zt- 2Zt-i2 + Zt-M-Clearly E[Yt] = 0 and var(Yt) = 6. After some simple calculations, we can also show that 7y(r + t,s + t) = yy(r,s),Vr,s,t. Thus {Yt,t = 1,2,..} is stationary. 2. We need the following formulas: cos(x) + cos(a; + h) + .. + cos(x + nh) sin(x) + sin(a; + h) + .. + sin(x + nh) sin (I) sm(^h) sin ( + ) sin (I) where h 2/ , k . We have X 1 * t=l ( ) 8{ ) sin (I) and n k <7fc = (Xt-X)(*t+fc-X).}