Upcoming SlideShare
×

# lect1

299 views

Published on

Published in: Technology, Economy & Finance
0 Likes
Statistics
Notes
• Full Name
Comment goes here.

Are you sure you want to Yes No
• Be the first to comment

• Be the first to like this

Views
Total views
299
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
5
0
Likes
0
Embeds 0
No embeds

No notes for slide

### lect1

1. 1. BUSINESS STATISTICS BEO1106 WEEK 11 BUSINESS AND LAW Dr. Hubert Fernando and Dr. Sidney Lung 2012 WWW.VU.EDU.AU 1
2. 2. Business Statistics TIME-SERIES ANALYSIS Textbook Chapter 14
3. 3. TIME-SERIES ANALYSIS • According to classical time-series analysis an observed time series is the combination of some pattern and random variations. The aim is to separate them from each other in order to a) describe the historical pattern in the data, and to b) prepare forecasts by projecting the revealed historical pattern into the future. • The pattern itself is likely to contain some, or all, of the following three components: trend, seasonal and cyclical. 3
4. 4. Trend: The long-term general change in the level of the data with a duration of longer than a year. Yt It can be linear (straight line) Yi = b 0 + b1X i t or non-linear (smooth curve), Hourly earnings: Manufacturing: Major seven countries Broad money: (sa): Sw eden 1995=100 1995=100 120 140 100 120 100 80 80 60 60 40 40 20 0 20 Sep-70 Sep-80 Sep-90 Sep-00 0 Jan-61 Jan-71 Jan-81 Jan-91 Jan-01 4
5. 5. Seasonal variations: Regular fluctuations within a period of no longer than a year. Yt Seasonal variations are usually associated with the four seasons of the year. t Hungary: Commodity output: Cement Australia: Retail turnover: Department stores '000 tonnes \$m 600 2500 500 2000 400 1500 300 1000 200 500 100 0 Dec-82 Dec-85 Dec-88 Dec-91 Dec-94 Dec-97 Dec-00 0 Jan-83 Jan-86 Jan-89 Jan-92 Jan-95 Jan-98 Jan-01 5
6. 6. Cyclical variations: Yt Fluctuations around the long-term trend, lasting longer than a year. Peak Beginning trough The time gap between the beginning trough and ending trough is the length of the cycle. t Ending trough Aus: Dw elling units approved: Private: New houses Cyclical variations are attributed to business cycles; to the ups and downs in the level of business activity. Expenditure on GDP: Construction: United States: (sa) Number bln 96 USD 40000 900 800 35000 700 30000 600 25000 500 20000 15000 Dec-70 400 Dec-75 Dec-80 Dec-85 Dec-90 Dec-95 Dec-00 300 Dec-60 Dec-70 Dec-80 Dec-90 Dec-00 6
7. 7. • The random variations of the data comprise the deviations of the observed time series from the underlying pattern. When this irregular component is strong compared to the (quasi-) regular components, it tends to hide the seasonal and cyclical variations, and it is difficult to be detached from the pattern. However, if we manage to capture the trend, the seasonal and cyclical variations, the remaining changes do not have any discernible pattern, so they are totally unpredictable. 7
8. 8. The four components of a time series ,T: trend, S: seasonal, C: cyclical, R: random) can be combined in different ways. Additive: Multiplicative: Yi = Ti + S i + Ci + I i Yi = Ti × S i × Ci × I i 135 = 60+12+36+27 135 = 60 x 1.2 x 1.5 x 0.25 e.g. If the trend is linear, these two models look as follows: Yi = (b 0 + b1X i ) + S i + Ci + I i Yi = (b 0 + b1X i ) × S i × Ci × I i 8
9. 9. Austria: Domestic demand: Retail sales: Volume Australia: Retail turnover: Recreational goods 1995=100 \$m 160 900 800 140 700 120 600 100 500 400 80 300 60 40 200 Dec-76 Dec-80 Dec-84 Dec-88 Dec-92 Dec-96 Dec-00 100 Jan-83 Jan-86 Jan-89 Jan-92 Jan-95 Jan-98 Jan-01 These time series have an increasing linear trend component. the fluctuations around this trend have the same intensity. the fluctuations around this trend are more and more intensive. 9
10. 10. SMOOTHING TECHNIQUES Are used to reduce, the random fluctuations in a time series so as to more clearly expose the existence of the other components. Example1 The daily (Monday – Friday) sales figures during the last four weeks were recorded in a medium-size merchandising firm. 70 60 Sales 50 40 30 20 10 week 1 Week 2 Week 3 Week 4 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Day 10
11. 11. Moving Average Day Sales 1 2 3 4 5 6 43 45 22 25 31 51 43 + 45 + 22 = 110 3-day moving average 3-day moving sum 3-day moving average 110.0 92.0 78.0 107.0 etc. 36.7 30.7 26.0 35.7 etc. 70 60 MA(3) Sales 50 40 30 MA(5) 20 10 110 = 36.67 3 Longer the period stronger the smoothing 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Day 11
12. 12. Centered Moving Average To calculate a 4-period moving average, MA(4) must be placed between the second and third observations. Since this makes interpretation and graphing difficult, we center the moving averages which are the 2-period moving averages of the 4period moving averages. 4-day centered moving average CMA(4). Day 1 2 3 4 5 6 7 Sales 43 45 22 25 31 51 41 MA(4) 33.8 30.8 32.3 37.0 40.0 etc. CMA(4) 32.3 31.5 34.6 38.5 etc. 33.8 + 30.8 = 32.3 2 12
13. 13. Exponential Smoothing Ei = wYi + (1 − w) Ei −1 where Ei : exponentially smoothed value for time period i ; Ei-1 : exponentially smoothed value for time period i -1; Yi : observed value for time period i ; w : smoothing constant, 0 < w < 1. a) Assuming that Y has been observed from i = 1, this formula can be applied only from the second time period. For i = 1 we set the smoothed value equal to the observed value, i.e. E1 = Y1 b) The smoothing constant determines the strength of smoothing, the larger the value of w the weaker the smoothing effect. 13
14. 14. Example 2: Using the quarterly Australian unemployed persons (in thousands) data for the years 1989-98, a) Apply the exponential smoothing technique with W = 0.2 and W = 0.7. w = 0.2 1989 1990 1 2 3 4 1 2 Y E (W=0.2) E (W=0.7) 1735.6 1735.6 1735.6 1507.9 1690.1 1576.2 1450.2 1642.1 1488.0 1402.7 1594.2 1428.3 1689.9 1613.3 1611.4 1621.4 1615.0 1618.4 etc. etc. etc. i E1 = Y1 = 1735.6 E 2 = WY2 + (1 − W )E1 = 0.2 ×1507.9 + 0.8 ×1735.6 = 1690.1 E3 = WY3 + (1 − W)E 2 = 0.2 ×1450.2 + 0.8 ×1690.1 = 1642.1 14
15. 15. Plot the time series and the exponential smoothed values on the same graph. 3500 If w = 0.7, Ei is quite similar to Yi, i.e. there is very little smoothing. 3000 2500 2000 However, if w = 0.2, Ei does not have the fluctuations of Yi, i.e. there is far more smoothing. 1500 1000 500 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 0 1989 1990 1991 1992 Y 1993 1994 S (w=0.2) 1995 1996 1997 1998 S (w=0.7) 15
16. 16. HOW TO CAPTURE THE TREND, CYCLICAL AND SEASONAL COMPONENTS? If we decompose a time series into the trend, seasonal and cyclical components, then we can construct a forecast by projecting these parts into the future. 1) Trend analysis The easiest way of isolating a long-term linear trend is by simple linear regression, where the independent variable is the time variable i. and i is equal to 1 for the first time period in the sample and increases by one each period thereafter. 16
17. 17. Example 3: The graph below shows Australian exports of footwear (\$m) from 1988 through 2000. Exports: 85: Footw ear: ANNUAL \$m 70 60 This time series has an upward trend, which is linear. 50 40 30 20 10 1988 1990 1992 1994 1996 1998 2000 Estimate a linear trend line using Excel. First you have to create a time variable Xi and then regress fwexport on Xi. ˆ Yi = 15.308 + 4.505X i year 1988 1989 1990 1991 1992 1993 i 1 2 3 4 5 etc. fwexport 14 23 22 30 36 etc. 17
18. 18. 80 70 60 50 40 30 ˆ Yi = 15.308 + 4.505X i 20 10 0 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 fwexport y-hat Note: In the first year of the sample period i = 1 not 0. b 0 = 15.308 In 1987 (i = 0) the trend value of footwear exports is 15.308 \$m. b1 = 4.505 Each year the value of footwear exports increases by 4.505 \$m. ˆ In 1988 (i = 1) Y = 15.308 + 4.505 ×1 = 19.813 \$m 1 ˆ In 1999 (i = 12) Y12 = 15.308 + 4.505 ×12 = 69.368 \$m 18
19. 19. 2) Measuring the cyclical effect Assume that the time series model is multiplicative and consists of only two parts: the trend and the cyclical components so that Ci = Yi = Ti × Ci Yi Ti Under these assumptions the cyclical effect can be measured by expressing the actual data as the percentage of the trend: Yi × 100 % ˆ Y i Calculate and plot the percentage of trend. year 1988 1989 1990 1991 1992 t 1 2 3 4 5 fwexport 14 23 22 30 etc. Y-hat Y/Y-hat*100 19.81 70.66 24.32 94.58 28.82 76.32 33.33 90.01 etc. etc. 14 / 19.81 * 100 ≈ 71 So in 1988 the actual exports of footwear were about 29% below the trend line. 19
20. 20. Boom 130 120 Expansion phase 110 100 90 Recession 80 70 Contraction phase Yi ˆ Yi × 100 % 60 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 We have assumed that the time series pattern does not have a seasonal component and that the random variations are negligible. In Example 3 the first of these assumptions is certainly satisfied since the data is annual. 20
21. 21. 3) Measuring the seasonal effect Depending on the nature of the time series, the seasonal variations can be captured in different ways. i. Assume, for example, that the time series does not contain a discernible cyclical component and can be described by the following multiplicative model Yi = Ti × S i × I i Yi = Si × Ii Ti This suggests that dividing the estimated trend component (y-hat) into the time series we obtain an estimate for the product of the seasonal and random variations. ˆ Seasonal factor: Yi / Yi In order to remove the random variations from this ratio, we average the seasonal factors for each season and adjust these averages to ensure that they add up to the number of seasons. 21
22. 22. ii. When the time series model is multiplicative and has all four parts, Yi = Ti × Ci × S i × I i the data is first divided by (centered) moving averages, which are supposed to capture the trend and cyclical components, CMA i = Ti × Ci Yi Yi = = Si × I i CMAi Ti × Ci Then the seasonal factors and indices are calculated from this Yi CMA i ratio: and the trend and cyclical components are estimated from the centered moving averages, instead of the original data. Note: The order of the centered moving average must be equal to the number of seasons. For example, we use 4-quarter CMA if the data is quarterly and seasonality has 4 phases a year, and we use 12-month CMA if the data is monthly and seasonality has 12 phases a year. 22
23. 23. Example 4: The graph below shows retail turnover for households goods (\$m) for Australia from the second quarter of 1982 through the fourth quarter of 2000. Retail turnover: Original: Household good retailing: QUARTERLY \$m 5000 4500 This time series has an upward linear trend and quarterly seasonal variations. It probably has some cyclical variations too, but this third component seems to be less significant than the other two. 4000 3500 3000 2500 2000 1500 Dec-82 Dec-85 Dec-88 Dec-91 Dec-94 Dec-97 Dec-00 a) Estimate a linear trend line with Excel. ˆ Yi = 1589.189 + 36.604X i 23
24. 24. ˆ Yi = 1589.189 + 36.604 X i b) Calculate the seasonal factors and the seasonal indices. quarter Jun-82 Sep-82 Dec-82 Mar-83 Jun-83 t 1 2 3 4 5 retail 1553.2 1601.9 2052.2 1666.0 1680.4 Y-hat Y/Y-hat 1625.8 0.955 1553.2 / 1625.8 = 0.955 1662.4 0.964 1699.0 1.208 1735.6 0.960 1772.2 0.948 In order to find the seasonal indices the seasonal factors (Y/Y-hat) have to be grouped, averaged and, if necessary, adjusted. 24
25. 25. Year 1982 1983 1984 etc. 0.929 × 4.000 = 0.930 3.997 Index 0.960 0.948 etc. 1998 1999 2000 Sum Average Q1 Q2 0.955 0.948 0.890 etc. Q3 0.964 0.962 0.905 etc. Q4 1.208 1.240 1.163 etc. 0.914 0.909 0.973 0.908 0.922 1.043 0.909 0.971 0.990 1.031 1.129 1.144 16.728 0.929 18.062 0.951 18.283 0.962 21.945 1.155 Total 3.997 0.930 0.951 0.963 1.156 4.000 S Mar = 93.0% S Sep = 96.3% S Jun = 95.1% S Dec = 115.6% These seasonal indices suggest that in the March, June and September quarters retail turnover is expected to be 7.0, 4.9 and 3.7% below its trend value, while in the December quarter retail turnover is expected to be 15.6% above its trend value. 25
26. 26. c) De-seasonalising a time series. quarter Jun-82 Sep-82 Dec-82 Mar-83 Jun-83 Sep-83 t 1 2 3 4 5 6 retail 1553.2 1601.9 2052.2 1666.0 1680.4 etc. Seasonal indices: S Mar = 93.0% S Jun = 94.8% S Sep = 96.5% S Dec = 115.7% Seasonal indices can be used to deseasonalise a time series, i.e. to remove the seasonal variations from the data. The seasonally adjusted data (in publications usually denoted as sa) is obtained by dividing the observed, unadjusted data by the seasonal indices. e.g. For the June quarter of 1982 the seasonally adjusted retail turnover is 1553.2 / 94.8 × 100 = 1638.2 \$m 26
27. 27. INTRODUCTION TO FORECASTING • • After having studied the historical pattern of a time series, if there is reason to believe that the most important features of the variable do not change in the future, we can project the revealed pattern into the future in order to develop forecasts. If a time series exhibits no (or hardly any) trend, cyclical and seasonal variations, exponential smoothing can provide a useful forecast for one period ahead: Fi +1 = E i Example 5: (Refer Example 2) We have applied exponential smoothing with W = 0.2 and W = 0.7 on quarterly Australian unemployed persons (in thousands). Since this time series does have some seasonal variations, exponential smoothing cannot be expected to forecast unemployment reasonably well. Nevertheless, just for illustration, let us forecast unemployment for the first quarter of 1999. 27
28. 28. 1998 1 2 3 4 unemployed E (W=0.7) 2461.4 2402.8 2210.9 2268.5 2221.3 2235.5 2102.6 2142.5 This is the smoothed value for the fourth quarter of 1998, and thus the forecast for the first quarter of 1999. • If a time series exhibits a long-term (linear) trend and seasonal variations, we can use regression analysis to develop forecasts in two different ways. We can forecast using the estimated trend and seasonal indices as: Fi = Ti × S i = (b 0 + b1X i ) × S i 28
29. 29. Example 6: (Refer Example 4) Forecast retail turnover for households goods for the first quarter of 2001 applying the first approach can be implemented as follows. Obtain the trend estimate from part a and the March seasonal index from part b so that ˆ i = 76, S76 = SMar = 0.930 and Yi = 1589.189 + 36.604X i ˆ F76 = Y76 = (1589.189 + 36.604x76)x0.930 = 4064.8 We have predicted retail turnover for households goods for the first quarter of 2001. Suppose we had another forecast value of 4203.4 for the same data and the same time period using a different forecasting model. How would we decide which forecast is more accurate? 29
30. 30. Measuring the forecast Error • How can we decide which forecasting model is the most accurate in a given situation? Forecast the variable of interest for a number of of time periods using alternative models and evaluate some measure(s) of forecast accuracy for each of these models. Among a number of possible criteria that can be used for this purpose a commonly used method is the, Mean absolute deviation: 1 n MAD = ∑ yt − Ft n t =1 30
31. 31. Example 7: Two forecasting models were used to predict the future values of a time series. They are shown next, together with the actual values. For each model, calculate MAD to determine which was more accurate. Ft et Model 1 Model 2 Model 1 Model 2 yt 6.0 6.6 7.3 9.4 7.5 6.3 5.4 8.2 6.3 6.7 7.1 7.5 -1.5 0.3 1.9 1.2 | et | Model 1 Model 2 -0.3 -0.1 0.2 1.9 1.5 0.3 1.9 1.2 Total: 6.0 – 7.5 0.3 0.1 0.2 1.9 4.9 2.5 | -1.5 | Model 1 : MAD = 4.9/4=1.225 Model 2 : MAD = 2.5/4=0.625 Model 2 is the more accurate. 31