0% found this document useful (0 votes)
11 views42 pages

Forecasting - Intro - 2023

Uploaded by

lofav81504
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views42 pages

Forecasting - Intro - 2023

Uploaded by

lofav81504
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 42

Forecasting

Overview

Quantitative Approaches to Forecasting


Time Series Patterns
Forecast Accuracy
Moving Averages and Exponential Smoothing
Forecasting - Business Applications

• Basis for most planning


decisions
• Scheduling
• Inventory
• Production
• Facility/Airport Layout
• Workforce
• Distribution
• Purchasing
• Sales
Forecasting Methods

Forecasting methods can be classified as qualitative


or quantitative.
Qualitative methods generally involve the use of
expert judgment to develop forecasts.
Such methods are appropriate when historical data
on the variable being forecast are either not
applicable or unavailable.
We will focus exclusively on quantitative forecasting
methods in this lecture.
Forecasting Methods

Quantitative forecasting methods can be used when:


▪ past information about the variable being forecast
is available,
▪ the information can be quantified, and
▪ it is reasonable to assume that the pattern of the
past will continue into the future.
Quantitative Forecasting Methods

Quantitative methods are based on an analysis of


historical data concerning one or more time series.
A time series is a set of observations measured at
successive points in time or over successive periods
of time.
If the historical data used involve other
variables/factors that are believed to be related to
the time series that we are trying to forecast, the
procedure is called a causal method.
If the historical data used are restricted to past
values of the series that we are trying to forecast, the
procedure is called a time series method.
Time Series Methods
Forecasting
Methods

Quantitative Qualitative

Causal Time Series Focus of this lecture

The objective of time series analysis is to discover a pattern in


the historical data or time series and then extrapolate the
pattern into the future.
The forecast is based solely on past values of the variable
and/or past forecast errors.
Time Series Patterns
A time series is a sequence of measurements taken
every hour, day, week, month, quarter, year, or at any
other regular time interval.
The pattern of the data is an important factor in
understanding how the time series has behaved in
the past.
If such behavior can be expected to continue in the
future, we can use it to guide us in selecting an
appropriate forecasting method.
Time Series Patterns

The common types of data patterns that can be


identified when examining a time series plot include:

Horizontal

Trend

Seasonal

Trend & Seasonal


Time Series Patterns
Horizontal Pattern

GASOLINE SALES TIME SERIES PLOT


• A horizontal pattern exists when the data
fluctuate around a constant mean.
Sales (1000s of gallons)

• Changes in business conditions can often


result in a time series that has a horizontal
pattern shifting to a new level.
• A change in the level of the time series
makes it more difficult to choose an
appropriate forecasting method.
Time Series Patterns
Trend Pattern

• A time series may show gradual shifts or


movements to relatively higher or lower values
over a longer period of time.
• Trend is usually the result of long-term factors
such as changes in the population, demographics,
technology, or consumer preferences.
• A systematic increase or decrease might be linear
or nonlinear.
• A trend pattern can be identified by analyzing
multiyear movements in historical data.
Time Series Patterns
Seasonal Pattern

• Seasonal patterns are recognised by seeing the


same repeating pattern of highs and lows over
successive periods of time within a year.
• A seasonal pattern might occur within a day, week,
month, quarter, year, or some other interval no
greater than a year.
• A seasonal pattern does not necessarily refer to the
four seasons of the year (spring, summer, fall, and
winter).
Time Series Patterns
Trend and Seasonal Pattern

• Some time series include a combination of a


trend and seasonal pattern.
• In such cases we need to use a forecasting
method that has the capability to deal with both
trend and seasonality.
• Time series decomposition can be used to
separate or decompose a time series into
trend and seasonal components.
Selecting a Forecasting Method

The underlying pattern in the time series is an


important factor in selecting a forecasting method.
Thus, a time series plot should be one of the first
things developed when trying to determine what
forecasting method to use.
If we see a horizontal pattern, then we need to select
a method appropriate for this type of pattern.
If we observe a trend in the data, then we need to
use a method that has the capability to handle trend
effectively.
Methods of Forecasting
The Naïve Method

