Forecasting - Troy J Wishart

advertisement
Forecasting
MNG221 - Management Science
Lecture Outline
•
•
•
•
•
Forecasting basics
Moving average
Exponential smoothing
Linear trend line
Forecast accuracy
Forecasting
Forecasting Basics
Forecasting Basics
• A Forecast – is a prediction of something
that is likely to occur in the future.
• A variety of forecasting methods exist,
and their applicability is dependent on
the:
–time frame of the forecast (i.e., how
far in the future we are forecasting),
Forecasting Basics
• A variety of forecasting methods exist,
and their applicability is dependent on
the:
–the existence of patterns in the
forecast (i.e., seasonal trends, peak
periods), and
–the number of variables to which the
forecast is related.
Forecasting
Forecasting Components
Forecasting Components
• Time Frames of Forecast:
–Short Range - encompass the
immediate future and are concerned
with the daily operations rarely goes
beyond a couple months into the
future.
Forecasting Components
• Time Frames of Forecast:
–Medium Range - encompasses
anywhere from 1 or 2 months to 1
year.
–More closely related to a yearly
production plan and will reflect such
items as peaks and valleys in demand
Forecasting Components
• Time Frames of Forecast:
–Long Range - encompasses a period
longer than 1 or 2 years.
–It is Related to management's attempt
to plan new products for changing
markets, build new facilities, or secure
long-term financing.
Forecasting Components
• Forecasts can exhibit patterns or trend:
–A trend is a long-term movement of
the item being forecast
–Random variations are movements
that are not predictable and follow no
pattern (and thus are virtually
unpredictable).
Forecasting Components
Forecasts can exhibit patterns or trend:
A cycle is an undulating movement in
demand, up and down, that repeats itself
over a lengthy time span (i.e., more than 1 year).
A seasonal pattern is an oscillating
movement in demand that occurs
periodically (in the short run) and is
repetitive.
Seasonality is often weather related.
Forecasting Components: Forecast Patterns
Forms of forecast movement: (a) trend, (b) cycle, (c)
seasonal pattern, and (d) trend with seasonal pattern
Forecasting
Forecasting Methods
Forecasting Methods
The forecasting component determines to
a certain extent the type of forecasting
method that can or should be used.
• Time Series - is a category of statistical
techniques that uses historical data to
predict future behavior.
Forecasting Methods
• Regression (or causal) methods attempt to develop a mathematical
relationship (in the form of a regression
model) between the item being
forecast and factors that cause it to
behave the way it does.
Forecasting Methods
• Qualitative methods - use management
judgment, expertise, and opinion to
make forecasts.
• Often called "the jury of executive
opinion,"
• They are the most common type of
forecasting method for the long-term
strategic planning process.
Forecasting Methods
Time Series Analysis
Time Series Methods
•Time series methods tend to be
most useful for short-range
forecasting, (although they can
be used for longer-range
forecasting) and relate to only
one factor time.
Time Series Methods
• Two types of time series methods:
1. The Moving Average
a)Simple Moving Average
b)Weighted Moving Average
2. Exponential Smoothing.
Time Series – Moving Average
Moving Averages
• The moving average method uses
several values during the recent past to
develop a forecast.
• The moving average method is good for
stable demand with no pronounced
behavioral patterns.
Time Series – Moving Average
Moving Averages
• Moving averages are computed for
specific periods, such as 3 months or 5
months, depending on how much the
forecaster desires to smooth the data.
Time Series – Moving Average
Simple Moving Averages
• Moving average forecast may be computed for
specified time period as follows:
n

