0% found this document useful (0 votes)
4 views

Session 3 4_Forecasting

Uploaded by

Saumya Jain
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)
4 views

Session 3 4_Forecasting

Uploaded by

Saumya Jain
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/ 118

Forecasting for Operations

By:
Dr. Vinay Surendra Yadav
Assistant Professor
Operations and Quantitative Techniques
Indian Institute of Management Shillong, India
Demand Process – Three Key Questions

Demand Planning
What should we do to shape and ◼ Product & Packaging
create demand for our product? ◼ Promotions
◼ Pricing
◼ Place

What should we expect demand to


Demand Forecasting
be given the demand plan in place? ◼ Strategic, Tactical, Operational
◼ Considers internal & external factors
◼ Baseline, unbiased, & unconstrained

How do we prepare for and act Demand Management


Balances demand & supply
on demand when it materializes? ◼

◼ Sales & Operations Planning (S&OP)


◼ Bridges both sides of a firm
Forecasting Levels
Level Horizon Purposes
Strategic Year/Years • Business Planning
• Capacity Planning
• Investment Strategies

Tactical • Brand Plans


• Budgeting
Quarterly • Sales Planning
• Manpower Planning

• Short-term Capacity Planning


Months/Weeks • Master Planning
• Inventory Planning

Operational Days/Hours • Transportation Planning


• Production Planning
• Inventory Deployment
Forecasting Truisms

1. Forecasts are always wrong


2.➔ Use ranges & track forecast error

2. Aggregated forecasts are more accurate


3.➔ Risk pooling reduces CV

3. Shorter time horizon forecasts are more accurate


4.➔ Postpone customization until as late as
possible
Fundamental Forecasting Approaches

Subjective Objective
Judgmental Causal / Relational
◼ Sales force surveys ◼ Econometric Models
◼ Jury of experts ◼ Leading Indicators
◼ Delphi techniques ◼ Input-Output Models

Experimental Time Series


◼ Customer surveys ◼ “Black Box” Approach
◼ Focus group sessions ◼ Past predicts the future
◼ Test marketing ◼ Identify patterns

Often times, you will need to use a combination of approaches


Cost of Forecasting vs Inaccuracy
 Overly Naïve Models →  Good Region →  Excessive Causal Models →

Total Cost

Cost

Cost of Errors Cost of Forecasting


In Forecast

Forecast Accuracy
How do we determine if a forecast is good?
• What metrics should we use?
• Example - Which is a better forecast?
◼ Squares & triangles are different forecasts
◼ Circles are actual values Remember the discussion
from class that why we
don’t want biasness

1100

1000

900

time
Accuracy versus Bias
◼ Accuracy - Closeness to actual observations
◼ Bias - Persistent tendency to over or under predict

Accurate

Not Accurate

Biased Not Biased


Demand – Sales By Month
What do you notice?
Demand – Sales by Week
Demand – Sales by Day
Demand - Seasonality Sales also differ dramatically
by day of week (DOW)!

Sales differ dramatically


by quarter and month
within quarter!
Demand Forecast
Now
Past Future

Identifying patterns in the past


help us to forecast the future.
Agenda
• Time Series Components • Exponential Smoothing and its
variant
• Cumulative Forecasts • Forecasting Error and Metrics

• Naïve Forecasts • Trend Projections

• Moving Average Forecasts • Multiple Regression

• Weighted Moving Average Forecasts • Monitoring and Controlling of


Forecasts
Time Series Components
• Level (a)

Demand rate
◼ Value where demand hovers around (mean) a
◼ Captures scale of the time series
◼ With no other pattern present its a constant value
time

• Trend (b)
◼ Rate of growth or decline

Demand rate
◼ Persistent movement in one direction
◼ Typically linear but can be exponential, quadratic, etc.
b

• Seasonal Variations (F) time

◼ Repeated cycle around a known and fixed period


◼ Hourly, daily, weekly, monthly, quarterly, etc.
F
Can be caused by natural or man-made forces

Demand rate

• Random Fluctuations (e or ε)
◼ Remainder of variability after other components time
◼ Irregular and unpredictable variations, noise
Time Series Components
• Cyclical Movements (C)
◼ Periodic movement not of a fixed period
◼ Duration can be of different lengths
◼ Most often tied to longer term business cycles or economic conditions
80
70
60
50
40
70 30
Institute of Supply Management (ISM)

20
65
Purchasing Manager Index ( PMI)

Expansio
60
55

n
50

Contracting
45
40
35
30
Oct-06 Apr-07 Oct-07 Apr-08 Oct-08 Apr-09 Oct-09 Apr-10 Oct-10
Data source: Federal Reserve of St. Louis.
Lesson: Time Series Analysis
http://research.stlouisfed.org/fred2/series/NAPM
Cumulative vs. Naïve Forecasts
Time Series Models
• Predominant use of Time Series is for forecasting product demand of . . .
Mature products at the SKU level over a . . .
Short time horizon (weeks, months, quarters, year) . . .
Where demand of items is independent.
• So, components used are level, trend, seasonality, and error.

• Simple Procedure
1. Select an appropriate underlying model of the demand pattern over time
2. Estimate and calibrate values for the model parameters
3. Forecast future demand with the models and parameters selected
4. Review model performance and adjust parameters and model accordingly
Cumulative vs. Naïve Forecasts
Suppose we are at time=10 and want to find forecast for time=11; x^11
t xt 110
1 109 108 Cumulative Forecast:
106
2 92

10
104 x 995
3 98 xˆ11= i=1 i
= = 99.5
4 96 102 10 10
5 104 100
98
6 98
96
7 109
8 99 94 Naïve Forecast:
9 94
92
90
x̂ 11 = xprevious = 96
10 96
1 2 3 4 5 6 7 8 9 10 11
Cumulative vs. Naïve Forecasts
Suppose we are at time=10 and want to find forecast for time=11; x^11
t xt 110
1 109 108 Cumulative Forecast:
106
2 92

10
104 x 995
3 98 xˆ= i=1 i
= = 99.5
4 96 102 10 10
5 104 100
98
6 98
96
7 109
8 99 94 Naïve Forecast:
9 94
92
90
x̂ 11= x10 = 96
10 96
1 2 3 4 5 6 7 8 9 10 11

