Module 4 - Computer Discussion

profileChase@2000
Camm_4e_Ch08_PPT.pptx

Business Analytics

© 2021 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

Time Series Analysis and Forecasting

Chapter 8

© 2021 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

Introduction (Slide 1 of 2)

Forecasting methods can be classified as qualitative or quantitative.

Qualitative methods generally involve the use of expert judgment to develop forecasts.

Quantitative forecasting methods can be used when:

Past information about the variable being forecast is available.

The information can be quantified.

It is reasonable to assume that past is prologue.

© 2021 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

Introduction (Slide 2 of 2)

The objective of time series analysis is to uncover a pattern in the time series and then extrapolate the pattern into the future.

The forecast is based solely on past values of the variable and/or on past forecast errors.

Modern data-collection technologies have enabled individuals, businesses, and government agencies to collect vast amounts of data that may be used for causal forecasting.

© 2021 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

4

Time Series Patterns

Horizontal Pattern

Trend Pattern

Seasonal Pattern

Trend and Seasonal Pattern

Cyclical Pattern

Identifying Time Series Patterns

© 2021 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

Time Series Patterns (Slide 1 of 20)

Time series: A sequence of observations on a variable measured at successive points in time or over successive periods of time.

The measurements may be taken every hour, day, week, month, year, or any other regular interval. The pattern of the data is important in understanding the series’ past behavior.

If the behavior of the times series data of the past is expected to continue in the future, it can be used as a guide in selecting an appropriate forecasting method.

© 2021 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

To identify the underlying pattern in the data, a useful first step is to construct a time series plot, which is a graphical presentation of the relationship between time and the time series variable; time is represented on the horizontal axis and values of the time series variable are shown on the vertical axis.

6

Time Series Patterns (Slide 2 of 20)

Horizontal Pattern:

Exists when the data fluctuate randomly around a constant mean over time.

Stationary time series: It denotes a time series whose statistical properties are independent of time:

The process generating the data has a constant mean.

The variability of the time series is constant over time.

A time series plot for a stationary time series will always exhibit a horizontal pattern with random fluctuations.

© 2021 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

Time Series Patterns (Slide 3 of 20)

Table 8.1: Gasoline Sales Time Series

Week Sales (1,000s of gallons)
1 17
2 21
3 19
4 23
5 18
6 16
7 20
8 18
9 22
10 20
11 15
12 22

© 2021 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

Data in Table 8.1 show the number of gallons of gasoline (in 1000s) sold by a gasoline distributor in Bennington, Vermont, over the past 12 weeks.

The average value, or mean, for this time series is 19.25, or 19,250 gallons per week.

8

Time Series Patterns (Slide 4 of 20)

Figure 8.1: Gasoline Sales Time Series Plot

© 2021 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

Figure 8.1 shows a time series plot for the data in Table 8.1. Note how the data fluctuate around the sample mean of 19,250 gallons.

Although random variability is present, we would say that these data follow a horizontal pattern.

9

Time Series Patterns (Slide 5 of 20)

Table 8.2: Gasoline Sales Time Series after Obtaining the Contract with the Vermont State Police

Week Sales (1,000s of gallons) Week Sales (1,000s of gallons)
1 17 12 22
2 21 13 31
3 19 14 34
4 23 15 31
5 18 16 33
6 16 17 28
7 20 18 32
8 18 19 30
9 22 20 29
10 20 21 34
11 15 22 33

© 2021 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

Table 8.2 shows the number of gallons of gasoline sold for the original time series and the 10 weeks after signing the new contract with the Vermont State Police to provide gasoline for state police cars located in southern Vermont.

10

Time Series Patterns (Slide 6 of 20)

Figure 8.2: Gasoline Sales Time Series Plot after Obtaining the Contract with the Vermont State Police

© 2021 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

Figure 8.2 shows the corresponding time series plot. Note the increased level of the time series beginning in week 13.

This change in the level of the time series makes it more difficult to choose an appropriate forecasting method.

11

Time Series Patterns (Slide 7 of 20)

Trend Pattern:

A trend pattern shows gradual shifts or movements to relatively higher or lower values over a longer period of time.

A trend is usually the result of long-term factors such as:

Population increases or decreases.

Shifting demographic characteristics of the population.

Improving technology.

Changes in the competitive landscape.

Changes in consumer preferences.

© 2021 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

Time Series Patterns (Slide 8 of 20)

Table 8.3: Bicycle Sales Time Series

Year Sales (1,000s)
1 21.6
2 22.9
3 25.5
4 21.9
5 23.9
6 27.5
7 31.5
8 29.7
9 28.6
10 31.4

© 2021 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

Table 8.3 shows the time series of bicycle sales for a particular manufacturer over the past 10 years.

13

Time Series Patterns (Slide 9 of 20)

Figure 8.3: Bicycle Sales Time Series Plot

© 2021 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

Figure 8.3 shows the time series of bicycle sales for a particular manufacturer over the past 10 years.

Note that 21,600 bicycles were sold in year 1, 22,900 were sold in year 2, and so on.

In year 10, the most recent year, 31,400 bicycles were sold.

Visual inspection of the time series plot shows some up-and-down movement over the past 10 years.

14

Time Series Patterns (Slide 10 of 20)

Table 8.4: Cholesterol Drug Revenue Times

Year Revenue ($ millions)
1 23.1
2 21.3
3 27.4
4 34.6
5 33.8
6 43.2
7 59.5
8 64.4
9 74.2
10 99.3

© 2021 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

The data in Table 8.4 and the corresponding time series plot in Figure 8.4 show the sales revenue for a cholesterol drug since the company won FDA approval for the drug 10 years ago.

The time series increases in a nonlinear fashion; that is, the rate of change of revenue does not increase by a constant amount from one year to the next.

In fact, the revenue appears to be growing in an exponential fashion.

15

Time Series Patterns (Slide 11 of 20)

Figure 8.4: Cholesterol Drug Revenue Times Series Plot ($ millions)

© 2021 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

The data in Table 8.4 and the corresponding time series plot in Figure 8.4 show the sales revenue for a cholesterol drug since the company won FDA approval for the drug 10 years ago.

The time series increases in a nonlinear fashion; that is, the rate of change of revenue does not increase by a constant amount from one year to the next.