MA i , t 
Di
i 1
where
n
n = number of periods in the moving average
D = data in period i
Time Series – Moving Average
Simple Moving Averages - Delivery Orders for 10-month period
Month
Orders Delivered per Month
January
120
February
90
March
100
April
75
May
110
June
50
July
75
August
130
September
110
October
90
Time Series – Moving Average
Simple Moving Averages Example
• The moving average from the demand
for orders for the last 3 months in the
sequence:
Time Series – Moving Average
Simple Moving Averages Example
• The 5-month moving average is
computed from the last 5 months of
demand data, as follows:
Time Series – Moving Average
Simple 3- and 5- month Moving Average
Time Series – Moving Average
Simple 3- and 5- month Moving Average
Longer-period moving averages react more slowly to recent
demand changes than do shorter-period moving averages.
Time Series – Moving Average
Weighted Moving Average
• The major disadvantage of the Simple
Moving Average method is that it does
not react well to variations that occur
for a reason, such as trends and seasonal
effects (although this method does
reflect trends to a moderate extent).
Time Series – Moving Average
Weighted Moving Average
• The Simple Moving Average method can
be adjusted to reflect more closely more
recent fluctuations in the data and
seasonal effects.
• This adjusted method is referred to as a
Weighted Moving Average method.
Time Series – Moving Average
• Weighted Moving Average - is a time
series forecasting method in which the
most recent data are weighted.
• It may be computed for specified time
period using the following:
Time Series – Moving Average
• Weighted Moving Average -
Where:
Wi = the weight for period i, is
between 0% and 100%
∑Wi =1.00
Di = data in period i
Time Series – Moving Average
Weighted Moving Average
For example, if the Instant Paper Clip Supply
Company wants to compute a 3-month
weighted moving average with a weight of
50% for the October data, a weight of 33% for
the September data, and a weight of 17% for
August, it is computed as.
Time Series – Moving Average
Weighted Moving Average - Table
Time Series – Exponential Smoothing
• The Exponential Smoothing forecast
method is an averaging method that
weights the most recent past data more
strongly than more distant past data.
• There are two forms of exponential
smoothing:
1. Simple Exponential Smoothing
2. Adjusted Exponential Smoothing
(adjusted for trends, seasonal patterns, etc.)
Time Series – Exponential Smoothing
Simple Exponential Smoothing
• The simple exponential smoothing
forecast is computed by using the
formula:
F t 1   D t  (1   ) F t
Time Series – Exponential Smoothing
Simple Exponential Smoothing
F t 1   D t  (1   ) F t
where
Ft+1 = the forecast for the next period
Dt = the actual demand for the present period
Ft = the previously determined forecast for the
present periods
α = a weighting factor referred to as the
smoothing constant
Time Series – Exponential Smoothing
Simple Exponential Smoothing
• The smoothing constant, α, is betw. 0 & 1.
• It reflects the weight given to the most
recent demand data.
»For example, if α = .20,
»Ft+1 = .20Dt + .80Ft
• This means that our forecast for the next
period is based on 20% of recent demand
(Dt) and 80% of past demand.
Time Series – Exponential Smoothing
Simple Exponential Smoothing
• The higher α is (the closer α is to one),
the more sensitive the forecast will be
to changes in recent demand.
• Alternatively, the closer α is to zero, the
greater will be the dampening or
smoothing effect.
Time Series – Exponential Smoothing
Simple Exponential Smoothing
• The most commonly used values of α
are in the range from .01 to .50.
• However, the determination of α is
usually judgmental and subjective and
will often be based on trial-and-error
experimentation.
Time Series – Exponential Smoothing
Simple Exponential Smoothing Example
Period
Month
Demand
1
January
37
2
February
40
3
March
41
4
April
37
5
May
45
6
June
50
7
July
43
8
August
47
9
September
56
10
October
52
11
November
55
12
December
54
•A company - PM
Computer Services
has accumulated
demand data in table
for its computers for
the past 12 months.
•It wants to compute
exponential
smoothing forecasts,
using smoothing
constants (α) equal to
0.30 and 0.50.
Time Series – Exponential Smoothing
Simple Exponential Smoothing Example
• To develop the series of forecasts for the data
i, start with period 1 (January) and compute
the forecast for period 2 (February) by using α
= 0.30.
• The formula for exponential smoothing also
requires a forecast for period 1, which we do
not have, so we will use the demand for
period 1 as both demand and the forecast for
period 1.
Time Series – Exponential Smoothing
Simple Exponential Smoothing Example
• Thus the forecast for February is:
–F2 = αD1 + (1 - α)F1
–= (.30)(37) + (.70)(37) = 37 units
Time Series – Exponential Smoothing
Simple Exponential Smoothing Example
• The forecast for period 3 is computed
similarly: F3 = α D2 + (1 - α)F2
= (.30)(40) + (.70)(37) = 37.9 units
• The final forecast is for period 13, January,
and is the forecast of interest to PM
Computer Services: F13 = α D12 + (1 - α)F12
= (.30)(54) + (.70)(50.84) = 51.79 units
Time Series – Exponential Smoothing
Simple Exponential Smoothing Example
Period
Month
Demand
Forecast, Ft + 1
a = 0.30
a = 0.50
1
January
37
2
February
40
37.00
37.00
3
March
41
37.90
38.50
4
April
37
38.83
39.75
5
May
45
38.28
38.37
6
June
50
40.29
41.68
7
July
43
43.20
45.84
8
August
47
43.14
44.42
9
September
56
44.30
45.71
10
October
52
47.81
50.85
11
November
55
49.06
51.42
12
December
54
50.84
53.21
13
January
51.79
53.61
Time Series – Exponential Smoothing
Simple Exponential Smoothing Example
• In general, when demand is relatively stable, without any trend, using
a small value for α is more appropriate to simply smooth out the
forecast.
• Alternatively, when actual demand displays an increasing (or
decreasing) trend, as is the case, a larger value of α is generally better.
Time Series – Exponential Smoothing
Adjusted Exponential Smoothing
• The adjusted exponential smoothing
forecast consists of the exponential
smoothing forecast with a trend
adjustment factor added to it.
• The formula for the adjusted forecast is:
AFt+1 = Ft+1 + Tt+1
where
T = an exponentially smoothed trend factor
Time Series – Exponential Smoothing
Adjusted Exponential Smoothing
• The trend factor is computed much the same
as the exponentially smoothed forecast.
• It is, in effect, a forecast model for trend:
Tt+1 = β(Ft+1 - Ft) + (1 - β)Tt
where
Tt = the last period trend factor
β = a smoothing constant for trend
Time Series – Exponential Smoothing
Adjusted Exponential Smoothing
• Like α, β is a value between 0 and 1.
• It reflects the weight given to the most
recent trend data.
• Also like α, β is often determined
subjectively, based on the judgment of
the forecaster.
Time Series – Exponential Smoothing
Adjusted Exponential Smoothing
• A high β reflects trend changes more
than a low β.
• It is not uncommon for β to equal α in
this method.
• The closer β is to one, the stronger a
trend is reflected.
Time Series – Exponential Smoothing
Adjusted Exponential Smoothing Example
• PM Computer Services now wants to develop
an adjusted exponentially smoothed forecast,
using the same 12 months of demand.
• The adjusted forecast for February, AF2, is the
same as the exponentially smoothed forecast
because the trend computing factor will be
zero (i.e., F1 and F2 are the same and T2 = 0).
Time Series – Exponential Smoothing
Adjusted Exponential Smoothing Example
• Thus, we will compute the adjusted forecast
for March, AF3, as follows, starting with the
determination of the trend factor, T3:
– T3 = β (F3 - F2) + (1 β)T2 = (.30)(38.5 - 37.0) +
(.70)(0) = 0.45, and
– AF3 = F3 + T3 = 38.5 + 0.45 = 38.95
Time Series – Exponential Smoothing
Adjusted Exponential Smoothing
• Period 13 is computed as follows:
–T13 = β(F13 - F12) + (1 β)T12
–= (.30)(53.61 - 53.21) + (.70)(1.77) =
1.36
and
• AF13 = F13 + T13 = 53.61 + 1.36 = 54.96
units
Time Series – Exponential Smoothing
Trend
(Tt +1)
Adjusted
Forecast
(AFt +1)
Period
Month
Demand
Forecast
(Ft +1)
1
January
37
37.00
2
February
40
37.00
0.00
37.00
3
March
41
38.50
0.45
38.95
4
April
37
39.75
0.69
40.44
5
May
45
38.37
0.07
38.44
6
June
50
41.68
1.04
42.73
7
July
43
45.84
1.97
47.82
8
August
47
44.42
0.95
45.37
9
September
56
45.71
1.05
46.76
10
October
52
50.85
2.28
53.13
11
November
55
51.42
1.76
53.19
12
December
54
53.21
1.77
54.98
13
January
53.61
1.36
54.96
Time Series – Exponential Smoothing
Simple Exponential Smoothing Example
Time Series – Linear Trend Line
Linear Trend Line
• Linear regression is most often thought
of as a causal method of forecasting in
which a mathematical relationship is
developed between demand and some
other factor that causes demand
behavior.
Time Series – Linear Trend Line
Linear Trend Line
• However, when demand displays an
obvious trend over time, a least squares
regression line, or linear trend line, can
be used to forecast demand.
• A linear trend line is a linear regression
model that relates demand to time.
Time Series – Linear Trend Line
Linear Trend Line
• The linear regression takes form of a
linear equation as follows:
where
y  a  bx
a = intercept
b = slope of the line
x = the time period
y = forecast for demand for period x
Time Series – Linear Trend Line
Linear Trend Line
• The parameters of the trend line may be
calculated as follows:
xy  n x y