Lets look at “next period” forecasts for cumulative and naïve models . . .
Cumul Naïve 110
t xt 108
Note:
1 109 106
2 92 109 109 104 • Cumulative model is
3 98 100.5 92 102 “calm” while the
4 96 99.7 98 100 Naïve model is
5 104 98.8 96 98 “nervous”.
6 98 99.8 104 96 • Naïve model is more
7 109 99.5 98 94 responsive than the
92
8 99 100.9 109 cumulative model.
90
9 94 100.6 99
10 96 99.9 94 1 2 3 4 5 6 7 8 9 10 11

11 ?? 99.5 96
Moving Average Forecast
Moving Average Method
❑ MA is a series of arithmetic means
❑ Used if little or no trend
❑ Used often for smoothing
✓ Provides overall impression of data over time

Moving average =
å demand in previous n periods
n
Moving Average Example

MONTH ACTUAL SHED SALES 3-MONTH MOVING AVERAGE


January 10
February 12
March 13
April 16 (10 + 12 + 13)/3 = 11 2/3
May 19 (12 + 13 + 16)/3 = 13 2/3
June 23 (13 + 16 + 19)/3 = 16
July 26 (16 + 19 + 23)/3 = 19 1/3
August 30 (19 + 23 + 26)/3 = 22 2/3
September 28 (23 + 26 + 30)/3 = 26 1/3
October 18 (29 + 30 + 28)/3 = 28
November 16 (30 + 28 + 18)/3 = 25 1/3
December 14 (28 + 18 + 16)/3 = 20 2/3
Weighted Moving Average
❖ Used when some trend might be present
✓ Older data usually less important
❖ Weights based on experience and intuition

(( )(
Weighted å Weight for period n Demand in period n
moving =
))
average å Weights
Weighted Moving Average

MONTH ACTUAL SHED SALES 3-MONTH WEIGHTED MOVING AVERAGE


January 10
February 12
March 13
April 16 [(3 x 13) + (2 x 12) + (10)]/6 = 12 1/6
May 19
June WEIGHTS
23 APPLIED PERIOD

July 26 3 Last month

August 30 2 Two months ago

September 28 1 Three months ago

October 18 6 Sum of the weights

November Forecast for


16this month =
December 3 x14
Sales last mo. + 2 x Sales 2 mos. ago + 1 x Sales 3 mos. ago
Sum of the weights
Weighted Moving Average

MONTH ACTUAL SHED SALES 3-MONTH WEIGHTED MOVING AVERAGE


January 10
February 12
March 13
April 16 [(3 x 13) + (2 x 12) + (10)]/6 = 12 1/6
May 19 [(3 x 16) + (2 x 13) + (12)]/6 = 14 1/3
June 23 [(3 x 19) + (2 x 16) + (13)]/6 = 17
July 26 [(3 x 23) + (2 x 19) + (16)]/6 = 20 1/2
August 30 [(3 x 26) + (2 x 23) + (19)]/6 = 23 5/6
September 28 [(3 x 30) + (2 x 26) + (23)]/6 = 27 1/2
October 18 [(3 x 28) + (2 x 30) + (26)]/6 = 28 1/3
November 16 [(3 x 18) + (2 x 28) + (30)]/6 = 23 1/3
December 14 [(3 x 16) + (2 x 18) + (28)]/6 = 18 2/3
Potential Problems With Moving Average
❑ Increasing n smooths the forecast but makes it less sensitive to
changes

❑ Does not forecast trends well

❑ Requires extensive historical data


Graph of Moving Averages

Weighted moving average


30 –

Sales demand 25 –

20 –

15 – Actual sales

10 – Moving average

5–
| | | | | | | | | | | |

J F M A M J J A S O N D
Month
Exponential Smoothing or First-Order or Single
Smoothing
➢ Form of weighted moving average
✓ Weights decline exponentially
✓ Most recent data weighted most

➢ Requires smoothing constant ()


❖ Ranges from 0 to 1
❖ Subjectively chosen

➢ Involves little record keeping of past data


Exponential Smoothing

New forecast = Last period’s forecast


+  (Last period’s actual demand
– Last period’s forecast)

Ft = Ft – 1 + (At – 1 - Ft – 1)

where Ft = new forecast


Ft – 1 = previous period’s forecast
 = smoothing (or weighting) constant (0 ≤  ≤ 1)
At – 1 = previous period’s actual demand
Exponential Smoothing Example

Predicted demand = 142 Ford Mustangs


Actual demand = 153
Smoothing constant  = .20
Exponential Smoothing Example

Predicted demand = 142 Ford Mustangs


Actual demand = 153
Smoothing constant  = .20

New forecast = 142 + .2(153 – 142)


Exponential Smoothing Example

Predicted demand = 142 Ford Mustangs


Actual demand = 153
Smoothing constant  = .20

New forecast = 142 + .2(153 – 142)


= 142 + 2.2
= 144.2 ≈ 144 cars
Effect of Smoothing Constants
❑ Smoothing constant generally .05 ≤  ≤ .50

❑ As  increases, older values become less significant

WEIGHT ASSIGNED TO
MOST 2ND MOST 3RD MOST 4th MOST 5th MOST
RECENT RECENT RECENT RECENT RECENT
SMOOTHING PERIOD PERIOD PERIOD PERIOD PERIOD
CONSTANT ( ) (1 – ) (1 – )2 (1 – )3 (1 – )4
 = .1 .1 .09 .081 .073 .066

 = .5 .5 .25 .125 .063 .031


Impact of Different 

225 –

Actual  = .5
demand
200 –
Demand

175 –

 = .1
150 – | | | | | | | | |
1 2 3 4 5 6 7 8 9
Quarter
Impact of Different 

225 –

Actual  = .5
► Chose
200 – high of 
values
demand
when underlying average
Demand

is likely to change
► Choose low values of 
175 –

when underlying average  = .1


is stable|
150 – | | | | | | | |
1 2 3 4 5 6 7 8 9
Quarter
Choosing 

The objective is to obtain the most