In fact, the revenue appears to be growing in an exponential fashion.

16

Time Series Patterns (Slide 12 of 20)

Seasonal Pattern:

Seasonal patterns are recurring patterns over successive periods of time.

Example: A retailer that sells bathing suits expects low sales activity in the fall and winter months, with peak sales in the spring and summer months to occur every year.

The time series plot not only exhibits a seasonal pattern over a one-year period but also for less than one year in duration.

Example: daily traffic volume shows within-the-day “seasonal” behavior, with peak levels occurring during rush hour, moderate flow during the rest of the day, and light flow from midnight to early morning.

© 2021 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

Time Series Patterns (Slide 13 of 20)

Table 8.5: Umbrella Sales Time Series

Year Quarter Sales
1 1 125
  2 153
  3 106
  4 88
2 1 118
  2 161
  3 133
  4 102
3 1 138
  2 144
  3 113
  4 80

© 2021 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

18

Time Series Patterns (Slide 14 of 20)

Table 8.5: Umbrella Sales Time Series (cont.)

Year Quarter Sales
4 1 109
  2 137
  3 125
  4 109
5 1 130
  2 165
  3 128
  4 96

© 2021 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

19

Time Series Patterns (Slide 15 of 20)

Figure 8.5: Umbrella Sales Time Series Plot

© 2021 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

20

Time Series Patterns (Slide 16 of 20)

Trend and Seasonal Pattern:

Some time series include both a trend and a seasonal pattern.

Table 8.6: Quarterly Smartphone Sales Time Series

Year Quarter Sales ($1,000s)
1 1 4.8
  2 4.1
  3 6.0
  4 6.5
2 1 5.8
  2 5.2
  3 6.8
  4 7.4

© 2021 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

Table 8.6 and Figure 8.6 show quarterly smartphone sales for a particular manufacturer over the past four years.

Clearly an increasing trend is present.

However, Figure 8.6 also indicates that sales are lowest in the second quarter of each year and highest in quarters 3 and 4.

Thus, we conclude that a seasonal pattern also exists for smartphone sales.

21

Time Series Patterns (Slide 17 of 20)

Table 8.6: Quarterly Smartphone Sales Time Series (cont.)

Year Quarter Sales ($1,000s)
3 1 6.0
  2 5.6
  3 7.5
  4 7.8
4 1 6.3
  2 5.9
  3 8.0
  4 8.4

© 2021 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

Figure 8.6 shows quarterly smartphone sales for a particular manufacturer over the past four years.

Clearly an increasing trend is present.

However, Figure 8.6 also indicates that sales are lowest in the second quarter of each year and highest in quarters 3 and 4.

Thus, we conclude that a seasonal pattern also exists for smartphone sales.

22

Time Series Patterns (Slide 18 of 20)

Figure 8.6: Quarterly Smartphone Sales Time Series Plot

© 2021 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

Table 8.6 and Figure 8.6 show quarterly smartphone sales for a particular manufacturer over the past four years.

Clearly an increasing trend is present.

However, Figure 8.6 also indicates that sales are lowest in the second quarter of each year and highest in quarters 3 and 4.

Thus, we conclude that a seasonal pattern also exists for smartphone sales.

23

Time Series Patterns (Slide 19 of 20)

Cyclical Pattern:

A cyclical pattern exists if the time series plot shows an alternating sequence of points below and above the trendline that lasts for more than one year.

Example: Periods of moderate inflation followed by periods of rapid inflation can lead to a time series that alternates below and above a generally increasing trendline.

Cyclical effects are often combined with long-term trend effects and referred to as trend-cycle effects.

© 2021 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

24

Time Series Patterns (Slide 20 of 20)

Identifying Time Series Patterns:

The underlying pattern in the time series is an important factor in selecting a forecasting method.

A time series plot should be one of the first analytic tools.

We need to use a forecasting method that is capable of handling the pattern exhibited by the time series effectively.

© 2021 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

25

Forecast Accuracy

© 2021 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

Forecast Accuracy (Slide 1 of 10)

Table 8.7: Computing Forecasts and Measures of Forecast Accuracy Using the Most Recent Value as the Forecast for the Next Period

Week Time Series Value Forecast Forecast Error Absolute Value of Forecast Error Squared Forecast Error Percentage Error Absolute Value of Percentage Error
1 17            
2 21 17 4 4 16 19.05 19.05
3 19 21 −2 2 4 −10.53 10.53
4 23 19 4 4 16 17.39 17.39
5 18 23 −5 5 25 −27.78 27.78
6 16 18 −2 2 4 −12.50 12.50

© 2021 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

Table 8.7 shows the forecasts for the gasoline time series shown in Table 8.1 using the simplest of all the forecasting methods.

We use the most recent week’s sales volume as the forecast for the next week.

For instance, the distributor sold 17 thousand gallons of gasoline in week 1; this value is used as the forecast for week 2.

Next, we use 21, the actual value of sales in week 2, as the forecast for week 3, and so on.

This method is often referred to as a naïve forecasting method because of its simplicity.

27

Forecast Accuracy (Slide 2 of 10)

Table 8.7: Computing Forecasts and Measures of Forecast Accuracy Using the Most Recent Value as the Forecast for the Next Period (cont.)

Week Time Series Value Forecast Forecast Error Absolute Value of Forecast Error Squared Forecast Error Percentage Error Absolute Value of Percentage Error
7 20 16 4 4 16 20.00 20.00
8 18 20 −2 2 4 −11.11 11.11
9 22 18 4 4 16 18.18 18.18
10 20 22 −2 2 4 −10.00 10.00
11 15 20 −5 5 25 −33.33 33.33
12 22 15 7 7 49 31.82 31.82
Totals 5 41 179 1.19 211.69

© 2021 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

Table 8.7 shows the forecasts for the gasoline time series shown in Table 8.1 using the simplest of all the forecasting methods.

We use the most recent week’s sales volume as the forecast for the next week.

For instance, the distributor sold 17 thousand gallons of gasoline in week 1; this value is used as the forecast for week 2.

Next, we use 21, the actual value of sales in week 2, as the forecast for week 3, and so on.

This method is often referred to as a naïve forecasting method because of its simplicity.

28

Forecast Accuracy (Slide 3 of 10)

Naïve forecasting method: Using the most recent data to predict future data.

The key concept associated with measuring forecast accuracy is forecast error.

Measures to determine how well a particular forecasting method is able to reproduce the time series data that are already available.

Forecast error.

Mean forecast error (MFE).

Mean absolute error (MAE).

Mean squared error (MSE).

Mean absolute percentage error (MAPE).

© 2021 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

Forecast Accuracy (Slide 4 of 10)

Forecast Error: Difference between the actual and the forecasted values for period t.

Mean Forecast Error: Mean or average of the forecast errors.

© 2021 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

Forecast error:

=

= actual value

= forecasted value

Example:

Consider Table 8.7.

The distributor actually sold 21 thousand gallons of gasoline in week 2, and the forecast, using the sales volume in week 1, was 17 thousand gallons.

The forecast error in week 2 is = = 21 17 = 4.

Mean Forecast Error (MFE):

MFE =

n = Number of periods in time series

k = Number of periods at the beginning of the time series for which we cannot produce a naïve forecast

Example:

Table 8.7 shows that the sum of the forecast errors for the gasoline sales time series is 5.

Thus, the mean or average error is 5/11 = 0.45.

30

Forecast Accuracy (Slide 5 of 10)

Mean Absolute Error (MAE): Measure of forecast accuracy that avoids the problem of positive and negative forecast errors offsetting one another.

Mean Squared Error (MSE): Measure that avoids the problem of positive and negative errors offsetting each other is obtained by computing the average of the squared forecast errors.

© 2021 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

Mean Absolute Error (MAE)

It is also referred to as the mean absolute deviation (MAD).

Example:

Table 8.7 shows that the sum of the absolute values of the forecast errors is 41.

Thus MAE = average of the absolute value of the forecast errors = 41/11 = 3.73.

MEAN SQUARED ERROR (MSE)

Example:

From Table 8.7, the sum of the squared errors is 179.

Hence, MSE = average of the square of the forecast errors = 179/11 = 16.27.

31

Forecast Accuracy (Slide 6 of 10)

Mean Absolute Percentage Error (MAPE): Average of the absolute value of percentage forecast errors.

© 2021 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

Mean Absolute Percentage Error (MAPE):

The size of MAE or MSE depends upon the scale of the data.

As a result, it is difficult to make comparisons for different time intervals (such as comparing a method of forecasting monthly gasoline sales to a method of forecasting weekly sales) or to make comparisons across different time series (such as monthly sales of gasoline and monthly sales of oil filters).

To make comparisons such as these, we need to work with relative or percentage error measures.

The mean absolute percentage error (MAPE) is such a measure.

Example:

Table 8.7 shows that the sum of the absolute values of the percentage errors is

Thus the MAPE, which is the average of the absolute value of percentage forecast errors, is 211.69/11 = 19.24%

32

Forecast Accuracy (Slide 7 of 10)

Table 8.8: Computing Forecasts and Measures of Forecast Accuracy Using the Average of All the Historical Data as the Forecast for the Next Period

Week Time Series Value Forecast Forecast Error Absolute Value of Forecast Error Squared Forecast Error Percentage Error Absolute Value of Percentage Error
1 17            
2 21 17.00 4.00 4.00 16.00 19.05 19.05
3 19 19.00 0.00 0.00 0.00 0.00 0.00
4 23 19.00 4.00 4.00 16.00 17.39 17.39
5 18 20.00 −2.00 2.00 4.00 −11.11 11.11

© 2021 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

We begin by developing a forecast for week 2.

Because there is only one historical value available prior to week 2, the forecast for week 2 is just the time series value in week 1; thus, the forecast for week 2 is 17 thousand gallons of gasoline.

To compute the forecast for week 3, we take the average of the sales values in weeks 1 and 2. Thus,

= (17 + 21)/2 = 19

Similarly, the forecast for week 4 is = (17 + 21 + 19)/3 = 19.

Using the results shown in Table 8.8, we obtain the following values of MAE, MSE, and MAPE:

MAE = 26.81/11 = 2.44

MSE = 89.07/11 = 8.10

MAPE = 141.34/11 = 12.85%

33

Forecast Accuracy (Slide 8 of 10)

Table 8.8: Computing Forecasts and Measures of Forecast Accuracy Using the Average of All the Historical Data as the Forecast for the Next Period (cont.)

Week Time Series Value Forecast Forecast Error Absolute Value of Forecast Error Squared Forecast Error Percentage Error Absolute Value of Percentage Error
6 16 19.60 −3.60 3.60 12.96 −22.50 22.50
7 20 19.00 1.00 1.00 1.00 5.00 5.00
8 18 19.14 −1.14 1.14 1.31 −6.35 6.35
9 22 19.00 3.00 3.00 9.00 13.64 13.64

© 2021 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

We begin by developing a forecast for week 2.

Because there is only one historical value available prior to week 2, the forecast for week 2 is just the time series value in week 1; thus, the forecast for week 2 is 17 thousand gallons of gasoline.

To compute the forecast for week 3, we take the average of the sales values in weeks 1 and 2. Thus,

= (17 + 21)/2 = 19

Similarly, the forecast for week 4 is = (17 + 21 + 19)/3 = 19.

Using the results shown in Table 8.8, we obtain the following values of MAE, MSE, and MAPE:

MAE = 26.81/11 = 2.44

MSE = 89.07/11 = 8.10

MAPE = 141.34/11 = 12.85%

34

Forecast Accuracy (Slide 9 of 10)

Table 8.8: Computing Forecasts and Measures of Forecast Accuracy Using the Average of All the Historical Data as the Forecast for the Next Period (cont.)

Week Time Series Value Forecast Forecast Error Absolute Value of Forecast Error Squared Forecast Error Percentage Error Absolute Value of Percentage Error
10 20 19.33 0.67 0.67 0.44 3.33 3.33
11 15 19.40 −4.40 4.40 19.36 −29.33 29.33
12 22 19.00 3.00 3.00 9.00 13.64 13.64
Totals 4.52 26.81 89.07 2.75 141.34

© 2021 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

We begin by developing a forecast for week 2.