To demonstrate the computation of these measures


of forecast accuracy we will introduce the simplest of
forecasting methods.
The naïve forecasting method uses the most recent
observation in the time series as the forecast for the
next time period.

𝑌෠𝑡+1 = Actual Value in Period t


Forecasting Error

The key concept associated with measuring forecast


accuracy is forecast error.

Forecast Error = Actual Value - Forecast

A positive forecast error indicates the forecasting


method underestimated the actual value.
A negative forecast error indicates the forecasting
method overestimated the actual value.
Methods of Forecasting
The Naïve Method
Forecast Accuracy

Measures of forecast accuracy are used to


determine how well a particular forecasting method
is able to reproduce the time series data that are
already available.
Measures of forecast accuracy are important factors
in comparing different forecasting methods.
By selecting the method that has the best accuracy
for the data already known, we hope to increase the
likelihood that we will obtain better forecasts for
future time periods.
Forecast Accuracy
Mean Error (ME)
A simple measure of forecast accuracy is the mean
or average of the forecast errors. Because positive and
negative forecast errors tend to offset one another, the
mean error is likely to be small. Thus, the mean error
is not a very useful measure.

Mean Absolute Error (MAE)


This measure avoids the problem of positive and
negative errors offsetting one another. It is the mean
of the absolute values of the forecast errors.
Forecast Accuracy
Mean Squared Error (MSE)
This is another measure that avoids the problem
of positive and negative errors offsetting one
another. It is the average of the squared forecast
errors.
Mean Absolute Percentage Error (MAPE)
The size of MAE and MSE depend upon the scale
of the data, so it is difficult to make comparisons for
different time intervals. To make such comparisons
we need to work with relative or percentage error
measures. The MAPE is the average of the absolute
percentage errors of the forecasts.
Methods of Forecasting
The Naïve Method
Forecasting Errors
Moving Averages and Exponential
Smoothing
Now we discuss two forecasting methods that are
appropriate for a time series with a horizontal
pattern:
Moving Averages Exponential Smoothing

They are called smoothing methods because their


objective is to smooth out the random fluctuations
in the time series.
They are most appropriate for short-range
forecasts.
Moving Averages

The moving averages method uses the average


of the most recent k data values in the time series.
As the forecast for the next period.
σ most recent 𝑘 data values 𝑌𝑡 + 𝑌𝑡−1 + ⋯ + 𝑌𝑡−𝑘+1
𝑌෠𝑡+1 = =
𝑘 𝑘

where: 𝑌෠𝑡+1 = forecast of the time series for period t + 1

Each observation in the moving average calculation


receives the same weight.
Moving Averages

To use moving averages to forecast, we must first


select the order k, or number of time series
values, to be included in the moving average.
A smaller value of k will track shifts in a time
series more quickly than a larger value of k.
If more past observations are considered relevant,
then a larger value of k is better.
Example: Moving Average

Example: Company X

If Company X uses a 3-period moving average to


forecast sales, what are the forecasts for weeks 4-11?

Week Sales Week Sales


1 110 6 120
2 115 7 130
3 125 8 115
4 120 9 110
5 125 10 130
Week Sales 3MA Forecast
1 110
2 115 (110 + 115 + 125)/3
3 125
4 120 116.7
5 125 120.0
6 120 123.3
7 130 121.7
8 115 125.0
9 110 121.7
10 130 118.3
11 118.3
Example: Moving Average

3MA Forecast Absolute Squared Abs.%


Week Sales Forecast Error Error Error Error
1 110
2 115
3 125
4 120 116.7 3.3 3.3 10.89 2.75
5 125 120.0 5.0 5.0 25.00 4.00
6 120 123.3 -3.3 3.3 10.89 2.75
7 130 121.7 8.3 8.3 68.89 6.38
8 115 125.0 -10.0 10.0 100.00 8.70
9 110 121.7 -11.7 11.7 136.89 10.64
10 130 118.3 11.7 11.7 136.89 9.00
Total 6.6 53.3 489.45 44.22
Example: Moving Average