accurate forecast no matter the
technique
We generally do this by selecting the
model that gives us the lowest
forecast error
Forecast error = Actual demand – Forecast value
= At – Ft
Common Measures of Error

Mean Absolute Deviation (MAD)

MAD =
å Actual - Forecast
n
Determining the MAD
ACTUAL
TONNAGE FORECAST WITH
QUARTER UNLOADED FORECAST WITH  = .10  = .50
1 180 175 175

2 168 175.50 = 175.00 + .10(180 – 175) 177.50

3 159 174.75 = 175.50 + .10(168 – 175.50) 172.75

4 175 173.18 = 174.75 + .10(159 – 174.75) 165.88

5 190 173.36 = 173.18 + .10(175 – 173.18) 170.44

6 205 175.02 = 173.36 + .10(190 – 173.36) 180.22

7 180 178.02 = 175.02 + .10(205 – 175.02) 192.61

8 182 178.22 = 178.02 + .10(180 – 178.02) 186.30

9 ? 178.59 = 178.22 + .10(182 – 178.22) 184.15

Please note that there are three approach to get the first forecast:
1. Take the first demand or
2. Take the average of all demands or
3. Make an assumption near first demand (expert’s opinion).
Determining the MAD
ACTUAL FORECAST ABSOLUTE FORECAST ABSOLUTE
TONNAGE WITH DEVIATION WITH DEVIATION
QUARTER UNLOADED  = .10 FOR a = .10  = .50 FOR a = .50
1 180 175 5.00 175 5.00

2 168 175.50 7.50 177.50 9.50

3 159 174.75 15.75 172.75 13.75

4 175 173.18 1.82 165.88 9.12

5 190 173.36 16.64 170.44 19.56

6 205 175.02 29.98 180.22 24.78

7 180 178.02 1.98 192.61 12.61

8 182 178.22 3.78 186.30 4.30

Sum of absolute deviations: 82.45 98.62

Σ|Deviations|
MAD = 10.31 12.33
n
Common Measures of Error

Mean Squared Error (MSE)

å (Forecast errors)
2

MSE =
n
Determining the MSE

ACTUAL
TONNAGE FORECAST FOR
QUARTER UNLOADED  = .10 (ERROR)2
1 180 175 52 = 25
2 168 175.50 (–7.5)2 = 56.25
3 159 174.75 (–15.75)2 = 248.06
4 175 173.18 (1.82)2 = 3.31
5 190 173.36 (16.64)2 = 276.89
6 205 175.02 (29.98)2 = 898.80
7 180 178.02 (1.98)2 = 3.92
8 182 178.22 (3.78)2 = 14.29
Sum of errors squared = 1,526.52

å (Forecast errors)
2

MSE = = 1,526.52 / 8 = 190.8


n
Common Measures of Error

Mean Absolute Percent Error (MAPE)


n

å100 Actual -Forecast


i i
/ Actuali
MAPE = i=1
n
Determining the MAPE

ACTUAL
TONNAGE FORECAST FOR ABSOLUTE PERCENT ERROR
QUARTER UNLOADED  = .10 100(ERROR/ACTUAL)
1 180 175.00 100(5/180) = 2.78%
2 168 175.50 100(7.5/168) = 4.46%
3 159 174.75 100(15.75/159) = 9.90%
4 175 173.18 100(1.82/175) = 1.05%
5 190 173.36 100(16.64/190) = 8.76%
6 205 175.02 100(29.98/205) = 14.62%
7 180 178.02 100(1.98/180) = 1.10%
8 182 178.22 100(3.78/182) = 2.08%
Sum of % errors = 44.75%

MAPE =
å absolute percent error 44.75%
= = 5.59%
n 8
Comparison of Forecast Error

Rounded Absolute Rounded Absolute


Actual Forecast Deviation Forecast Deviation
Tonnage with for with for
Quarter Unloaded  = .10  = .10  = .50  = .50
1 180 175 5.00 175 5.00
2 168 175.5 7.50 177.50 9.50
3 159 174.75 15.75 172.75 13.75
4 175 173.18 1.82 165.88 9.12
5 190 173.36 16.64 170.44 19.56
6 205 175.02 29.98 180.22 24.78
7 180 178.02 1.98 192.61 12.61
8 182 178.22 3.78 186.30 4.30
82.45 98.62
Comparison of Forecast Error

∑ |deviations|
Rounded Absolute Rounded Absolute
Actual Forecast Deviation Forecast Deviation
MAD =
Tonnage with for with for
Quarter Unloaded
n
a = .10 a = .10  = .50  = .50
1 For  180
= .10 175 5.00 175 5.00
2 168 175.5 7.50 177.50 9.50
3 159 = 82.45/8
174.75 = 10.31
15.75 172.75 13.75
4 175 173.18 1.82 165.88 9.12
5 For  190
= .50 173.36 16.64 170.44 19.56
6 205 = 98.62/8
175.02 = 29.98
12.33 180.22 24.78
7 180 178.02 1.98 192.61 12.61
8 182 178.22 3.78 186.30 4.30
82.45 98.62
Comparison of Forecast Error

∑ (forecast errors)
Rounded
2
Absolute Rounded Absolute
MSE =Tonnage
Actual Forecast Deviation Forecast Deviation

Quarter Unloaded
n
with
a = .10
for
a = .10
with
 = .50
for
 = .50
1 For  180
= .10 175 5.00 175 5.00
2 168 175.5 7.50 177.50 9.50
3 = 1,526.54/8
159 174.75 = 190.82
15.75 172.75 13.75
4 175 173.18 1.82 165.88 9.12
5 For  190
= .50 173.36 16.64 170.44 19.56
6 205 175.02
= 1,561.91/8 = 29.98
195.24 180.22 24.78
7 180 178.02 1.98 192.61 12.61
8 182 178.22 3.78 186.30 4.30
82.45 98.62
MAD 10.31 12.33
Comparison of Forecast Error
n
∑100|deviation
Rounded i|/actualRounded
Absolute i Absolute
=Actuali = 1
MAPE Tonnage Forecast
with
Deviation
for
Forecast
with
Deviation
for
Quarter Unloaded a = .10 n a = .10 a = .50  = .50
1 For 
180= .10 175 5.00 175 5.00
2 168 175.5 7.50 177.50 9.50
3 159 = 44.75/8
174.75 =15.75
5.59% 172.75 13.75
4 175 173.18 1.82 165.88 9.12
5 For 
190= .50 173.36 16.64 170.44 19.56
6 205 175.02
= 54.05/8 =29.98
6.76% 180.22 24.78
7 180 178.02 1.98 192.61 12.61
8 182 178.22 3.78 186.30 4.30
82.45 98.62
MAD 10.31 12.33
MSE 190.82 195.24
Comparison of Forecast Error

Rounded Absolute Rounded Absolute


Actual Forecast Deviation Forecast Deviation
Tonnage with for with for
Quarter Unloaded  = .10  = .10  = .50  = .50
1 180 175 5.00 175 5.00
2 168 175.5 7.50 177.50 9.50
3 159 174.75 15.75 172.75 13.75
4 175 173.18 1.82 165.88 9.12
5 190 173.36 16.64 170.44 19.56
6 205 175.02 29.98 180.22 24.78
7 180 178.02 1.98 192.61 12.61
8 182 178.22 3.78 186.30 4.30
82.45 98.62
MAD 10.31 12.33
MSE 190.82 195.24
MAPE 5.59% 6.76%
Exponential Smoothing with Trend Adjustment or Second-
Order or Double Smoothing of Holt’s Linear Trend

When a trend is present, exponential


smoothing must be modified
MONTH ACTUAL DEMAND FORECAST (Ft) FOR MONTHS 1 – 5

1 100 Ft = 100 (given)

2 200 Ft = F1 + (A1 – F1) = 100 + .4(100 – 100) = 100

3 300 Ft = F2 + (A2 – F2) = 100 + .4(200 – 100) = 140

4 400 Ft = F3 + (A3 – F3) = 140 + .4(300 – 140) = 204

5 500 Ft = F4 + (A4 – F4) = 204 + .4(400 – 204) = 282

Notes: The forecasts generated by Holt’s linear method display a constant trend (increasing or decreasing) indefinitely into the future. Empirical evidence indicates
that these methods tend to over-forecast, especially for longer forecast horizons. Motivated by this observation, Gardner & McKenzie (1985) introduced a parameter
that “dampens” the trend to a flat line some time in the future. Methods that include a damped trend have proven to be very successful, and are arguably the most
popular individual methods when forecasts are required automatically for many series. They are known as Damped Trend Method in which three coefficient is used
alpha (for level), beta (for trend) and phi (for damping).
Exponential Smoothing with Trend Adjustment

Forecast Exponentially Exponentially


including (FITt) = smoothed (Ft) + smoothed (Tt)
trend forecast trend

Ft = (At - 1) + (1 - )(Ft - 1 + Tt - 1)
Tt = (Ft - Ft - 1) + (1 - )Tt - 1
where Ft = exponentially smoothed forecast average
Tt = exponentially smoothed trend
At = actual demand
 = smoothing constant for average (0 ≤  ≤ 1)
 = smoothing constant for trend (0 ≤  ≤ 1)
Exponential Smoothing with Trend Adjustment

Step 1: Compute Ft

Step 2: Compute Tt

Step 3: Calculate the forecast FITt = Ft + Tt


Exponential Smoothing with Trend Adjustment Example

MONTH (t) ACTUAL DEMAND (At) MONTH (t) ACTUAL DEMAND (At)

1 12 6 21

2 17 7 31

3 20 8 28

4 19 9 36

5 24 10 ?

 = .2  = .4
Exponential Smoothing with Trend Adjustment Example

TABLE Forecast with  - .2 and  = .4


SMOOTHED FORECAST
FORECAST SMOOTHED INCLUDING TREND,
MONTH ACTUAL DEMAND AVERAGE, Ft TREND, Tt FITt
1 12 11 2 13.00
2 17 12.80
3 20
4 19
Step 1: Average for Month 2
5 24
6 21 F2 = A1 + (1 – )(F1 + T1)
7 31
8 28 F2 = (.2)(12) + (1 – .2)(11 + 2)
9 36 = 2.4 + (.8)(13) = 2.4 + 10.4
10 —
= 12.8 units
Here the first Ft and Tt are assumed.
Exponential Smoothing with Trend Adjustment Example

TABLE Forecast with  - .2 and  = .4


SMOOTHED FORECAST
FORECAST SMOOTHED INCLUDING TREND,
MONTH ACTUAL DEMAND AVERAGE, Ft TREND, Tt FITt
1 12 11 2 13.00
2 17 12.80 1.92
3 20
4 19
5 24 Step 2: Trend for Month 2
6 21
7 31 T2 = (F2 - F1) + (1 - b)T1
8 28
T2 = (.4)(12.8 - 11) + (1 - .4)(2)
9 36
10 — = .72 + 1.2 = 1.92 units
Exponential Smoothing with Trend Adjustment Example

TABLE Forecast with  - .2 and  = .4


SMOOTHED FORECAST
FORECAST SMOOTHED INCLUDING TREND,
MONTH ACTUAL DEMAND AVERAGE, Ft TREND, Tt FITt
1 12 11 2 13.00
2 17 12.80 1.92 14.72
3 20
4 19
5 24 Step 3: Calculate FIT for Month 2
6 21
7 31 FIT2 = F2 + T2
8 28
FIT2 = 12.8 + 1.92
9 36
10 — = 14.72 units
Exponential Smoothing with Trend Adjustment Example

TABLE Forecast with  - .2 and  = .4


SMOOTHED FORECAST
FORECAST SMOOTHED INCLUDING TREND,
MONTH ACTUAL DEMAND AVERAGE, Ft TREND, Tt FITt
1 12 11 2 13.00
2 17 12.80 1.92 14.72
3 20 15.18 2.10 17.28
4 19 17.82 2.32 20.14
5 24 19.91 2.23 22.14
6 21 22.51 2.38 24.89
7 31 24.11 2.07 26.18
8 28 27.14 2.45 29.59
9 36 29.28 2.32 31.60
10 — 32.48 2.68 35.16
Exponential Smoothing with Trend Adjustment Example