b
 x  nx
2
where
x

x
n
and
a  y  bx
2
and

y 
n
y
Time Series – Linear Trend Line
Linear Trend Line Example
x (period)
y (demand)
xy
x2
1
37
37
1
2
40
80
4
3
41
123
9
4
37
148
16
5
45
225
25
6
50
300
36
7
43
301
49
8
47
376
64
9
56
504
81
10
52
520
100
11
55
605
121
12
54
648
144
78
557
3,867
650
Time Series – Linear Trend Line
Linear Trend Line Example
• Using these values for ẋ and ӯ the values, the
parameters for the linear trend line are
computed as follows:
Time Series – Linear Trend Line
Linear Trend Line Example
Therefore, the linear trend line is
y = 35.2 + 1.72x
•To calculate a forecast for period 13, x = 13
would be substituted in the linear trend line:
y = 35.2 + 1.72(13) = 57.56
• A linear trend line will not adjust to a change
in trend as will exponential smoothing.
Time Series – Linear Trend Line
Linear Trend Line Example
Time Series – Seasonal Adjustments
Seasonal Adjustments
• Many demand items exhibit seasonal
behavior or pattern, that is, a repetitive
up-and-down movement in demand.
• It is possible to adjust the seasonality of
a normal forecast by multiplying it by a
seasonal factor.
Time Series – Seasonal Adjustments
Seasonal Adjustments
• A seasonal factor, which is a numerical
value is multiplied by the normal
forecast to get a seasonally adjusted
forecast.
Time Series – Seasonal Adjustments
Seasonal Adjustments
• One method for developing a demand for
seasonal factors is dividing the actual
demand for each seasonal period by the
total annual demand, according to the
following formula:
Time Series – Seasonal Adjustments
Seasonal Adjustments
• The resulting seasonal factors are
between 0 and 1.
• These seasonal factors are thus
multiplied by the annual forecasted
demand to yield seasonally adjusted
forecasts for each period.
Time Series – Seasonal Adjustments
Seasonal Adjustments Example
Demand (1,000s)
Year QUARTER 1 QUARTER 2 QUARTER 3 QUARTER 4 TOTAL
2003
12.6
8.6
6.3
17.5
45.0
2004
14.1
10.3
7.5
18.2
50.1
2005
15.3
10.6
8.1
19.6
53.6
Total
42.0
29.5
21.9
55.3
148.7
Next, multiply the forecasted demand
for the next year, 2006, by each of the
seasonal factors to get the forecasted
demand for each quarter.
Time Series – Seasonal Adjustments
Seasonal Adjustments Example
Demand (1,000s)
Year
QUARTER 1
QUARTER 2
QUARTER 3
QUARTER 4
TOTAL
2003
12.6
8.6
6.3
17.5
45.0
2004
14.1
10.3
7.5
18.2
50.1
2005
15.3
10.6
8.1
19.6
53.6
Total
42.0
29.5
21.9
55.3
148.7
• However, to accomplish this, we need a demand forecast for
2006.
• In this case, because the demand data in the table seem to
exhibit a generally increasing trend, we compute a linear trend
line for the 3 years of data in the table to use as a rough
forecast estimate:
y = 40.97 + 4.30x = 40.97 + 4.30(4) = 58.17 or 58,170 turkeys.
Time Series – Seasonal Adjustments
Seasonal Adjustments Example
Demand (1,000s)
Year
QUARTER 1 QUARTER 2 QUARTER 3 QUARTER 4 TOTAL
2003
12.6
8.6
6.3
17.5
45.0
2004
14.1
10.3
7.5
18.2
50.1
2005
15.3
10.6
8.1
19.6
53.6
Total
42.0
29.5
21.9
55.3
148.7
Using this annual
forecast of demand, the
seasonally adjusted
forecasts, SFi, for 2006
are as follows:
Forecasting
Forecast Accuracy
Forecast Accuracy
• It is not probable that a forecast will be
completely accurate.
• Forecasts will always deviate from the
actual demand resulting in a Forecast
error
• A Forecast Error is the difference
between the forecast and actual
demand.
Forecast Accuracy
• There are different measures of forecast
error:
–Mean Absolute Deviation (MAD),
–Mean Absolute Percent Deviation
(MAPD),
–Cumulative Error (E),
–Average Error or Bias (Ē),
–Mean Squared Error (MSE).
Forecast Accuracy
Mean Absolute Deviation (MAD)
is the average, absolute difference between the
forecast and the demand and is computed by
the following formula:
Forecast Accuracy
Mean Absolute Percent Deviation (MAPD)
–is a absolute error as a percentage
of demand.
Forecast Accuracy
Cumulative error – sum of the forecast
error.
E 