Because there is only one historical value available prior to week 2, the forecast for week 2 is just the time series value in week 1; thus, the forecast for week 2 is 17 thousand gallons of gasoline.

To compute the forecast for week 3, we take the average of the sales values in weeks 1 and 2. Thus,

= (17 + 21)/2 = 19

Similarly, the forecast for week 4 is = (17 + 21 + 19)/3 = 19.

Using the results shown in Table 8.8, we obtain the following values of MAE, MSE, and MAPE:

MAE = 26.81/11 = 2.44

MSE = 89.07/11 = 8.10

MAPE = 141.34/11 = 12.85%

35

Forecast Accuracy (Slide 10 of 10)

Compare the accuracy of the two forecasting methods by comparing the values of MAE, MSE, and MAPE for each method.

Naïve Method Average of Past Values
MAE 3.73 2.44
MSE 16.27 8.10
MAPE 19.24% 12.85%

The average of past values provides more accurate forecasts for the next period than using the most recent observation.

© 2021 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

36

Moving Averages and Exponential Smoothing

Moving Averages

Exponential Smoothing

© 2021 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

Moving Averages and Exponential Smoothing (Slide 1 of 16)

Moving Averages:

Moving averages method: Uses the average of the most recent k data values in the time series as the forecast for the next period.

© 2021 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

In the formula for moving average forecast,

= forecast of the time series for period t + 1

= actual value of the time series in period t

k = number of periods of time series data used to generate the forecast

To use moving averages to forecast a time series, we must first select the order k.

If only the most recent values of the time series are considered relevant, a small value of k is preferred.

If a greater number of past values are considered relevant, then we generally opt for a larger value of k.

A moving average will adapt to the new level of the series and continue to provide good forecasts in k periods.

Thus, a smaller value of k will track shifts in a time series more quickly.

On the other hand, larger values of k will be more effective in smoothing out random fluctuations.

38

Moving Averages and Exponential Smoothing (Slide 2 of 16)

Table 8.9: Summary of Three-Week Moving Average Calculations

Week Time Series Value Forecast Forecast Error Absolute Value of Forecast Error Squared Forecast Error Percentage Error Absolute Value of Percentage Error
1 17            
2 21            
3 19            
4 23 19 4 4 16 17.39 17.39
5 18 21 −3 3 9 −16.67 16.67
6 16 20 −4 4 16 −25.00 25.00

© 2021 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

To illustrate the moving averages method, let us return to the original 12 weeks of gasoline sales data in Table 8.1 and Figure 8.1.

We will use a three-week moving average (k = 3).

We begin by computing the forecast of sales in week 4 using the average of the time series values in weeks 1 to 3.

= average for weeks 1 to 3 = (17 + 21 + 19)/3 = 19

The moving average forecast of sales in week 4 is 19, or 19,000 gallons of gasoline.

Because the actual value observed in week 4 is 23, the forecast error in week 4 is e4 = 23 - 19 = 4.

We next compute the forecast of sales in week 5 by averaging the time series values in weeks 2 to 4.

= average for weeks 2 to 4 = (21 + 19 + 23)/3 = 21

Hence, the forecast of sales in week 5 is 21 and the error associated with this forecast is e5 = 18 - 21 = -3.

A complete summary of the three-week moving average forecasts for the gasoline sales time series is provided in Table 8.9.

39

Moving Averages and Exponential Smoothing (Slide 3 of 16)

Table 8.9: Summary of Three-Week Moving Average Calculations (cont.)

Week Time Series Value Forecast Forecast Error Absolute Value of Forecast Error Squared Forecast Error Percentage Error Absolute Value of Percentage Error
7 20 19 1 1 1 5.00 5.00
8 18 18 0 0 0 0.00 0.00
9 22 18 4 4 16 18.18 18.18
10 20 20 0 0 0 0.00 0.00
11 15 20 −5 5 25 −33.33 33.33
12 22 19 3 3 9 13.64 13.64
Totals 0 24 92 −20.79 129.21

© 2021 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

To illustrate the moving averages method, let us return to the original 12 weeks of gasoline sales data in Table 8.1 and Figure 8.1.

We will use a three-week moving average (k = 3).

We begin by computing the forecast of sales in week 4 using the average of the time series values in weeks 1 to 3.

= average for weeks 1 to 3 = (17 + 21 + 19)/3 = 19

The moving average forecast of sales in week 4 is 19 or 19,000 gallons of gasoline.

Because the actual value observed in week 4 is 23, the forecast error in week 4 is e4 = 23 - 19 = 4.

We next compute the forecast of sales in week 5 by averaging the time series values in weeks 2 to 4.

= average for weeks 2 to 4 = (21 + 19 + 23)/3 = 21

Hence, the forecast of sales in week 5 is 21 and the error associated with this forecast is e5 = 18 - 21 = -3.

A complete summary of the three-week moving average forecasts for the gasoline sales time series is provided in Table 8.9.

40

Moving Averages and Exponential Smoothing (Slide 4 of 16)

Figure 8.7: Gasoline Sales Time Series Plot and Three-Week Moving Average Forecasts

© 2021 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

Figure 8.7 shows the original time series plot and the three-week moving average forecasts.

Note how the graph of the moving average forecasts has tended to smooth out the random fluctuations in the time series.

41

Moving Averages and Exponential Smoothing (Slide 5 of 16)

Figure 8.8: Data Analysis Dialog Box

© 2021 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

Excel can be used to develop forecasts using the moving averages method.

We develop a forecast for the gasoline sales time series in Table 8.1 and Figure 8.1.

The following steps can be used to produce a three-week moving average:

Copy the Gasoline sales time series data from the file Gasoline to an Excel worksheet in Columns A and B and rows 1 through 13.

Step 1. Click the Data tab in the Ribbon

Step 2. Click Data Analysis in the Analyze group

Step 3. When the Data Analysis dialog box appears (Figure 8.8), select Moving Average and click OK

Step 4. When the Moving Average dialog box appears (Figure 8.9):

Enter B2:B13 in the Input Range: box

Enter 3 in the Interval: box

Enter C3 in the Output Range: box

Click OK

42

Moving Averages and Exponential Smoothing (Slide 6 of 16)

Figure 8.9: Moving Average Dialog Box