40 –
35 – Actual demand (At)
30 –
Product demand

25 –
20 –
15 –
10 – Forecast including trend (FITt)
5 – with  = .2 and  = .4

0 –
| | | | | | | | |
1 2 3 4 5 6 7 8 9
Time (months)
Trend Projections

Fitting a trend line to historical data points to


project into the medium to long-range
Linear trends can be found using the least
squares technique

y^ = a + bx
where y^ = computed value of the variable to be predicted
(dependent variable)
a = y-axis intercept
b = slope of the regression line
x = the independent variable
Least Squares Method

Values of Dependent Variable (y-values)


Actual observation Deviation7
(y-value)

Deviation5 Deviation6

Deviation3
Least squares method minimizes the
sum of Deviation
the squared
4
errors (deviations)

Deviation1
(error) Deviation2
Trend line, y^ = a + bx

| | | | | | |
1 2 3 4 5 6 7
Time period
Least Squares Method

Equations to calculate the regression variables

ŷ = a + bx

b=
å xy - nxy
å x - nx
2 2

a = y - bx
Least Squares Example

ELECTRICAL ELECTRICAL
YEAR POWER DEMAND YEAR POWER DEMAND
1 74 5 105
2 79 6 142
3 80 7 122
4 90
Least Squares Example

ELECTRICAL POWER
YEAR (x) DEMAND (y) x2 xy
1 74 1 74
2 79 4 158
3 80 9 240
4 90 16 360
5 105 25 525
6 142 36 852
7 122 49 854
Σx = 28 Σy = 692 Σx2 = 140 Σxy = 3,063

x=
å x 28
= =4 y=
å y 692
= = 98.86
n 7 n 7
Least Squares Example

å xy - nxy 3,063 - ( 7) ( 4) (98.86) 295


b= = POWER = = 10.54
å x - nxDEMAND (y)140 - (7) ( 4 ) x 28
ELECTRICAL
2 2 2 2
YEAR (x) xy
1 74 1 74

()
2 79 4 158
3
a = y - bx = 98.8680
-10.54 4 = 56.70 9 240
4 90 16 360
5 105 ŷ = 56.70 +10.54x25
Thus, 525
6 142 36 852
7 122 49 854
Σx = 28 Σy = 692 Σx2 = 140 Σxy = 3,063

x=
å
Demandx in
= =4 y=
å
28year 8 = 56.70 y+ 10.54(8)
=
692
= 98.86
n 7 = 141.02,
n or 141
7 megawatts
Least Squares Example

Trend line,
160 – y^ = 56.70 + 10.54x
150 –
Power demand (megawatts)

140 –
130 –
120 –
110 –
100 –
90 –
80 –
70 –
60 –
50 –
| | | | | | | | |
1 2 3 4 5 6 7 8 9
Year
Least Squares Requirements
1. We always plot the data to insure a linear relationship

2. We do not predict time periods far beyond the database

3. Deviations around the least squares line are assumed to be


random
Seasonal Variations In Data
• There are two different models of seasonality: additive and multiplicative.
• In the additive model, seasonality is expressed as a quantity (e.g., 20 units), which is
added to or subtracted from the series average in order to incorporate seasonality.
• In the multiplicative model, seasonality is expressed as a percentage of the average
(or trend) amount (e.g., 1.10), which is then used to multiply the value of a series to
incorporate seasonality.

The additive method is preferred when the seasonal


variations are roughly constant through the series, while
the multiplicative method is preferred when the seasonal
variations are changing proportional to the level of the
series.

In practice, businesses use the multiplicative model much


more widely than the additive model, because it tends to
be more representative of actual experience, so we will
focus exclusively on the multiplicative model.
Seasonal Variations In Data

The multiplicative seasonal


model can adjust trend data
for seasonal variations in
demand

Triple exponential smoothing and the Holt-Winters method are both time series forecasting methods that
use exponential smoothing to account for trends, levels, and seasonality. In this, three coefficient is used
alpha (for level), beta (for trend) and Gamma (for seasonality).
Seasonal Variations In Data

➢ Steps in the process for monthly seasons:


1.Find average historical demand for each month

2.Compute the average demand over all months

3.Compute a seasonal index for each month

4.Estimate next year’s total demand

5.Divide this estimate of total demand by the number of months, then


multiply it by the seasonal index for that month
Seasonal Index Example
DEMAND
AVERAGE AVERAGE
YEARLY MONTHLY SEASONAL
MONTH YEAR 1 YEAR 2 YEAR 3 DEMAND DEMAND INDEX
Jan 80 85 105 90
Feb 70 85 85 80
Mar 80 93 82 85
Apr 90 95 115 100
May 113 125 131 123
June 110 115 120 115
July 100 102 113 105
Aug 88 102 110 100
Sept 85 90 95 90
Oct 77 78 85 80
Nov 75 82 83 80
Dec 82 78 80 80
Total average annual demand = 1,128
Seasonal Index Example
DEMAND
AVERAGE AVERAGE
YEARLY MONTHLY SEASONAL
MONTH YEAR 1 YEAR 2 YEAR 3 DEMAND DEMAND INDEX
Jan 80 85 105 90 94
Feb 70 85 85 80 94
Mar 80 93 82 85 94
Apr
Average
90 95 1,128
115 100 94
monthly = = 94
May 113 125 131
12 months 123 94
June
demand
110 115 120 115 94
July 100 102 113 105 94
Aug 88 102 110 100 94
Sept 85 90 95 90 94
Oct 77 78 85 80 94
Nov 75 82 83 80 94
Dec 82 78 80 80 94
Total average annual demand = 1,128
Seasonal Index Example
DEMAND
AVERAGE AVERAGE
YEARLY MONTHLY SEASONAL
MONTH YEAR 1 YEAR 2 YEAR 3 DEMAND DEMAND INDEX
Jan 80 85 105 90 94 .957( = 90/94)
Feb 70 85 85 80 94
Mar 80 93 82 85 94
Apr 90 95 115 100 94
May 113 125 131 123 94
Seasonal110
June Average
115 monthly
120 demand
115 for past 394
years
=
July index 100 102 Average
113 monthly
105 demand 94
Aug 88 102 110 100 94
Sept 85 90 95 90 94
Oct 77 78 85 80 94
Nov 75 82 83 80 94
Dec 82 78 80 80 94
Total average annual demand = 1,128
Seasonal Index Example
DEMAND
AVERAGE AVERAGE
YEARLY MONTHLY SEASONAL
MONTH YEAR 1 YEAR 2 YEAR 3 DEMAND DEMAND INDEX
Jan 80 85 105 90 94 .957( = 90/94)
Feb 70 85 85 80 94 .851( = 80/94)
Mar 80 93 82 85 94 .904( = 85/94)
Apr 90 95 115 100 94 1.064( = 100/94)
May 113 125 131 123 94 1.309( = 123/94)
June 110 115 120 115 94 1.223( = 115/94)
July 100 102 113 105 94 1.117( = 105/94)
Aug 88 102 110 100 94 1.064( = 100/94)
Sept 85 90 95 90 94 .957( = 90/94)
Oct 77 78 85 80 94 .851( = 80/94)
Nov 75 82 83 80 94 .851( = 80/94)
Dec 82 78 80 80 94 .851( = 80/94)
Total average annual demand = 1,128
Seasonal Index Example
• If we expect the annual demand for computers to be 1,200 units next year, we would use
these seasonal indices to forecast the monthly demand as follows:
Seasonal forecast for Year 4
MONTH DEMAND MONTH DEMAND

