You are on page 1of 10

Forecasting with Seasonality Version 1.

6
Dr. Ron Tibben-Lembke Sept 9, 2003

Forecasting with seasonality and a trend is obviously more dicult than forecasting for a trend or for seasonality by itself, because compensating for both of them is more dicult than either one alone. This introduction will cover multiple ways of forecasting for this situation, but any method must involve essentially the same steps: 1. Estimate the amount of seasonality (the seasonal factors or seasonal indices) 2. Estimate the trend (the rate demand is growing at) 3. Make a straight-line prediction of future demand 4. Adjust straight-line projection for seasonality to get a seasonalized forecast Unfortunately, as we will see, we cant just throw all the data into linear regression and see what comes out. Linear Regression does not take seasonality into account, and since we are concerned with seasonal demand here, we need to include it in our considerations. This introduction will cover basic forecasting methods, how to set the parameters of those methods, and how to measure forecast accuracy. We will use the following terminology: Fi Forecast of demand in period i. Di Actual demand in period i. Ft,i Forecast of what the demand will be in period i; forecast was made at time t.

Estimating Seasonal Indices

This section introduces two methods for estimating the growth rate of demand, which I call the seasonal average and the deseasonalized methods. To get an estimate of the seasonal index for each month (or quarter, week, etc., depending on the data), we need to rst talk about seasonality. Seasonal demand has a pattern that repeats. Demand for clothing has a seasonal pattern that repeats every 12 months. Some companies may analyze annual seasonal patterns quarterly. The months (or quarters) we will refer to as periods.

Demand with an annual seasonal pattern has a cycle that is 12 periods long, if the periods are months, or 4 periods long if the periods are quarters. A seasonal index is how much the demand for that particular period tends to be above (or below) the average demand. So to get an accurate estimate of this, we have to get some kind of average for the demand in the rst period of the cycle, and the second period, etc., and then compare these average demands per period to some kind of overall average demand. This might be the average demand for the past cycle, or over multiple cycles. Suppose that your demand varies over the course of the year, but that there is no long term growth in demand. Suppose we are concerned about how demand goes up or down by quarter. The way we will look at it, we will ask how much the rst quarters demand is higher or lower than the average, and ask the same about the other quarters. To do that, we will compute something called a seasonal index. An index of 1.00 means that the demand for that period is exactly the same as the average. An index of 1.10 means the demand is 10% higher than the average, and an index of 0.85 means this periods demand is 15% lower than the average.

Seasonality and a Trend

There is more than one way to do most of the steps listed above, so I will walk through each of them. We will use the data below, shown in Graph 1 as an example. The periods are months, and the cycle appears to have length 4 (an awful lot like product X in ProSim). Month Demand 1 5,384 2 8,081 3 10,282 4 9,156 5 6,118 6 9,139 7 12,460 8 10,717 9 7,825 10 9,693 11 15,177 12 10,990 To estimate the seasonal factors, we are going to do it two dierent ways: 1. Averaging the demands each period, and dividing by the overall average 2. Using a linear regression through seasonalized points

2.1

Average Method

This method averages the demands for each period of the cycle to create an for each period, and an overall average.

Period Cycle 1 Cycle 2 Cycle 3 Average 1 5,384 6,118 7,825 6,442.3 2 8,081 9,139 9,693 8,971.0 3 10,282 12,460 15,177 12,639.7 4 9,156 10,717 10,990 10,287.7 Overall Average 9,585.17 So we have found what the average demand is for period 1 of a cycle, for period 2, etc. If we divide these averages by the overall average, we get the following seasonal indices: Period Period Avg Overall Avg Index 1 6,442.3 9,585.17 =0.672 2 8,971.0 9,585.17 =0.936 3 12,639.7 9,585.17 =1.319 4 10,287.7 9,585.17 =1.073 The problem with this method is that it doesnt compensate as well as might be desired for the trend.

2.2

Linear Regression Method

In this method we will do a linear regression through the data points. Then we will get a seasonal index for each data point by dividing the actual demand by the linear regression forecast for the period. Then, well average all of the rst period indexes to get the index for the rst period. On our data, we get intercept = 6588.12, slope = 461.08. Month Demand Linear Forecast Index 1 5,384 7,049.2 = 0.7638 2 8,081 7,510.3 = 1.0760 3 10,282 7,971.4 = 1.2899 4 9,156 8,432.5 = 1.0858 5 6,118 8,893.5 = 0.6879 6 9,139 9,354.6 = 0.9769 7 12,460 9,815.7 = 1.2694 8 10,717 10,276.8 = 1.0428 9 7,825 10,737.9 = 0.7287 10 9,693 11,199.0 = 0.8655 11 15,177 11,660.0 = 1.3016 12 10,990 12,121.1 = 0.9067 When we average them, we get numbers that are a little bit dierent from the previous method: I1 =(0.7638 + 0.6879 + 0.7287)/3 = 0.7268 I2 = (1.0760 + 0.9769 + 0.8655)/ 3 =0.9728 I3 = (1.2899 + 1.2694 + 1.3016)/3 =1.2870 I4 = (1.0858 + 1.0428 + 0.9067)/3 =1.0118 The only problem with this method is that it is hard to reliably t a straight line to the seasonalized data, because the seasonal data is so far away from the points you are trying to t to. An analogy might be to imagine trying to drive down the middle of a very wide, at valley, by looking at the mountains on either side and trying to gure out where the middle is, versus driving down the middle of a city street if there werent any street markings (or other cars around) by looking at the buildings on either side.

Estimating the Growth Rate

There are two methods for this. In one, we look at how much total sales per cycle change from one cycle to the next. In the other, we deseasonalize the individual demand numbers to see how demands per period go up or down. The deseasonalizing method works better, but Ill explain the other one rst.

3.1

Growth per Cycle Method

In this method, we compare the total demand over the rst cycle to the total demand over the second cycle and over the third cycle. For product X, we have: Period Cycle 1 Cycle 2 Cycle 3 1 5,384 6,118 7,825 2 8,081 9,139 9,693 3 10,282 12,460 15,177 4 9,156 10,717 10,990 Total 32,903 38,434 43,685 If we do a linear regression through these totals, we get an intercept of 27,558.67, and a slope of 5391.00. We can then use this slope and intercept to make a straight-line forecast of the future demand, which we will then multiply by the seasonal factors to get a seasonalized forecast. The problem with this method is that we assume that growth happens in big chunks or jumps, not gradually over time.

3.2

Deseasonalizing Method

The deseasonalizing method uses the seasonal factors we already created to try to get a picture of how much weve been growing over time. What is deseasonalizing? After we make a straight-line forecast of the future, we are going to multiply it by the seasonal indices to get a seasonalized forecast of the future. Deseasonalizing is basically the opposite: we are going to take the actual, seasonal data, and divide it by the seasonal factors to get something that looks more like a straight line. Then we are going to do a linear regression through this line. Heres where the analogy of driving through a wide valley versus driving down a street comes in again. The deseasonalized demands should be a lot more like a straight line than the original data is. When we do a linear regression through these deseasonalized points, the linear regression should give us a pretty good t through the points.

Month Seasonal Index Deseas. 1 5,384 0.7268 = 7,407.8 2 8,081 0.9728 = 8,306.8 3 10,282 1.2870 = 7,989.4 4 9,156 1.0118 = 9,040.5 5 6,118 0.7268 = 8,417.7 6 9,139 0.9728 = 9,394.3 7 12,460 1.2870 = 9,681.7 8 10,717 1.0118 =10,592.3 9 7,825 0.7268 =10,766.3 10 9,693 0.9728 = 9,963.8 11 15,177 1.2870 =11,792.9 12 10,990 1.0118 =10,862.1 If we do a linear regression through these deseasonalized numbers, we get an intercept of 7278.03 and a slope of 344.72.

Straight-Line Projection of Future Demand

Use the linear regression calculated previously to extrapolate out into the future. Period Linear Forecast 1 7,622.74 2 7,967.46 3 8,312.18 4 8,656.90 5 9,001.62 6 9,346.34 7 9,691.06 8 10,035.78 9 10,380.50 10 10,725.22 11 11,069.94 12 11,414.65

Making Seasonalized Forecasts

Multiply the linear forecast you made by the seasonal factors to get a seasonalized forecast.

Period 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

Linear Forecast 7,622.74 7,967.46 8,312.18 8,656.90 9,001.62 9,346.34 9,691.06 10,035.78 10,380.50 10,725.22 11,069.94 11,414.65 11,759.37 12,104.09 12,448.81 12,793.53

* * * * * * * * * * * * * * * *

Index 0.7268 0.9728 1.2870 1.0118 0.7268 0.9728 1.2870 1.0118 0.7268 0.9728 1.2870 1.0118 0.7268 0.9728 1.2870 1.0118

Forecast = 5,540.3 = 7,750.9 = 10,697.5 = 8,758.8 = 6,542.4 = 9,092.3 = 12,472.0 = 10,153.9 = 7,644.6 = 10,433.7 = 14,246.6 = 11,549.05 = 8,546.78 = 11,775.13 = 16,021.14 = 12,944.16

