• Tidak ada hasil yang ditemukan

Initialization

Dalam dokumen Introduction to Distribution Logistics (Halaman 165-171)

3.8 EXPONENTIAL SMOOTHING WITH SEASONALITY

3.8.4 Initialization

This forecasting method too is recursive and thus must be initialized to be properly used. We have to initialize s seasonality factors St and one average demand Bo. This could lead us to believe th at we need at least s

+

1 demand

observations. However. we only need s data points. The seasonality factors capture the difference between the demand in each specific month and the average month of the year. Thus, on the average they shall be equal t o 1.

This adds an extra constraint t o our problem. Thus to initialize (and use) this method, a t least s demand observations are required. With less than s demand observations (in our example 12 months) we cannot estimate the average demand in a season and thus we cannot estimate a single seasonality factor. Initializing demand is rather trivial when we only have s demand observations.

Bo

is simply equal to the average of the s (12 in the example) demand observations, and the s seasonality factors are equal to the ratio between demand in the related period (month) and the average demand

Bo:

C L

Y,

Bo

=

S

Just like in the previous cases, when we initialize with the very minimum set of data, errors might be considerable. In this specific case, each seasonality factor basically depends on a single demand draw that may be substantially different from its expected value (especially in the case of small time buckets and quite variable demand). Thus, in case more data are available, it is advisable to use more than s data points. We have already discussed the tradeoff we face when we choose the number 1 of periods that we use to initialize demand in section 3.6.4. If 1 is a multiple of s, we use ..whole seasons.” In this case. the simple average of the 1 observations is a good estimate for the average demand, as this metric is not influenced by seasonality since we take the average of demand over l / s seasons (years in the example). We can initialize the seasonality for a given month, say January, by comparing the average demand for all months of January in the fit sample t o the initial average monthly demand

Bo:

In the slightly more complex case where we do not consider whole seasons and thus 1 is not a multiple of s. we still compare the average demand in January to the average demand

Bo.

The only minor issue is t ha t in our fit sample we might have 3 months of January (say 2004, 2005. and 2006) and just 2 months of December (say 2004 and 2005). A simple average of all demand observations would not be a reasonable estimate for the initial monthly demand

Bo,

as it is influenced by the seasonality of January (which is overrepresented in the fit sample). Thus, we might want t o compute first the average demand in each of the 12 months (average demand in January, February. March, etc.) and then take the average of these 12 (in general s)

EXPONENTIAL SMOOTHING WITH SEASONALITY 149

Table 3.16 Demand d a t a for a sport newspaper (data in thousands) weekday week 1 week 2 week 3 week 4 week 5

Tuesday 4 6 57 23 36 29

LVednesday 37 43 24 35 34

Thursday 19 35 34 43 38

Sunday 9 5 81 81 110 91

Friday 5 0 50 60 50 52

Saturday 6 fi 79 92 63 72

SIonday 121 114 123 116 113

figures. In this way, the estimate of average demand does not depend on the seasonality. as each month has an equivalent weight. The reader might want t o try to translate the above concepts into formulas.

Example 3.15 Let us consider a large newsstand in Italy. Among other newspapers the newsstand sells sport newspapers. The dominant player in this business is the newspaper called Gazzetta. The newsvendor keeps track of demand (including any lost sales) and wants to forecast demand. The newsvendor places orders for copies of tomorrow’s newspaper a t the end of the working day. So, the forecasting horizon is one day. Sow we are a t the end of week 5 (Monday night) and he/she needs to plan orders for next Tuesday.

So he/she need to generate a demand forecast. Table 3.16 shows data on the last 5 weeks of demand. Data show a clear seasonal pattern. as demand increases on Saturdays. Sundays, and Mondays. right before or after major sport events.

Also, given the nature of the product the time bucket is a single day since we need t o plan inventories on each single day: Inventories leftover (unsold copies) on Tuesdays will not sell on Wednesdays. The newsvendor wants to have a distributional information about the future demand. Indeed, this distribution of demand is going t o be used when setting the inventory levels (this is done later in example 5.10 on page 255). A point forecast is just not enough.