Jan 1,200 July 1,200


x .957 = 96 x 1.117 = 112
12 12
Feb 1,200 Aug 1,200
x .851 = 85 x 1.064 = 106
12 12
Mar 1,200 Sept 1,200
x .904 = 90 x .957 = 96
12 12
Apr 1,200 Oct 1,200
x 1.064 = 106 x .851 = 85
12 12
May 1,200 Nov 1,200
x 1.309 = 131 x .851 = 85
12 12
June 1,200 Dec 1,200
x 1.223 = 122 x .851 = 85
12 12
Seasonal Index Example

Year 4 Forecast
140 – Year 3 Demand
130 – Year 2 Demand
Year 1 Demand
120 –
Demand

110 –
100 –
90 –
80 –
70 –
| | | | | | | | | | | |
J F M A M J J A S O N D
Time
We also solved a problem in class
where we used both trend
projections and seasonality.
San Diego Hospital
• San Diego Hospital wants to improve its forecasting by applying both trend and seasonal indices to 66
months of data it has collected. It will then forecast “patient-days” over the coming year.
• Using 66 months of adult inpatient hospital days, the following equation was computed:

10,200 –

10,000 – Trend Data


Inpatient Days

9,800 – 9745
9702
9616 9659
9573 9766
9,600 – 9530 9680 9724
9594 9637
9,400 – 9551

9,200 –

9,000 – | | | | | | | | | | | |
Jan Feb Mar Apr May June July Aug Sept Oct Nov Dec
67 68 69 70 71 72 73 74 75 76 77 78
Month Source: Textbook of this course
San Diego Hospital

Seasonality Indices for Adult Inpatient Days at San Diego Hospital

MONTH SEASONALITY INDEX MONTH SEASONALITY INDEX

January 1.04 July 1.03

February 0.97 August 1.04

March 1.02 September 0.97

April 1.01 October 1.00

May 0.99 November 0.96

June 0.99 December 0.98


San Diego Hospital

Seasonal Indices

1.06 –
1.04 1.04
Index for Inpatient Days

1.04 – 1.03
1.02
1.02 – 1.01
1.00
1.00 – 0.99
0.98
0.98 – 0.99
0.96 – 0.97 0.97
0.96
0.94 –
0.92 – | | | | | | | | | | | |
Jan Feb Mar Apr May June July Aug Sept Oct Nov Dec
67 68 69 70 71 72 73 74 75 76 77 78
Month
San Diego Hospital
• Patient days = (Trend - adjusted forecast)(Monthly seasonal index) = (9,530)(1.04) = 9,911
and so:

Period 67 68 69 70 71 72
Month Jan Feb Mar Apr May June
Forecast 9,911 9,265 9,164 9,691 9,520 9,542
with Trend &
Seasonality
Period 73 74 75 76 77 78
Month July Aug Sept Oct Nov Dec
Forecast 9,949 10,068 9,411 9,724 9,355 9,572
with Trend &
Seasonality
San Diego Hospital

Combined Trend and Seasonal Forecast

10,200 –
10068
10,000 – 9911 9949
Inpatient Days

9,800 – 9764 9724


9691
9,600 – 9572

9,400 – 9520 9542


9411
9265 9355
9,200 –

9,000 – | | | | | | | | | | | |
Jan Feb Mar Apr May June July Aug Sept Oct Nov Dec
67 68 69 70 71 72 73 74 75 76 77 78
Month
Adjusting Trend Data
• Management at Jagoda Wholesalers, in Calgary, Canada, has used time-series regression
based on point of-sale data to forecast sales for the next 4 quarters. Sales estimates are
$100,000, $120,000, $140,000, and $160,000 for the respective quarters. Seasonal indices
for the four quarters have been found to be 1.30, .90, .70, and 1.10, respectively.

ŷseasonal = Index ´ ŷtrend forecast


Quarter I: ŷI = (1.30)($100,000) = $130,000
Quarter II: ŷII = (.90)($120,000) = $108,000
Quarter III: ŷIII = (.70)($140,000) = $98,000
Quarter IV: ŷIV = (1.10)($160,000) = $176,000
Associative Forecasting

Used when changes in one or more independent


variables can be used to predict the changes in
the dependent variable

Most common technique is linear


regression analysis. Some other
include multiple regression and
logistic regression etc.

We apply this technique just as we did


in the time-series example
Associative Forecasting

Forecasting an outcome based on predictor


variables using the least squares technique

y^ = a + bx

where y^ = value of the dependent variable (in our example,


sales)
a = y-axis intercept
b = slope of the regression line
x = the independent variable
Associative Forecasting Example