3-MA Forecast Accuracy


53.3
MAE = = 7.61
7

489.45
MSE = = 69.92
7

44.22
MAPE = = 6.32%
7
Exponential Smoothing
• Exponential Smoothing Forecast

𝑌෠𝑡+1 = 𝛼𝑌𝑡 + 1 − 𝛼 𝑌෠𝑡 Can be rewritten as …. 𝑌෠𝑡+1 = 𝑌෠𝑡 + 𝛼 𝑌𝑡 − 𝑌෠𝑡

where:
𝑌෠𝑡+1 = forecast of the time series for period t + 1
Yt = actual value of the time series in period t
Ft = forecast of the time series for period t
a = smoothing constant (0 < a < 1)
and let:
𝑌෠2 = 𝑌1 (to initiate the computations)
Example: Exponential Smoothing

Example: Company X
If Company X uses exponential smoothing
to forecast sales, which value for the smoothing
constant a, 0.1 or 0.8, gives better forecasts?

Week Sales Week Sales


1 110 6 120
2 115 7 130
3 125 8 115
4 120 9 110
5 125 10 130
Example: Exponential Smoothing (a = 0.1)

a = 0.1 Forecast Absolute Squared Abs.%


Week Sales Forecast Error Error Error Error
1 110
2 115 110.00
110.00 𝑌෠2 = 𝑌1 (to
5.00 5.00initiate25.00 4.35
the computations)
3 125 110.50 14.50 14.50 210.25 11.60
4 120 111.95 8.05 8.05 64.80 6.71
5 125 112.76 12.24 12.24 149.94 9.79
6 120 113.98 6.02 6.02 36.25 5.02
7 130 114.58 15.42 15.42 237.73 11.86
8 115 116.12 -1.12 1.12 1.26 0.97
9 110 116.01 -6.01 6.01 36.12 5.46
10 130 115.41 14.59 14.59 212.87 11.22
Total 82.95 974.22 66.98
Example: Exponential Smoothing (a = 0.1)

a = .1 Forecast Absolute Squared Abs.%


Week Sales Forecast Error Error Error Error
1 110
2 115 110.00 5.00 5.00 25.00 4.35
෠ − 𝛼 𝑌෠𝑡
3 125 110.50
110.50 14.50𝑌𝑡+1 =14.50
𝛼𝑌𝑡 + 1210.25 11.60
4 120 111.95 8.05 8.05 64.80 6.71
5 125 112.76 12.24 12.24 149.94 9.79
6 120 113.98 6.02 6.02 36.25 5.02
7 130 114.58 15.42 15.42 237.73 11.86
8 115 116.12 -1.12 1.12 1.26 0.97
9 110 116.01 -6.01 6.01 36.12 5.46
10 130 115.41 14.59 14.59 212.87 11.22
Total 82.95 974.22 66.98
Example: Exponential Smoothing (a = 0.1)

a = .1 Forecast Absolute Squared Abs.%


Week Sales Forecast Error Error Error Error
1 110
2 115 110.00 5.00 5.00 25.00 4.35
෠ − 𝛼 𝑌෠𝑡
3 125 110.50
110.50 14.50𝑌𝑡+1 =14.50
𝛼𝑌𝑡 + 1210.25 11.60
4 120 111.95 8.05 8.05 64.80 6.71
5 125 112.76 12.24 12.24 149.94 9.79
6 120 113.98 6.02 6.02 36.25 5.02
7 130 114.58 15.42 15.42 237.73 11.86
8 115 116.12 -1.12 1.12 1.26 0.97
9 110 116.01 -6.01 6.01 36.12 5.46
10 130 115.41 14.59 14.59 212.87 11.22
Total 82.95 974.22 66.98
Example: Exponential Smoothing
Using Smoothing Constant Value a = .1