Triple Exponential Smoothing

When there is a trend and no seasonality, we used double exponential smoothing, in which we smoothed our estimates of the trend and the intercept in every period. It is possible to take this approach one step further, by smoothing the estimates of the seasonal factor every time. This is known as Winters Method. To do this, you rst smooth the seasonal factor of the most recent period of demands, then you have to make sure that all of the seasonal indexes add up to the right thing. If there are 4 periods in a cycle, all the factors need add up to 4. If they all add up to 4.2, then each factor needs to be multiplied by 4/4.2. Then, the estimates of the intercept and the trend need to be revised. However, to properly take the seasonal factors into account, the formulas are more complicated than the ones for double exponential smoothing. Statistical studies show that there is, in theory, some value to be gained from using such a complicated method. However, the actual gains are likely to be small for any real world usage.

Na ve Methods

In addition to these complicated methods, there are two much simpler, na ve methods that may work well with seasonality and a trend.

7.1

N1: Na ve 1

The simplest na ve method is to use as the forecast, the actual demand from the previous period. In this case, Ft = Dt1 . One advantage of this method is that if there is a trend, the forecast is drawing from very recent demand for its information. The downside to this method is that this method is driving by looking in the rear view mirror on a winding road. We know demand is going up and down in a seasonal pattern, and this method is consciously doing the wrong thing. Would you set your January sales forecast equal to what your sales were in December?

7.2

N2: Na ve 2

This brings us to N2. Instead of assuming that the demand next period will be the same as it was in the previous period, we will assume that the demand in the next period will be the same as it was in that period of the previous cycle. For example, if the demand seasonality repeats on an annual basis, we would predict that the demand for next December will be the same as it was last December. Ft = Dtn where n is the length of the seasonality. N2 has the advantage that it is not using data from the wrong period of the cycle, as N1 does. The disadvantage N2 has is that it uses data from the previous cycle. Therefore, if there is a trend to the data, N2 may signicantly lag behind the trend.

7.3

N3: Na ve 3

N1 and N2 are methods presented in forecasting textbooks. This method is not, because it is a simple one that I think is worth considering. Unfortunately, I have not yet had the chance to see how well it performs under a variety of conditions. In N3, we will basically take the N2 forecast and add on a xed amount to represent the yearover-year growth. We will let 3 (delta) represent the amount by which demand each period is

higher this cycle than it was last cycle. Then we get: Ft = Dtn + 3 where the cycle lasts n periods, as it did above. So, for example, if sales are roughly 1,000 units per month higher than last year, our December forecast is to be 1,000 units higher than last Decembers sales.

7.4

N4: Na ve 4

N4 is similar to N3, in that it takes the demand from the previous cycle, but instead of using an additive growth factor, it uses a multiplicative factor: Ft = Dtn (1 + 4 ). So if demands this year are running 10% greater than last year, we would use 4 = 0.10, and our estimate for this Decembers sales would be for them to be 10% greater than last years December sales. Again, I have not seen any detailed analysis of the performance of these methods (N3 and N4), so I dont know how well these will work. In theory, they should not work quite as well as the other methods weve seen. On the other hand, I think they probably dont work a lot worse than the other methods, plus they are easy to explain and to understand.

Problems
1. Using the demand from problem 1 below, do the following: (a) Graph the data - how long does the cycle seem to be? (b) Calculate the seasonal indexes using the average method. (c) Estimate the growth using the deseasonalizing method. (d) Make forecasts for periods 1-48 using the indexes and growth estimates. (e) Calculate the MAD of these forecasts. 2. Using the data from problem 2 below, do the following: (note these are dierent from the other problem.)

(a) Graph the data - how long does the cycle seem to be? (b) Calculate the seasonal indexes using the linear regression method. (c) Estimate the growth using the growth per cycle method. (d) Make forecasts for periods 1-48 using the indexes and growth estimates. (e) Calculate the MAD of these forecasts. 3. Repeat problem 1, using N1. Which is better, N1 or the method of problem 1? 4. Repeat problem 2, using N2. Which is better, N2 or the method of problem 2?

Period 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48

Problem 1 Demand 120 150 180 190 175 140 112 90 78 83 90 108 140 175 190 205 170 130 108 90 75 82 90 109 140 180 210 230 199 174 124 97 110 124 136 140 160 200 239 254 201 176 120 94 105 120 132 143

Problem 2 Demand 30 20 12 25 45 49 36 29 17 34 51 55 45 35 22 41 58 63

10

You might also like