So the newsvendol- wants to apply exponential smoothing with seasonality model t o these data Lie identify the 35 data points with t = 1 t o t = 35 (t = 1 is Tuesday. week one: t = 35 is llonday. week five). The first decision is to set the fit sample and the test sample: In order t o have a distributional information. we shall measure the forecasting error and thus should set aside a test sample. Let us assume that we want t o have a test sample consisting of two weeks. thus we csn use the first three weeks to fit the forecasting method to the data.

The first operation is the initialization of parameters. The initial estimate of baseline demand Bo is the simple average of the first three w e k s of de- mand (first 21 days). Since we take whole weeks (i.e.. “whole seasons”) the

Table 3.1 7 Initial seasonality factors

weekday parameter initial value

Tuesday Wednesday Thursday Friday Saturday Sunday Monday

B-6 B-5 B-4 B-3 B- 2

B- 1 BO

0.6632 0.5474 0.4632 0.8421 1.2474 1.3526 1.8842

seasonality of demand has no impact on the baseline demand

21

Bo =

1;

t=l = 63.33. (3.27)

Notice that the initial estimate of the baseline demand refers to time 0. Once again one could be tempted to set B21 = 63.33 but this would mean that the forecast for period 22 is actually not based on any sort of exponential smoothing and thus should not be used to capture forecasting error of such a method, demand distribution, and uncertainty. With this figure we can now initialize the seasonality factors for the seven days of the week. Let us start with the initial seasonality factor for Tuesdays. We simply take the average (42) of demand in the three Tuesdays in out fit sample (46, 57, 23 units) and divide it by the baseline demand Ro = 63.33. Thus the initial seasonality factor for Tuesdays is 42163.33 = 0.6631. The question then becomes: Which period does this seasonality factor refer to? The first Tuesday in our sample is period 1. Actually, initial factors precede the fit sample, and the first Tuesday before our fit sample was period t = 1 - 7 = -6. So the initial seasonality factor for Tuesdays is B-6 = 0.6631 [see equation (3.27). with j=1]. Similarly, we can derive initial seasonality factors for the seven days of the week, as table 3.17 shows.

Once we have initialized the parameters we can let the smoothing algorithm update them. Let us assume that Q = 0.1 and y = 0.2. Let us walk you through the calculation for the first update. The updated baseline demand after we have observed period 1 is [see equation (3.25), where t = 1 and s = 71

B1 = 0 . 1 . ___ 46

0.6631 - 0.1) . 63.33 = 63.93. (3.28) Similarly, we can update the seasonality factor for Tuesdays through equation (3.26), where t = 1 and s = 7:

s1