NODEL’S SALES AREA PAYROLL NODEL’S SALES AREA PAYROLL


(IN $ MILLIONS), y (IN $ BILLIONS), x (IN $ MILLIONS), y (IN $ BILLIONS), x
2.0 1 2.0 2
3.0 3 2.0 1
2.5 4 3.5 7

4.0 –

Nodel’s sales
(in$ millions)
3.0 –

2.0 –

1.0 –

| | | | | | |

0 1 2 3 4 5 6 7
Area payroll (in $ billions)
Associative Forecasting Example

SALES, y PAYROLL, x x2 xy
2.0 1 1 2.0
3.0 3 9 9.0
2.5 4 16 10.0
2.0 2 4 4.0
2.0 1 1 2.0
3.5 7 49 24.5
Σy = 15.0 Σx = 18 Σx2 = 80 Σxy = 51.5

x=
å x 18
= =3 y=
å y 15
= = 2.5
6 6 6 6

b=
å xy - nxy 51.5 - (6)(3)(2.5)
= = .25 a = y - bx = 2.5 - (.25)(3) = 1.75
å x - nx
2 2
80 - (6)(3 ) 2
Associative Forecasting Example

SALES, y PAYROLL, x x2 xy
2.0 1 1 2.0
3.0 3
ŷ = 1.75
9
+ .25x 9.0
2.5 4 16 10.0
2.0 2 Sales = 1.75
4 + .25(payroll)
4.0
2.0 1 1 2.0
3.5 7 49 24.5
Σy = 15.0 Σx = 18 Σx2 = 80 Σxy = 51.5

x=
å x 18
= =3 y=
å y 15
= = 2.5
6 6 6 6

b=
å xy - nxy 51.5 - (6)(3)(2.5)
= = .25 a = y - bx = 2.5 - (.25)(3) = 1.75
å x - nx
2 2
80 - (6)(3 ) 2
Associative Forecasting Example

SALES, y PAYROLL, x x2 xy
2.0 1 1 2.0
4.0 –
3.0 3
ŷ = 1.75
9
+ .25x 9.0

Nodel’s sales
(in$ millions)
2.5 3.0 – 4 16 10.0
2.0 2 Sales = 1.75
4 + .25(payroll)
4.0
2.0 2.0 – 1 1 2.0
3.5 7 49 24.5
1.0 –
Σy = 15.0 Σx = 18 Σx2 = 80 Σxy = 51.5
| | | | | | |

x=
0å x 1 18 2
= =3
3 å
4 y 5 15 6
y =(in $ billions)
= = 2.5
7
Area payroll
6 6 6 6

b=
å xy - nxy 51.5 - (6)(3)(2.5)
= = .25 a = y - bx = 2.5 - (.25)(3) = 1.75
å x - nx
2
80 - (6)(3 )
2 2
Associative Forecasting Example

If payroll next year is estimated to be $6 billion,


then:

Sales (in $ millions) = 1.75 + .25(6)


= 1.75 + 1.5 = 3.25

Sales = $3,250,000
Associative Forecasting Example

If payroll4.0
next
– year is estimated to be $6 billion,
then: 3.25
Nodel’s sales
(in$ millions)
3.0 –

2.0 –
Sales (in$ millions) = 1.75 + .25(6)
1.0 –
= 1.75 + 1.5 = 3.25
| | | | | | |
0 1 2 3 4 5 6 7
Sales = $3,250,000
Area payroll (in $ billions)
Standard Error of the Estimate

► A forecast is just a point estimate of a


future value
► This point is
actually the
4.0 –
mean of a 3.25

Nodel’s sales
3.0 –
probability

(in$ millions)
Regression line,
distribution 2.0 – ŷ =1.75+.25x

1.0 –

| | | | | | |
0 1 2 3 4 5 6 7
Area payroll (in $ billions)
Standard Error of the Estimate

S y,x =
å ( y - y c
) 2

n-2

where y = y-value of each data point


yc = computed value of the dependent variable,
from the regression equation
n = number of data points
Standard Error of the Estimate

Computationally, this equation is


considerably easier to use

S y,x =
å - aå y - bå xy
y 2

n-2

We use the standard error to set up


prediction intervals around the point
estimate
Standard Error of the Estimate

S y,x =
å - aå y - bå xy
y 2

=
39.5 -1.75(15.0) - .25(51.5)
n-2 6-2
= .09375
= .306 (in $ millions)
4.0 –
3.25

Nodel’s sales
3.0 –

(in$ millions)
The standard error 2.0 –
of the estimate is
1.0 –
$306,000 in sales
| | | | | | |
0 1 2 3 4 5 6 7
Area payroll (in $ billions)
Correlation
❖ How strong is the linear relationship between the variables?

❖ Correlation does not necessarily imply causality!

❖ Coefficient of correlation, r, measures degree of association


➢ Values range from -1 to +1
Correlation Coefficient

nå xy - å xå y
r=
é ùé ù
êënå x - ( )
å x úûêënå y - ( )
å y úû
2 2
2 2
Correlation Coefficient

y y

x x
(a) Perfect negative (e) Perfect positive
correlation y y correlation

y
x x
(b) Negative correlation (d) Positive correlation

x
(c) No correlation

High Moderate Low Low Moderate High


| | | | | | | | |

–1.0 –0.8 –0.6 –0.4 –0.2 0 0.2 0.4 0.6 0.8 1.0
Correlation coefficient values
Correlation Coefficient

y x x2 xy y2
2.0 1 1 2.0 4.0
3.0 3 9 9.0 9.0
2.5 4 16 10.0 6.25
2.0 2 4 4.0 4.0
2.0 1 1 2.0 4.0
3.5 7 49 24.5 12.25
Σy = 15.0 Σx = 18 Σx2 = 80 Σxy = 51.5 Σy2 = 39.5

(6)(51.5) – (18)(15.0)
r=
é(6)(80) – (18)2 ùé(16)(39.5) – (15.0)2 ù
ë ûë û

309 - 270 39 39
= = = = .901
(156)(12) 1,872 43.3
Correlation
► Coefficient of Determination, r2, measures the percent of change in y
predicted by the change in x

► Values range from 0 to 1

► Easy to interpret

For the Nodel Construction example:


r = .901
r2 = .81
Multiple-Regression Analysis

If more than one independent variable is to be


used in the model, linear regression can be
extended to multiple regression to accommodate
several independent variables

ŷ = a + b1x1 + b2 x2

Computationally, this is quite complex and


generally done on the computer
Multiple-Regression Analysis

In the Nodel example, including interest rates in the


model gives the new equation:

ŷ = 1.80 +.30x1 - 5.0x2

An improved correlation coefficient of r = .96 suggests


this model does a better job of predicting the change
in construction sales

Sales = 1.80 + .30(6) - 5.0(.12) = 3.00


Sales = $3,000,000
Monitoring and Controlling Forecasts
Tracking Signal

► Measures how well the forecast is predicting actual values

► Ratio of cumulative forecast errors to mean absolute deviation (MAD)


► Good tracking signal has low values
► If forecasts are continually high or low, the forecast has a bias error
Monitoring and Controlling Forecasts

Tracking Cumulative error


signal =
MAD

=
å (Actual demand in period i -Forecast demand in period i)
å Actual -Forecast
n
Tracking Signal

Signal exceeding limit


Tracking signal
Upper control limit
+

0 MADs Acceptable
range


Lower control limit

Time
Tracking Signal Example

ABSOLUTE CUM ABS TRACKING


ACTUAL FORECAST CUM FORECAST FORECAST SIGNAL (CUM
QTR DEMAND DEMAND ERROR ERROR ERROR ERROR MAD ERROR/MAD)
1 90 100 –10 –10 10 10 10.0 –10/10 = –1

2 95 100 –5 –15 5 15 7.5 –15/7.5 = –2

3 115 100 +15 0 15 30 10. 0/10 = 0

4 100 110 –10 –10 10 40 10. 10/10 = –1

5 125 110 +15 +5 15 55 11.0 +5/11 = +0.5

6 140 110 +30 +35 30 85 14.2 +35/14.2 = +2.5

At the end of quarter 6, MAD =


å Forecast errors 85
= = 14.2
n 6
Cumulative error 35
Tracking signal = = = 2.5 MADs
MAD 14.2
Adaptive Smoothing

❑ It’s possible to use the computer to


continually monitor forecast error and
adjust the values of the  and 
coefficients used in exponential
smoothing to continually minimize
forecast error

❑ This technique is called adaptive


smoothing
Focus Forecasting

❑ Developed at American Hardware Supply,


based on two principles:
1. Sophisticated forecasting models are not
always better than simple ones
2. There is no single technique that should be
used for all products or services

❑ Uses historical data to test multiple


forecasting models for individual items

❑ Forecasting model with the lowest error used


to forecast the next demand
Forecasting in the Service Sector
❖ Presents unusual challenges

➢ Special need for short term records

➢ Needs differ greatly as function of industry and product

➢ Holidays and other calendar events

➢ Unusual events
Fast Food Restaurant Forecast

20% –
Percentage of sales by hour of day

15% –

10% –

5% –

11-12 1-2 3-4 5-6 7-8 9-10


12-1 2-3 4-5 6-7 8-9 10-11
(Lunchtime) (Dinnertime)
Hour of day
FedEx Call Center Forecast

12% –

10% –

8% –

6% –

4% –

2% –

0% –
2 4 6 8 10 12 2 4 6 8 10 12
A.M. P.M.
Hour of day
OLS Regression in Spreadsheet
Regression – Using LINEST function

Original data (y in column A, x in column B)

=LINEST(A2:A21,B2:B21,1,1)
LINEST(known_y's, known_x's, constant, statistics)

• The LINEST is an array function


◼ Receives and returns data to multiple cells
◼ The equation will be bookended by {} brackets when active
◼ While the function is the same in both LibreOffice and Excel,
b1 b0 activating it differs slightly.
• LibreOffice
sb1 sb0 ◼ Type the formula into cell D2 and press the keyboard
R2 se combination Ctrl+Shift+Enter (for Windows & Linux) or
command+shift+return (for Mac OS X).
F df • Excel
SSR SSE ◼ Select a range of 2 columns by 5 rows, in this case (D2:E6).
◼ Then, in the 'Insert Function' area, type the formula and press
the keyboard combination Ctrl+Shift+Enter (for Windows &
Linux) or command+shift+return (for Mac OS X).
Regression – Using LINEST b1 b0
sb1 sb0
R2 se
Original data (y in column A, x in column B) F df
SSR SSE

=LINEST(A2:A21,B2:B21,1,1)
LINEST(known_y's, known_x's, constant, statistics)

=D2/D3

=TDIST(D9,$E$5,2)

1. How is the overall fit of the model?


◼ Look at Coefficient of Determination R2
◼ No hard rules, but ≥0.70 is preferred

2. Are the individual variables statistically significant?


◼ Use t-test for each explanatory variable
◼ Lower p-value is better
◼ Generally used threshold values include 0.10, 0.05, 0.01
A guide to selecting an appropriate forecasting method
Forecasting Method
A Guide for Smoothing Factor

• Picking appropriate smoothing factors


◼ Level (α)
 Stationary: ranges from 0.01 to 0.30 (0.1 reasonable)
 Trend/Season: ranges from 0.02 to 0.51 (0.19 reasonable)

◼ Trend (β)
 Ranges from 0.005 to 0.176 (0.053 reasonable)

◼ Seasonality (γ)
 Ranges from 0.05 to 0.50 (0.10 reasonable)

Source: MIT - CTL.SC1x - Supply Chain and Logistics Fundamentals


Useful link for forecasting through excel

https://www.youtube.com/watch?v=j22tLUQQDh4&t=39s

https://www.youtube.com/watch?v=QB4_pBlpPwM&t=116s

Some other interesting models include ARIMA, ARMAX and


GAARCH. We have many dedicated software for forecasting.
SPSS and MATLAB could also be used for forecasting models.

Reference for this presentation:


MIT - CTL.SC1x - Supply Chain and Logistics Fundamentals
Text book of this course by Haizer et al. [12th edition]
Reference book: Stevenson [13th edition]

You might also like