© 2021 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

43

Moving Averages and Exponential Smoothing (Slide 7 of 16)

Figure 8.10: Excel Output for Moving Average Forecast for Gasoline Data

© 2021 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

44

Moving Averages and Exponential Smoothing (Slide 8 of 16)

Forecast Accuracy:

The values of the three measures of forecast accuracy for the three-week moving average calculations in Table 8.9.

© 2021 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

The three-week moving average approach has provided more accurate forecasts than simply using the most recent observation as the forecast.

45

Moving Averages and Exponential Smoothing (Slide 9 of 16)

Exponential Smoothing:

Exponential smoothing uses a weighted average of past time series values as a forecast.

© 2021 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

In the formula for exponential smoothing,

= forecast of the time series for period t + 1

= actual value of the time series in period t

= forecast of the time series for period t

α = smoothing constant (0 ≤ α ≤ 1)

It turns out that the exponential smoothing forecast for any period is actually a weighted average of all the previous actual values of the time series.

46

Moving Averages and Exponential Smoothing (Slide 10 of 16)

Illustration of Exponential Smoothing:

Hence, the forecast for period 2 is:

© 2021 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

The forecast for period 3 is = α + (1 – α) = α + (1 – α)

The sum of the coefficients, or weights, for y1, y2, and y3 equals 1.

47

Moving Averages and Exponential Smoothing (Slide 11 of 16)

Week Time Series Value Forecast Forecast Error Squared Forecast Error
1 17      
2 21 17.00 4.00 16.00
3 19 17.80 1.20 1.44
4 23 18.04 4.96 24.60
5 18 19.03 −1.03 1.06
6 16 18.83 −2.83 8.01

© 2021 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

To illustrate the exponential smoothing approach to forecasting, let us again consider the gasoline sales time series in Table 8.1 and Figure 8.1.

To initialize the calculations we set the exponential smoothing forecast for period 2 equal to the actual value of the time series in period 1.

Thus, with = 17, we set = 17 to initiate the computations.

Referring to the time series data in Table 8.1, we find an actual time series value in period 2 of = 21.

Thus, in period 2 we have a forecast error of = 21 – 17 = 4.

Continuing with the exponential smoothing computations using a smoothing constant of α = 0.2, we obtain the following forecast for period 3:

= 0.2 + 0.8 = 0.2(21) + 0.8(17) = 17.8

Continuing the exponential smoothing calculations, we obtain the weekly forecast values shown in Table 8.10.

For week 12, we have = 22 and = 18.48. We can we use this information to generate a forecast for week 13:

= 0.2 + 0.8 = 0.2(22) + 0.8(18.48) = 19.18

48

Moving Averages and Exponential Smoothing (Slide 12 of 16)

Week Time Series Value Forecast Forecast Error Squared Forecast Error
7 20 18.26 1.74 3.03
8 18 18.61 −0.61 0.37
9 22 18.49 3.51 12.32
10 20 19.19 0.81 0.66
11 15 19.35 −4.35 18.92
12 22 18.48 3.52 12.39
Totals 10.92 98.80

© 2021 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

To illustrate the exponential smoothing approach to forecasting, let us again consider the gasoline sales time series in Table 8.1 and Figure 8.1.

To initialize the calculations we set the exponential smoothing forecast for period 2 equal to the actual value of the time series in period 1.

Thus, with = 17, we set = 17 to initiate the computations.

Referring to the time series data in Table 8.1, we find an actual time series value in period 2 of = 21.

Thus, in period 2 we have a forecast error of = 21 – 17 = 4.

Continuing with the exponential smoothing computations using a smoothing constant of α = 0.2, we obtain the following forecast for period 3:

= 0.2 + 0.8 = 0.2(21) + 0.8(17) = 17.8

Continuing the exponential smoothing calculations, we obtain the weekly forecast values shown in Table 8.10.

For week 12, we have = 22 and = 18.48. We can we use this information to generate a forecast for week 13:

= 0.2 + 0.8 = 0.2(22) + 0.8(18.48) = 19.18

49

Moving Averages and Exponential Smoothing (Slide 13 of 16)

© 2021 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

To illustrate the exponential smoothing approach to forecasting, let us again consider the gasoline sales time series in Table 8.1 and Figure 8.1.

To initialize the calculations we set the exponential smoothing forecast for period 2 equal to the actual value of the time series in period 1.

Thus, with = 17, we set = 17 to initiate the computations.

Referring to the time series data in Table 8.1, we find an actual time series value in period 2 of = 21.

Thus, in period 2 we have a forecast error of = 21 – 17 = 4.

Continuing with the exponential smoothing computations using a smoothing constant of α = 0.2, we obtain the following forecast for period 3:

= 0.2 + 0.8 = 0.2(21) + 0.8(17) = 17.8

Continuing the exponential smoothing calculations, we obtain the weekly forecast values shown in Table 8.10.

For week 12, we have = 22 and = 18.48. We can we use this information to generate a forecast for week 13:

= 0.2 + 0.8 = 0.2(22) + 0.8(18.48) = 19.18

50

Moving Averages and Exponential Smoothing (Slide 14 of 16)

Figure 8.13: Exponential Smoothing Dialog Box

© 2021 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

Excel can be used for exponential smoothing, we again develop a forecast for the gasoline sales time series in Table 8.1 and Figure 8.1.

Copy the Gasoline sales time series data from the file Gasoline to an Excel worksheet in Columns A and B and rows 1 through 13.

We use α = 0.2.

The following steps can be used to produce a forecast.

Step 1. Click the Data tab in the Ribbon

Step 2. Click Data Analysis in the Analyze group

Step 3. When the Data Analysis dialog box appears (Figure 8.12), select Exponential Smoothing and click OK

Step 4. When the Exponential Smoothing dialog box appears (Figure 8.13):

Enter B2:B13 in the Input Range: box

Enter 0.8 in the Damping factor: box

Enter C2 in the Output Range: box

Click OK

Once you have completed this step, the exponential smoothing forecasts will appear in column C of the worksheet as shown in Figure 8.14.

Note that the value we entered in the Damping factor: box is 1 – α.

51

Moving Averages and Exponential Smoothing (Slide 15 of 16)