𝑌෠2 = Y1 = 110
𝑌෠3 = .1Y2 + .9𝑌෠2 = .1(115) + .9(110) = 110.50
𝑌෠4 = .1Y3 + .9𝑌෠3 = .1(125) + .9(110.5) = 111.95
𝑌෠5 = .1Y4 + .9𝑌෠4 = .1(120) + .9(111.95) = 112.76
𝑌෠6 = .1Y5 + .9𝑌෠5 = .1(125) + .9(112.76) = 113.98
𝑌෠7 = .1Y6 + .9𝑌෠6 = .1(120) + .9(113.98) = 114.58
𝑌෠8 = .1Y7 + .9𝑌෠7 = .1(130) + .9(114.58) = 116.12
𝑌෠9 = .1Y8 + .9𝑌෠8 = .1(115) + .9(116.12) = 116.01
𝑌෠10 = .1Y9 + .9𝑌෠9 = .1(110) + .9(116.01) = 115.41
Using Smoothing Constant Value a = .8

𝑌෠2 = = 110
𝑌෠3 = .8(115) + .2(110) = 114.00
𝑌෠4 = .8(125) + .2(114) = 122.80
𝑌෠5 = .8(120) + .2(122.80) = 120.56
𝑌෠6 = .8(125) + .2(120.56) = 124.11
𝑌෠7 = .8(120) + .2(124.11) = 120.82
𝑌෠8 = .8(130) + .2(120.82) = 128.16
𝑌෠9 = .8(115) + .2(128.16) = 117.63
𝑌෠10 = .8(110) + .2(117.63) = 111.53
Example: Exponential Smoothing (a = .1)

a = .1 Forecast Absolute Squared Abs.%


Week Sales Forecast Error Error Error Error
1 110
2 115 110.00 5.00 5.00 25.00 4.35
3 125 110.50 14.50 14.50 210.25 11.60
4 120 111.95 8.05 8.05 64.80 6.71
5 125 112.76 12.24 12.24 149.94 9.79
6 120 113.98 6.02 6.02 36.25 5.02
7 130 114.58 15.42 15.42 237.73 11.86
8 115 116.12 -1.12 1.12 1.26 0.97
9 110 116.01 -6.01 6.01 36.12 5.46
10 130 115.41 14.59 14.59 212.87 11.22
Total 82.95 974.22 66.98
Example: Exponential Smoothing (a = .1)

Forecast Accuracy
82.95
MAE = = 9.22
9

974.22
MSE = = 108.25
9

66.98
MAPE = = 7.44%
9

Exponential smoothing (with a = .1) provided


less accurate forecasts than the 3-MA approach.
Example: Exponential Smoothing (a = .8)

a = .8 Forecast Absolute Squared Abs.%


Week Sales Forecast Error Error Error Error
1 110
2 115 110.00 5.00 5.00 25.00 4.35
3 125 114.00 11.00 11.00 121.00 8.80
4 120 122.80 -2.20 2.20 7.84 1.83
5 125 120.56 4.44 4.44 19.71 3.55
6 120 124.11 -4.11 4.11 16.91 3.43
7 130 120.82 9.18 9.18 84.23 7.06
8 115 128.16 -13.16 13.16 173.30 11.44
9 110 117.63 -7.63 7.63 58.26 6.94
10 130 111.53 18.47 18.47 341.27 14.21
Total 75.19 847.52 61.61
Example: Exponential Smoothing (a = .8)

Forecast Accuracy
75.19
MAE = = 8.35
9
847.52
MSE = = 94.17
9

61.61
MAPE = = 6.85%
9
3-MA Forecast Accuracy Exponential Smoothing (a = .1) Exponential Smoothing (a = .8)

53.3 82.95 75.19


MAE = = 7.61 MAE = = 9.22 MAE = = 8.35
7 9 9
489.45 974.22 847.52
MSE = = 69.92 MSE = = 108.25 MSE = = 94.17
7 9 9
44.22 66.98 61.61
MAPE = = 6.32% MAPE = = 7.44% MAPE = = 6.85%
7 9 9

Exponential smoothing (with a = .8) provided


more accurate forecasts than ES with a = .1,
but less accurate than the 3-MA.
Summary

Quantitative Approaches to Forecasting


Time Series Patterns
Forecast Accuracy
Moving Averages and Exponential Smoothing

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy