INTRODUCTION TO FORECASTING (PART 2) AMAT 167
Techniques for Trend
EXAMPLE OF TRENDS In our discussion, we will focus on linear trend but here are examples of nonlinear trends:
EXAMPLE OF TRENDS If you want to study other techniques for finding trends, study signal analysis.
LINEAR TREND EQUATION
LINEAR TREND EQUATION
HOW TO COMPUTE FOR a AND b FROM DATA We can use the formula in linear regression MS Excel also has a feature for automatically computing the parameters In MS Excel, you can also compute for R 2.
TREND-ADJUSTED EXPONENTIAL SMOOTHING (DOUBLE SMOOTHING) This is used when data vary around an average or have step or gradual changes. If a series exhibits trend, and simple smoothing is used on it, the forecasts will all lag the trend: If the data are increasing, each forecast will be too low; if decreasing, each forecast will be too high.
TREND-ADJUSTED EXPONENTIAL SMOOTHING (DOUBLE SMOOTHING) The trend-adjusted forecast (TAF) is Estimate for the slope
EXAMPLE alpha=0.4 beta=0.3 Period Actual (At) Tt St TAFt Error 1 700 2 724 24 700 3 720 10 724 724-4 4 728 10 731.6 734-6 5 740 9.28 740.96 741.6-1.6 6 742 9.088 746.944 750.24-8.24 7 758 8.0992 756.8192 756.032 1.968 8 750 8.33536 758.95104 764.9184-14.9184 9 770 6.545152 768.37184 767.2864 2.7136 10 775 6.870784 774.950195 774.916992 0.083008 11 FUTURE 781.820979
EXAMPLE 790 780 770 760 750 740 730 720 710 700 690 0 2 4 6 8 10 12 Actual (At) TAFt Simple Exponential Smoothing
Techniques for Seasonality
EXAMPLE OF SEASONALITY weather variations (e.g., sales of winter and summer sports equipment) vacations or holidays (e.g., airline travel, greeting card sales, visitors at tourist and resort centers) daily, weekly, monthly, and other regularly recurring patterns in data (e.g., rush hour traffic occurs twice a day incoming in the morning and outgoing in the late afternoon)
EXPRESSION OF SEASONALITY If the series tends to vary around an average value, then seasonality is expressed in terms of that average (or a moving average). If trend is present, seasonality is expressed in terms of the trend value.
expressed as a quantity (e.g., 20 units), which is added to or subtracted from the series average MODELS OF SEASONALITY expressed as a percentage of the average (or trend) amount (e.g., 1.10), which is then used to multiply the value of a series
WE WILL USE THE MULTIPLICATIVE MODEL (COMMONLY USED) Seasonal percentages in the multiplicative model are referred to as seasonal relatives or seasonal indexes. Suppose that the seasonal relative for the quantity of toys sold in May at a store is 1.20. This indicates that toy sales for that month are 20 percent above the monthly average. A seasonal relative of.90 for July indicates that July sales are 90 percent of the monthly average.
REMARKS Knowledge of the extent of seasonality in a time series can enable one to remove seasonality from the data (i.e., to seasonally adjust data) in order to discern other patterns or the lack of patterns in the series. Seasonal relatives are used in two different ways in forecasting. One way is to deseasonalize data; the other way is to incorporate seasonality in a forecast.
DESEASONALIZING THE DATA We want to remove the seasonal component from the data in order to get a clearer picture of the nonseasonal (e.g., trend) components. Deseasonalizing data is accomplished by dividing each data point by its corresponding seasonal relative (e.g., divide November demand by the November relative, divide December demand by the December relative, and so on).
EXAMPLE Period Quarter Sales Quarter Relative (given) Deseasonalized Sales 1 1 158.4 1.2 132 2 2 153 1.1 139.0909091 3 3 110 0.75 146.6666667 4 4 146.3 0.95 154 5 1 192 1.2 160 6 2 187 1.1 170 7 3 132 0.75 176 8 4 173.8 0.95 182.9473684
250 EXAMPLE 200 150 100 50 0 0 2 4 6 8 10 Sales Deseasonalized Sales
INCORPORATING SEASONALITY IN A FORECAST Steps: 1. Obtain trend estimates for desired periods using a trend equation. 2. Add seasonality to the trend estimates by multiplying these trend estimates by the corresponding seasonal relative (e.g., multiply the November trend estimate by the November seasonal relative, multiply the December trend estimate by the December seasonal relative, and so on).
250 EXAMPLE 200 Note: You can also use the trend line generated by the deseasonalized data which is y = 7.3473x + 124.53 R² = 0.99837 150 100 50 0 y = 3.3274x + 141.59 R² = 0.08656 0 2 4 6 8 10 Sales Linear (Sales)
EXAMPLE Period Quarter Sales Quarter Relative (given) Seasonalized Sales 1 1 158.4 1.2 2 2 153 1.1 3 3 110 0.75 4 4 146.3 0.95 5 1 192 1.2 6 2 187 1.1 7 3 132 0.75 8 4 173.8 0.95 9 1 171.5366 1.2 205.84392 (forecast using trend line)
COMPUTING SEASONAL RELATIVES USING SIMPLE AVERAGE METHOD When the data have a stationary mean (i.e., variation around an average), the SA method works quite well. It can be used to obtain fairly good values of seasonal relatives as long as the variations (seasonal and random) around the trend line are large relative to the slope of the line. Another approach is the Centered Moving Average: This approach effectively accounts for any trend (linear or curvilinear) that might be present in the data.
COMPUTING SEASONAL RELATIVES USING SIMPLE AVERAGE METHOD
EXAMPLE STEP 1 STEP 2 Season Week 1 Week 2 Week 3 Season Average SA Index Tues 67 60 64 63.66666667 0.88955422 Wed 75 73 76 74.66666667 1.04324684 Thurs 82 85 87 84.66666667 1.1829674 Fri 98 99 96 97.66666667 1.36460413 Sat 90 86 88 88 1.22954092 Sun 36 40 44 40 0.55888224 Mon 55 52 50 52.33333333 0.73120426 OVERALL AVERAGE= 71.57142857
NOTES ABOUT ASSOCIATIVE/CASUAL FORECASTING: LINEAR REGRESSION
WARNING! We will not discuss linear regression anymore. However, please take note of the following (you know these if you have taken STAT 101, STAT 166 etc). Use of simple regression analysis implies that certain assumptions have been satisfied, such as Variations around the line are random. If they are random, no patterns such as cycles or trends should be apparent when the line and data are plotted. Deviations around the average value (i.e., the line) should be normally distributed. Moreover, one needs a considerable amount of data to establish the linear relationship in practice, 20 or more observations.
Monitoring the Forecast Using Control Chart
CONTROL CHART
DETECT NONRANDOMNESS, EXAMPLES:
CREATING CONTROL CHARTS Control charts are based on the assumption that when errors (Actual-Forecast) are random, they will be distributed according to a normal distribution around a mean of zero. Recall that for a normal distribution, approximately 95.5 percent of the values (errors in this case) can be expected to fall within limits of 0±2s (i.e., 0±2 standard deviations), and approximately 99.7 percent of the values can be expected to fall within ±3s of zero. We approximate s, s MSE
CREATING CONTROL CHARTS For example, z can be 2 or 3.
DETECTING BIAS A value of zero would be ideal; limits of ±4 or ± 5 are often used for a range of acceptable values of the tracking signal.
DETECTING BIAS (ALTERNATIVE) MAD that is updated and smoothed (SMAD) using exponential smoothing