= 0 . 2 . - 63.93 46 -I- (' - 0.2)

.

0.6631 = 67.44. (3.29)

EXPONENTIAL SMOOTHING WITH SEASONALITY 151

Table 3.18 Baseline estimate Bt (data in thousands)

weekday week 1 week 2 week 3 week 4 week 5

Tuesday 63.94 64.27 61.66 62.83 63.19

Wednesday 64.30 65.62 59.68 63.04 63.14

Thursday 61.97 67.16 61.27 65.87 64.32

Friday 61.71 66.43 62.47 65.18 64.14

Saturday 60.83 66.29 63.82 63.68 63.71

Sunday 61.77 65.49 63.40 65.50 63.79

Monday 62.02 64.95 63.64 65.12 63.48

Table 3.19 Estimates of the seasonality factors St

~~ ~ ~~

weekday week 1 week 2 week 3 week 4 week 5

Tuesday 0.6744 0.7169 0.6481 0.6331 0.5983

Wednesday 0.5530 0.5734 0.5392 0.5424 0.5416

Thursday 0.4318 0.4497 0.4707 0.5072 0.5239

Friday 0.835 7 0.8191 0.8474 0.8313 0.8272

Saturday 1 . 2 149 1.2103 1.2565 1.2031 1.1885

Sunday 1.3897 1.3591 1.3428 1.4101 1.4134

Monday 1.8976 1.8691 1.8818 1.8617 1.8454

lf'e can proceed with t = 2, ... 35 t o update the parameters B and S. Tables 3.18 and 3.19 show how the estimates are updated over time.

Had we been interested in a point forecast for period 36 (i.e.. next Tuesday), we simply would have used the last estimate of demand baseline B35 = 63.48 and the relevant seasonality factor 5'29 = 0.5983. Using equation (3.23). we obtain the point forecast for the next Tuesday (period 36) as

F36 = F35,l = 63.48, 0.5983 = 37.98. (3.30) However, the newsvendor wants to have some distributional information about the demand on Tuesdays; thus. we have to investigate the expected forecast error. The smoothing algorithm suggests that we shall expect a demand for 37.98 units. However, so far we have no information about the confidence on that number. Actually, given we have set aside two weeks (week 4 and week 5) to test the performance of this forecasting method, we can investigate the forecasting error in these two weeks and reasonably assume t hat the expected error [E (Y36 - F36)] equals the average past error.26 To capture the error in the test period. we shall generate the forecasts over the test period (&, t =

26Notice t h a t . in this case, we assume t h a t t h e expected error does not depend on t h e day of t h e week. even if dif€erent days have different demand expectations. In other words,

Table 3.20 Forecast Ft = Ft-l,l (data in thousands)

weekday week 4 week 5

Tuesday Wednesday Thursday Friday Saturday Sunday Monday

41.25 41.23

33.25 34.08

28.09 31.97

51.92 54.76

78.49 78.42

85.70 89.80

119.31 121.95

22.

....

35). To generate the forecast for period 22, we shall use the most recent parameters. We use the baseline at time t = 21 and the seasonality factor of period t = 15, as equation (3.23) shows

F21.1 = F22 = B21 ' 5'15 = 63.64. 0.6481 = 41.25. (3.31) Similarly. we compute the forecast for the remaining observations in the test sample (see table 3.20). Notice that while the parameters are estimated for the whole set of 35 observations, we only generate a forecast for the test sample, as using d at a from the fit sample to compare the forecast with the actual demand would not make sense.

Finally, we can compute the error we would have made in each of the 14 days in the test sample, had we adopted this algorithm in the past. For example. the error in period 22. is

e22 = Y 2 2 - F22 = 41.25 - 36 = 5.25. (3.32) By the same token, we can derive the errors for periods t = 23, .... 35, as shown in table 3.21.

With these errors, we can compute our usual performance metrics. For example. the RMSE is 10.05. It really means that, if our assumption of a statistically stationary error holds, we shall expect a mean squared difference between our forecast for period 36 (F36 = F35,1 = 37.98) and demand Y36 to be 10.052 (bias is negligible and here we assume ME to be zero). In other words the demand in period 36 has an expectation of 37.98 thousand units and a standard deviation of 37.98 thousand units. In example 5.10 on page 255.

we show how this distributional information can be used to make inventory decisions and how demand forecasting and inventory planning problems are strictly related.

we assume t h a t a stable random noise overlaps the weekly fluctuations of demand. W i t h a test sample longer t h a n two weeks, we could test the assumption empirically. In this toy-example. d a t a were generated according t o this assumption, which is implicitly made.

EXPONENTIAL SMOOTHlNG WITH SEASONALITY 153

Table .3.21 Errors et = Yt - Ft (data in thousands)

weekday week 4 week 5

Tuesday Wednesday Thursday Friday Saturday Sunday Alonday

5.25 -1.75 -14.91

1.92 15.49

3.31 -24.30

12.23 0.08 -6.03 2.76 6.42 -1.20 8.95

Also, our example can show the difference between demand variability and uncertainty. The standard deviation of the 35 demand observations is 34.48.

whereas RAISE is just 10.05 units. While the standard deviation measures the variability of demand, RhISE captures our inability to forecast demand. t h a t is. to predict demand fluctuations. In other words, in our example, demand is very variable. but some part of these fluctuations are predictable and due t o weekly seasonality. Thus the forecasting error, that is uncertainty. is smaller

than variability.

0

Dalam dokumen Introduction to Distribution Logistics (Halaman 165-171)