Figure 8.14: Excel Output for Exponential Smoothing Forecast for Gasoline Data

© 2021 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

52

Moving Averages and Exponential Smoothing (Slide 16 of 16)

Forecast Accuracy:

If the time series contains substantial random variability, a small value of the smoothing constant is preferred and vice-versa.

© 2021 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

53

Using Regression Analysis for Forecasting

Linear Trend Projection

Seasonality without Trend

Seasonality with Trend

Using Regression Analysis as a Causal Forecasting Method

Combining Causal Variables with Trend and Seasonality Effects

Considerations in Using Regression in Forecasting

© 2021 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

Using Regression Analysis for Forecasting (Slide 1 of 19)

Linear Trend Projection:

Regression analysis can be used to forecast a time series with a linear trend.

Simple linear regression analysis yields the linear relationship between the independent variable and the dependent variable that minimizes the MSE.

Use this approach to find a best-fitting line to a set of data that exhibits a linear trend.

Trend variable (time period t) is the independent variable.

© 2021 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

55

Using Regression Analysis for Forecasting (Slide 2 of 19)

Linear Trend Projection (cont.):

Equation for the trendline:

Trend equation for the bicycle sales time series:

Thus, the linear trend model yields a sales forecast of 32,500 bicycles for the next year.

© 2021 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

In the equation (8.8) for linear trendline

= forecast of sales in period t

t = time period

b0 = the y-intercept of the linear trendline

b1 = the slope of the linear trendline

Excel can be used to compute the estimated intercept b0 and slope b1.

56

Using Regression Analysis for Forecasting (Slide 3 of 19)

Figure 8.15: Excel Simple Linear Regression Output for Trendline Model for Bicycle Sales Data

© 2021 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

Let us consider the bicycle sales time series in Table 8.3.

The corresponding time series plot in Figure 8.3 indicates a trend pattern.

Figure 8.15 shows regression analysis of the Bicycle Sales data.

We see in this output that the estimated intercept b0 is 20.4 (shown in cell B17) and the estimated slope b1 is 1.1 (shown in cell B18).

Thus the regression equation (8.9) for the linear trend component for the bicycle sales time series is given as

= 20.4 + 1.1t

The slope of 1.1 in this trend equation indicates that over the past 10 years the firm has experienced an average growth in sales of about 1,100 units per year.

57

Using Regression Analysis for Forecasting (Slide 4 of 19)

Linear Trend Projection (cont.):

We can also use more complex regression models to fit nonlinear trends:

Autoregressive models: Regression models in which the independent variables are previous values of the time series.

© 2021 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

58

Using Regression Analysis for Forecasting (Slide 5 of 19)

Seasonality without Trend:

We can model a time series with a seasonal pattern by treating the season as a dummy variable.

Illustration:

Consider the data on the number of umbrellas sold in Table 8.5.

The time series plot corresponding to this data in Figure 8.5 does not suggest any long-term trend in sales.

© 2021 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

59

Using Regression Analysis for Forecasting (Slide 6 of 19)

Illustration (cont.):

Closer inspection of the time series plot suggests that a quarterly seasonal pattern is present.

© 2021 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

60

Using Regression Analysis for Forecasting (Slide 7 of 19)

Seasonality without Trend Illustration (cont.):

The three dummy variables can be coded as follows:

General form of the equation relating the number of umbrellas sold to the quarter the sales take place:

© 2021 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

is the dependent variable, and the quarterly dummy variables Qtr1t, Qtr2t, and Qtr3t are the independent variables.

61

Using Regression Analysis for Forecasting (Slide 8 of 19)

Table 8.11: Umbrella Sales Time Series with Dummy Variables

Period Year Quarter Qtr1 Qtr2 Qtr3 Sales
1 1 1 1 0 0 125
2   2 0 1 0 153
3   3 0 0 1 106
4   4 0 0 0 88
5 2 1 1 0 0 118
6   2 0 1 0 161
7   3 0 0 1 133
8   4 0 0 0 102

© 2021 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

Using the data in Table 8.11 and regression analysis, we obtain the following equation (8.11):

= 95.0

We can use equation (8.11) to forecast sales of every quarter for next year:

Quarter1: Sales = 95.0 + 29.0(1) + 57.0(0) + 26.0(0) = 124

Quarter2: Sales = 95.0 + 29.0(0) + 57.0(1) + 26.0(0) = 152

Quarter3: Sales = 95.0 + 29.0(0) + 57.0(0) + 26.0(1) = 121

Quarter4: Sales = 95.0 + 29.0(0) + 57.0(0) + 26.0(0) = 95

62

Using Regression Analysis for Forecasting (Slide 9 of 19)

Table 8.11: Umbrella Sales Time Series with Dummy Variables (cont.)

Period Year Quarter Qtr1 Qtr2 Qtr3 Sales
9 3 1 1 0 0 138
10   2 0 1 0 144
11   3 0 0 1 113
12   4 0 0 0 80
13 4 1 1 0 0 109
14   2 0 1 0 137
15   3 0 0 1 125
16   4 0 0 0 109

© 2021 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

Using the data in Table 8.11 and regression analysis, we obtain the following equation (8.11):

= 95.0

We can use equation (8.11) to forecast sales of every quarter for next year:

Quarter1: Sales = 95.0 + 29.0(1) + 57.0(0) + 26.0(0) = 124

Quarter2: Sales = 95.0 + 29.0(0) + 57.0(1) + 26.0(0) = 152

Quarter3: Sales = 95.0 + 29.0(0) + 57.0(0) + 26.0(1) = 121

Quarter4: Sales = 95.0 + 29.0(0) + 57.0(0) + 26.0(0) = 95

63

Using Regression Analysis for Forecasting (Slide 10 of 19)

Table 8.11: Umbrella Sales Time Series with Dummy Variables (cont.)

Period Year Quarter Qtr1 Qtr2 Qtr3 Sales
17 5 1 1 0 0 130
18   2 0 1 0 165
19   3 0 0 1 128
20   4 0 0 0 96

© 2021 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

Using the data in Table 8.11 and regression analysis, we obtain the following equation (8.11):

= 95.0

We can use equation (8.11) to forecast sales of every quarter for next year:

Quarter1: Sales = 95.0 + 29.0(1) + 57.0(0) + 26.0(0) = 124

Quarter2: Sales = 95.0 + 29.0(0) + 57.0(1) + 26.0(0) = 152

Quarter3: Sales = 95.0 + 29.0(0) + 57.0(0) + 26.0(1) = 121

Quarter4: Sales = 95.0 + 29.0(0) + 57.0(0) + 26.0(0) = 95

64

Using Regression Analysis for Forecasting (Slide 11 of 19)

Seasonality with Trend:

The time series contains both seasonal effects and a linear trend.

Consider the data for the smartphone time series in Table 8.6.

The time series plot corresponding to this data (Figure 8.6) indicates that there is both linear trend and seasonal pattern.

The general form of the regression equation takes the form.

© 2021 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

Here we will combine the dummy variable approach for handling seasonality with the approach for handling a linear trend.

In the general form of the regression equation (8.12)

= forecast of sales in period t

= 1 if time period t corresponds to the first quarter of the year; 0, otherwise

= 1 if time period t corresponds to the second quarter of the year; 0, otherwise

= 1 if time period t corresponds to the third quarter of the year; 0, otherwise

t = time period (quarter)

For this regression model, is the dependent variable, and the quarterly dummy variables Qtr1t, Qtr2t, and Qtr3t are the independent variables.

65

Using Regression Analysis for Forecasting (Slide 12 of 19)

Table 8.12: Smartphone Sales Time Series with Dummy Variables and Time Period

Period Year Quarter Qtr1 Qtr2 Qtr3 Sales (1,000s)
1 1 1 1 0 0 4.8
2   2 0 1 0 4.1
3   3 0 0 1 6.0
4   4 0 0 0 6.5
5 2 1 1 0 0 5.8
6   2 0 1 0 5.2
7   3 0 0 1 6.8
8   4 0 0 0 7.4

© 2021 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

Table 8.12 shows the revised smartphone sales time series that includes the coded values of the dummy variables and the time period t.

Using the data in Table 8.12 with the regression model that includes both the seasonal and trend components, we obtain the following equation (8.13) that minimizes our sum of squared errors:

= 6.07 0.146t

We can now use the above equation to forecast quarterly sales for next year.

Next year is year 5 for the smartphone sales time series, that is, time periods 17, 18, 19, and 20.

Forecast for time period 17 (quarter 1 in year 5)

= 6.07 1.36(1) 2.03(0) 0.304(0) + 0.146(17) = 7.19

Forecast for time period 18 (quarter 2 in year 5)

= 6.07 1.36(0) 2.03(1) 0.304(0) + 0.146(18) = 6.67

Forecast for time period 19 (quarter 3 in year 5)

= 6.07 1.36(0) 2.03(0) 0.304(1) + 0.146(19) = 8.54

Forecast for time period 20 (quarter 4 in year 5)

= 6.07 1.36(0) 2.03(0) 0.304(0) + 0.146(20) = 8.99

66

Using Regression Analysis for Forecasting (Slide 13 of 19)

Table 8.12: Smartphone Sales Time Series with Dummy Variables and Time Period (cont.)

Period Year Quarter Qtr1 Qtr2 Qtr3 Sales (1,000s)
9 3 1 1 0 0 6.0
10   2 0 1 0 5.6
11   3 0 0 1 7.5
12   4 0 0 0 7.8
13 4 1 1 0 0 6.3
14   2 0 1 0 5.9
15   3 0 0 1 8.0
16   4 0 0 0 8.4

© 2021 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

Table 8.12 shows the revised smartphone sales time series that includes the coded values of the dummy variables and the time period t.

Using the data in Table 8.12 with the regression model that includes both the seasonal and trend components, we obtain the following equation (8.13) that minimizes our sum of squared errors:

= 6.07 0.146t

We can now use the above equation to forecast quarterly sales for next year.

Next year is year 5 for the smartphone sales time series, that is, time periods 17, 18, 19, and 20.

Forecast for time period 17 (quarter 1 in year 5)

= 6.07 1.36(1) 2.03(0) 0.304(0) + 0.146(17) = 7.19

Forecast for time period 18 (quarter 2 in year 5)

= 6.07 1.36(0) 2.03(1) 0.304(0) + 0.146(18) = 6.67

Forecast for time period 19 (quarter 3 in year 5)

= 6.07 1.36(0) 2.03(0) 0.304(1) + 0.146(19) = 8.54

Forecast for time period 20 (quarter 4 in year 5)

= 6.07 1.36(0) 2.03(0) 0.304(0) + 0.146(20) = 8.99

67

Using Regression Analysis for Forecasting (Slide 14 of 19)

Seasonality with Trend (cont.):

The dummy variables in the equation for Smartphone Sales time series provide four equations given time period t corresponds to quarters 1, 2, 3, and 4.

Quarter 1: Sales = 4.71 + 0.146t.

Quarter 2: Sales = 4.04 + 0.146t.

Quarter 3: Sales = 5.77 + 0.146t.

Quarter 4: Sales = 6.07 + 0.146t.

© 2021 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

The slope of the trendline for each quarterly forecast equation is 0.146, indicating a consistent growth in sales of about 146 phones per quarter.

The only difference in the four equations is that they have different intercepts.

68

Using Regression Analysis for Forecasting (Slide 15 of 19)

Using Regression Analysis as a Causal Forecasting Method:

The relationship of the variable to be forecast with other variables may also be used to develop a forecasting model.

Advertising expenditures when sales are to be forecast.

The mortgage rate when new housing construction is to be forecast.

Grade point average when starting salaries for recent college graduates are to be forecast.

The price of a product when the demand for the product is to be forecast.

The value of the Dow Jones Industrial Average when the value of an individual stock is to be forecast.

Daily high temperature when electricity usage is to be forecast.

Causal models: Models that include only variables that are believed to cause changes in the variable to be forecast.

© 2021 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

The forecasting model provides evidence only of association between an independent variable and the variable to be forecast.

The model does not provide evidence of a causal relationship between an independent variable and the variable to be forecast, and the conclusion that a causal relationship exists must be based on practical experience.

69

Using Regression Analysis for Forecasting (Slide 16 of 19)

Table 8.13: Student Population and Quarterly Sales Data for 10 Armand’s Pizza Parlors

Restaurant Student Population (1,000s) Quarterly Sales ($1,000s)
1 2 58
2 6 105
3 8 88
4 8 118
5 12 117
6 16 137
7 20 157
8 20 169
9 22 149
10 26 202

© 2021 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

To illustrate how regression analysis is used as a causal forecasting method, we consider the sales forecasting problem faced by Armand’s Pizza Parlors, a chain of Italian restaurants doing business in a five-state area.

Historically, the most successful locations have been near college campuses.

The managers believe that quarterly sales for these restaurants (denoted by y) are related positively to the size of the student population (denoted by x).

Suppose that management wants to forecast sales for a new restaurant that it is considering opening near a college campus. Regression analysis can be used to forecast quarterly sales for this new location.

To develop the equation relating quarterly sales to the size of the student population, Armand’s collected data from a sample of 10 of its restaurants located near college campuses. These data are summarized in Table 8.13.

70

Using Regression Analysis for Forecasting (Slide 17 of 19)

Figure 8.16: Scatter Chart of Student Population and Quarterly Sales for Armand’s Pizza Parlors

© 2021 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

Sales appear to be higher at locations near campuses with larger student populations.

Also, it appears that the relationship between the two variables can be approximated by a straight line.

71

Using Regression Analysis for Forecasting (Slide 18 of 19)

© 2021 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

In Figure 8.17. we can draw a straight line through the data that appears to provide a good linear approximation of the relationship between the variables.

Observe that the relationship is not perfect.

The equation of the line is called the estimated regression equation.

The estimated regression equation (8.14) is = 60 + 5

The slope of the estimated regression equation (b1 = 5) is positive, implying that, as student population increases, quarterly sales increase.

We can conclude that an increase in the student population of 1000 is associated with an increase of $5,000 in expected quarterly sales.

The estimated y-intercept tells us that if the student population for the location of an Armand’s pizza parlor was 0 students, we would expect sales of $60,000.

If we believe that the least squares estimated regression equation adequately describes the relationship between x and y, using the estimated regression equation to forecast the value of y for a given value of x seems reasonable.

72

Using Regression Analysis for Forecasting (Slide 19 of 19)

Combining Causal Variables with Trend and Seasonality Effects:

Regression models are very flexible and can incorporate both causal variables and time series effects.

Considerations in Using Regression in Forecasting:

Whether a regression approach provides a good forecast depends largely on how well we are able to identify and obtain data for independent variables that are closely related to the time series.

Part of the regression analysis procedure should focus on the selection of the set of independent variables that provides the best forecasting model.

© 2021 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

Combining Causal Variables with Trend and Seasonality Effects:

Suppose we had a time series of several years of quarterly sales data and advertising expenditures for a single Armand’s restaurant.

If we suspected that sales were related to the causal variable advertising expenditures and that sales showed trend and seasonal effects, we could incorporate each into a single model by combining the approaches we have outlined.

73

Determining the Best Forecasting Model to Use

© 2021 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

Determining the Best Forecasting Model to Use (Slide 1 of 2)

A visual inspection can indicate whether seasonality appears to be a factor and whether a linear or nonlinear trend seems to exist.

For causal modeling, scatter charts can indicate whether strong linear or nonlinear relationships exist between the independent and dependent variables.

If certain relationships appear totally random, this may lead you to exclude these variables from the model.

© 2021 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

75

Determining the Best Forecasting Model to Use (Slide 2 of 2)

While working with large data sets, it is recommended to divide your data into training and validation sets.

Based on the errors produced by the different models for the validation set, you can pick the model that minimizes some forecast error measure, such as MAE, MSE or MAPE.

There are software packages that will automatically select the best model to use.

Ultimately, the user should decide which model to use based on the software output and his managerial knowledge.

© 2021 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

The older portion of a time series for the training set and the more recent portion of the time series as the validation set.

76

End of Chapter 8

© 2021 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

124122412424MAE2.673992MSE10.2239100129.21MAPE14.36%39ttttttteneneyn

a

a

-

Smoothing constant () is the weight give

n to the actual value in

period ; weight given to the forecast in

period is 1.

tt

123

.

Consider a time series involving only th

ree perio:

,

ds ofa

, n

d

dta

a

yyy

=

11

1

.

ˆ

Let equal the actual value of the time s

eries in period 1;t

ˆ

hat is,

y

y

y

(

)

(

)

211

11

1

ˆˆ

1

1

yyy

yy

y

aa

aa

=+-

=+-

=

a

=

Table 8.10: Summary of the

Exponential Smoothing

Forecasts and Forecast Errors

for the Gasoline Sales Time

Series with Smoothing

Constant 0.2

a

=

2

Figure 8.11:

Actual and

Forecast Gasoline

Time Series with

Smoothing n

Constt

0.

a

a

Insight into choosing a good value for c

an be obtained by rewriting the basic

exponential smoothing model as:

(

)

(

)

1

ˆˆ

1

ˆˆ

ˆˆ

ˆ

ttt

ttt

ttt

tt

yyy

yyy

yyy

ye

aa

aa

a

a

+

=+-

=+-

=+-

=+

a

Choose the value of that minimizes the

MSE.

The variable to be forecasted the actual

value of

.

(,

e

)

the time series period is

the dependent variabl

t

t

y

=

11

:

Substituting 11 into the above equation

yields next year’s trend projectio

ˆ

n,

y

t

23

0123

ˆ

t

ybbtbtbt

=+++

0112233

ˆ

tttt

ybbybyby

---

=+++

-

dummy variables are required to model a

categorical variable that has

levels.

1

k

k

-=

.

Thus, to model the seasonal effects in t

he umbrel

4

la i

1

tme e

3

s

du

w

m

n

m

e

y

i

v

r

a

,

r

e

i

d

a

s

b

e e

les

Qtr11 if period is quarter 1; 0 otherwi

se.

Qtr21 if period is quarter 2; 0 otherwi

se.

Qtr31 if period is quarter 3; 0 otherwi

se.

t

t

t

t

t

t

=

=

=

=+

Figure 8.17: Graph of the

Estimated Regression

Equation for Armand’s

Pizza Parlors

5

60

:

yx