et
Average error – is the per-period
average of cumulative error.
Forecast Accuracy
Mean Squared Error (MSE)
• Each individual error value is squared,
and then these values are summed and
averaged.
• As with other measures of forecast
accuracy, the smaller the MSE, the
better
Forecast accuracy – Worked Example
Forecasting
Regression Methods
Regression Methods
• In contrast to times series techniques,
regression is a forecasting technique
that measures the relationship of one
variable to one or more other variables.
• The simplest form of regression is linear
regression.
Regression Methods
• Simple Linear Regression relates one
dependent variable to one independent
variable in the form of a linear equation:
Regression Methods
Simple Linear Regression
• To develop the linear equation, the slope, b,
and the intercept, a, must first be computed
by using the following least squares formulas:
Regression Methods
Simple Linear Regression
• Where
Regression Methods
Simple Linear Regression
x2
x (wins)
y (attendance,
1,000s)
xy
4
36.3
145.2
16
6
40.1
240.6
36
6
41.2
247.2
36
8
53.0
424.0
64
6
44.0
264.0
36
7
45.6
319.2
49
5
39.0
195.0
25
7
47.5
332.5
49
49
346.7
2,167.7
311
Regression Methods
Simple Linear Regression
Regression Methods
Simple Linear Regression
• Substituting these values for a and b into
the linear equation line, we have
• y = 18.46 + 4.06x
• Thus, for x = 7 (wins), the forecast for
attendance is
• y = 18.46 + 4.06(7) = 46.88 or 46,880
Regression Methods
Correlation
• Correlation in a linear regression equation is a
measure of the strength of the relationship
between the independent and dependent
variables. The formula for the correlation
coefficient is:
Regression Methods
Correlation
• The value of r varies between -1.00 and
+1.00, with a value of ±1.00 indicating a
strong linear relationship between the
variables.
Regression Methods
Correlation Example
We can determine the
correlation coefficient for the
linear regression equation
determined in our State
University example by
substituting most of the terms
calculated for the least squares
formula (except for Sy2) into the
formula for r:
Regression Methods
Coefficient of Determination
• Another measure of the strength of the
relationship between the variables in a
linear regression equation is the
coefficient of determination.
• The coefficient of determination is the
percentage of the variation in the
dependent variable that results from the
independent variable.
Regression Methods
Coefficient of Determination
• It is computed by simply squaring the
value of r.
• For our example, r = .948; thus, the
coefficient of determination is:
Download