You are on page 1of 134

LOGI3477

DEMAND AND INVENTORY MANAGEMENT

FORECASTING DEMAND
WEEK 2&3
Sources:

PowerPoint presentation to accompany

Heizer and Render

Operations Management, Global Edition, Eleventh Edition

Principles of Operations Management, Global Edition, Ninth Edition

PowerPoint slides by Jeff Heyl

MIT OpenCourseWarehttp://ocw.mit.edu15.772J / EC.733J D-Lab: Supply ChainsFall 2014

Introduction to Management Science cahpter 15


What is Forecasting?

► Process of predicting a future event


► Educated Guessing
► Underlying basis
of all business decisions
► Production
► Inventory
► Personnel
► Facilities
Forecasting Exercise
• Predict the next number in the pattern:

a) 3.7, 3.7, 3.7, 3.7, 3.7, ?

b) 2.5, 4.5, 6.5, 8.5, 10.5, ?

c) 5.0, 7.5, 6.0, 4.5, 7.0, 9.5, 8.0, 6.5, ?


Examples: who uses forecasting in
their jobs?
• forecast demand for products and services
• forecast availability of manpower
• forecast inventory and materiel needs daily
Importance of Forecasting in Operations
Management

▪ Departments throughout the organization depend on forecasts


to formulate and execute their plans.

▪ Finance needs forecasts to project cash flows and capital


requirements.

▪ Human resources need forecasts to anticipate hiring needs.

▪ Production needs forecasts to plan production levels, workforce,


material requirements, inventories, etc.
Importance of Forecasting in Operations
Management

• Demand is not the only variable of interest to forecasters.

• Manufacturers also forecast worker absenteeism,


machine availability, material costs, transportation and
production lead times, etc.

• Besides demand, service providers are also interested in


forecasts of population, of other demographic variables, of
weather, etc.
Characteristics of Forecasts
• They are usually wrong!
• A good forecast is more than a single number
• mean and standard deviation
• range (high and low)

• Aggregate forecasts are usually more accurate


• Accuracy decreases as we go further into the future.
• Forecasts should not be used to the exclusion of known
information
What Makes a Good Forecast

▪ It should be timely
▪ It should be as accurate as possible
▪ It should be reliable
▪ It should be in meaningful units
▪ It should be presented in writing
▪ The method should be easy to use and
understand in most cases.
▪ Ease of updating as new data becomes available.
Types of Forecasts by Time
Horizon
Quantitative
• Short-range forecast methods

• Usually < 3 months


Detailed
• Job scheduling, worker assignments use of
system
• Medium-range forecast
• 3 months to 2 years
• Sales/production planning

• Long-range forecast
Design
• > 2 years of system
• New product planning
Qualitative
Methods
Distinguishing Differences

1. Medium/long range forecasts deal with more comprehensive issues


and support management decisions regarding planning and
products, plants and processes
2. Short-term forecasting usually employs different methodologies than
longer-term forecasting
3. Short-term forecasts tend to be more accurate than longer-term
forecasts
Forecasting During the Life
Cycle
Introduction Growth Maturity Decline

Qualitative models Quantitative models


- Executive judgment
- Time series analysis
- Market research
- Regression analysis
-Survey of sales force
-Delphi method
Sales

Time
Influence of Product Life Cycle

Introduction – Growth – Maturity – Decline

► Introduction and growth require longer forecasts than maturity


and decline
► As product passes through life cycle, forecasts are useful in
projecting
► Staffing levels
► Inventory levels
► Factory capacity
Based on product type
Types of Forecasts
1. Economic forecasts
► Address business cycle – inflation rate, money supply,
housing starts, etc.
2. Technological forecasts
► Predict rate of technological progress
► Impacts development of new products
3. Demand forecasts
► Predict sales of existing products and services
Strategic Importance of Forecasting

► Supply-Chain Management – Good supplier


relations, advantages in product innovation, cost
and speed to market
► Human Resources – Hiring, training, laying off
workers
► Capacity – Capacity shortages can result in
undependable delivery, loss of customers, loss of
market share
Seven Steps in Forecasting
1. Determine the use of the forecast
2. Select the items to be forecasted
3. Determine the time horizon of the forecast
4. Select the forecasting model(s)
5. Gather the data needed to make the forecast
6. Make the forecast
7. Validate and implement results
Forecasting Methods
1. Times Series - Statistical techniques that use historical data
to predict future behavior.
2. Regression Methods - Regression (or causal) methods that
attempt to develop a mathematical relationship between
the item being forecast and factors that cause it to behave
the way it does.
3. Qualitative Methods - Methods using judgment, expertise
and opinion to make forecasts.
Forecasting Approaches
Qualitative Methods
► Used when situation is vague and little data
exist
► New products
► New technology
► Involves intuition, experience
► e.g., forecasting sales on Internet
Forecasting Approaches
Quantitative Methods
► Used when situation is ‘stable’ and historical data
exist
► Existing products
► Current technology
► Involves mathematical techniques
► e.g., forecasting sales of color televisions
Qualitative Methods
• “Jury of executive opinion,” a qualitative technique, is the most
common type of forecast for long-term strategic planning.
– Performed by individuals or groups within an organization,
sometimes assisted by consultants and other experts, whose
judgments and opinions are considered valid for the
forecasting issue.
– Usually includes specialty functions such as marketing,
engineering, purchasing, etc., in which individuals have
experience and knowledge of the forecasted item.
• Supporting techniques include the Delphi Method, market
research, surveys, and technological forecasting.
Jury of Executive Opinion

► Involves small group of high-level experts and managers


► Group estimates demand by working together
► Combines managerial experience with statistical models
► Relatively quick
► ‘Group-think’
disadvantage
Delphi Method

Iterative group process,



continues until consensus is
reached
► 3 types of participants
► Decision makers
► Staff
► Respondents
Sales Force Composite

► Each salesperson projects his or her sales


► Combined at district and national levels
► Sales reps know customers’ wants
► May be overly optimistic
Market Survey

► Ask customers about purchasing plans


► Useful for demand and product design and planning
► What consumers say, and what they actually do
may be different
► May be overly optimistic
Learning Objective 15.2
• Time Series Methods
Overview 1
• Statistical techniques that make use of historical data
collected over a long period of time.
• Methods assume that what has occurred in the past will
continue to occur in the future.
• Forecasts based on only one factor - time.
Forecasting Components (1 of 2)
• A variety of forecasting methods are available for use
depending on the time frame of the forecast and the
existence of patterns.
• Time Frames:
– Short-range (one to two months)
– Medium-range (two months to one or two years)
– Long-range (more than one or two years)
Time-Series Forecasting
Set of evenly spaced numerical data

► Obtained by observing response variable at regular time
periods
Forecast based only on past values, no other variables

important
► Assumes that factors influencing past and present will
continue influence in future
Time-Series Components

Trend Cyclical

Seasonal Random
Patterns (1 of 2)
• Trend - A long-term movement of the item being forecast.
• Random variations - movements that are not predictable and
follow no pattern.
• Cycle - A movement, up or down, that repeats itself over a
lengthy time span.
• Seasonal pattern - Oscillating movement in demand that
occurs periodically in the short run.
Components of Demand
Trend
component
Demand for product or service

Seasonal peaks

Actual demand
line

Average demand
over 4 years

Random variation
| | | |
1 2 3 4
Time (years)
Figure 4.1
Trend Component
► Persistent, overall upward or downward pattern
► Changes due to population, technology, age, culture, etc.
► Typically several years duration
Seasonal Component
► Regular pattern of up and down fluctuations
► Due to weather, customs, etc.
► Occurs within a single year

PERIOD LENGTH “SEASON” LENGTH NUMBER OF “SEASONS” IN


PATTERN
Week Day 7
Month Week 4 – 4.5
Month Day 28 – 31
Year Quarter 4
Year Month 12
Year Week 52
Cyclical Component
► Repeating up and down movements
► Affected by business cycle, political, and economic
factors
► Multiple years duration
► Often causal or
associative
relationships

0 5 10 15 20
Random Component

► Erratic, unsystematic, ‘residual’ fluctuations


► Due to random variation or unforeseen events
► Short duration
and nonrepeating

M T W T
F
Time Series
▪ A time series is a stream of data (e.g., demand).

▪ Data are recorded at different time periods –


monthly, weekly, daily, etc.

▪ Forecasters predict the value(s) at a future time.

▪ The pattern of the series is considered to be time-


dependent. External causes are not brought into
the picture.

39
Time Series and Extrapolation continued

The data in time series may consist of several different kinds of


variations.

Important among them are:

o random variations
o increasing or decreasing trend
o seasonal variations

40
Time Series (Random Variations)

o There are no specific assignable causes for random variations.


o Values are a result of the economic environment and the market
place.

41
Time Series (Random Variations and
Increasing Trend)

There is a constant rate of change (increasing values) as time


goes by.

42
Time Series (Random Variations and
Decreasing Trend)
There is a constant rate of change (decreasing values) as time
goes by.

43
Time Series (Random Variations and
Seasonal Variations)
o Seasonal (cyclical) variations may also be present.
o Examples: demand for resort hotels & home heating oil.

44
Time Series (Random Variations, Seasonal Variations and
Increasing Trend)
All three components – random variations, an increasing (or
decreasing) trend, and seasonal variations (cycles) may be
present simultaneously in a time series.

45
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
Summary of Moving Averages
• Advantages of Moving Average Method
• Easily understood
• Easily computed
• Provides stable forecasts

• Disadvantages of Moving Average Method


• Requires saving all past N data points
• Lags behind a trend
• Ignores complex relationships in data
Moving Average (1 of 6)
• Moving average uses values from the recent past to develop
forecasts.
• Useful for forecasting relatively stable items that do not

n
 Di
MAn = i =1
n
where:
n = number of periods in the moving average
D = data in period i
i
Moving Average (2 of 6)
Example: Instant Paper Clip Supply Company wants to forecast orders for the month
of November. Develop three-month and five-month moving averages using the data.

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

Table 15.1 Orders for 10-month period


Moving Average (3 of 6)
Example: Instant Paper Clip Supply Company wants to forecast
orders for the month of November.
• Three-month moving average:

3
 Di
MA3 = i =1 = 90 +110 +130 =110 orders
3 3
• Five-month moving average:

5
 Di
MA5 = i =1 = 90 +110 +130 + 75 + 50 = 91 orders
5 5
Moving Average (4 of 6)
Table 15.2 Three- and five-month moving averages
Month Orders per Month 3-Month Moving Average 5-Month Moving Average
January 120 — —
February 90 — —
March 100 — —
April 75 103.3 —
May 110 88.3 —
June 50 95.0 99.0
July 75 78.3 85.0
August 130 78.3 82.0
September 110 85.0 88.0
October 90 105.0 95.0
November — 110.0 91.0
Moving Average (5 of 6)
Figure 15.2 Three- and five-month moving averages
Moving Average (6 of 6)
• Longer-period moving averages react more slowly to
changes in demand than do shorter-period moving averages.
• The appropriate number of periods to use often requires trial-
and-error experimentation.
• A moving average does not react well to changes (trends,
seasonal effects, etc.) but is easy to use and inexpensive.
• Good for short-term forecasting.
Weighted Moving Average
► Used when some trend might be present
► Older data usually less important
► Weights based on experience and intuition Simple moving
average models
weight all previous
periods equally

(( )( ))
Weighted å Weight for period n Demand in period n
moving =
average å Weights
Weighted Moving Average
• In a weighted moving average, weights are assigned to the most recent
data.

n
WMA =  W D
n i =1 i i
where Wi = the weight for period i, between 0% and 100%

Wi = 1.00
Example: Paper clip company weight 50% for October, 33% for
September, 17% for August:
3
WMA =  W D = (.50)(90) + (.33)(110) + (.17)(130) = 103.4 orders
3 i =1 i i
• Determining precise weights and the number of periods requires trial-
and-error experimentation.
Exponential 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 weights recent past data more strongly


than more distant data.
• Two forms: simple exponential smoothing and adjusted
exponential smoothing.
Exponential Smoothing
New forecast = Last period’s forecast
+ a (Last period’s actual demand
– Last period’s forecast)

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

OR
Ft = a(At - 1) + (1 - a)(Ft – 1)

where Ft = new forecast


Ft – 1 = previous period’s forecast
a = smoothing (or weighting) constant (0 ≤ a ≤ 1)
At – 1 = previous period’s actual demand
Exponential Smoothing (2 of 14)
• The most commonly used values of a are between
0.10 and 0.50.

• Determination of a is usually judgmental and subjective


Exponential Smoothing
Example
Predicted demand = 142 Ford Mustangs
Actual demand = 153
Smoothing constant a = .20

© 2014 Pearson Education 4 - 59


Exponential Smoothing
Example
Predicted demand = 142 Ford Mustangs
Actual demand = 153
Smoothing constant a = .20

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

© 2014 Pearson Education 4 - 60


Exponential Smoothing
Example
Predicted demand = 142 Ford Mustangs
Actual demand = 153
Smoothing constant a = .20

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


= 142 + 2.2
= 144.2 ≈ 144 cars

© 2014 Pearson Education 4 - 61


Exponential Smoothing (3 of 14)
Table 15.3 Demand for personal computers
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
Exponential Smoothing (4 of 14)
Example: PM Computer Services
• Exponential smoothing forecasts using smoothing constant of
.30.
• Forecast for period 2 (February):
F2 = a D1 + (1 − a )F1 = (.30 )(.37 ) + (1 − .30 )(.37 ) = 37 units
• Forecast for period 3 (March):

F3 = a D2 + (1 − a )F2 = (.30 )(.40 ) + (1 − .30 )( 37 ) = 37.9 units


Exponential Smoothing (5 of 14)
Table 15.4 Exponential smoothing forecasts, a = .30 and a = .50

Period Month Demand Forecast, F Forecast, F

Ft +1 a = .30 Ft +1 a = .50
sub start expression t + 1 end sub start expression t + 1 end
expression alpha = 0.30. expression alpha = 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
Exponential Smoothing (6 of 14)

Period Month Demand Forecast, F Forecast, F

Ft +1 a = .30 Ft +1 a = .50
sub start expression t + 1 end sub start expression t + 1 end
expression alpha = 0.30. expression alpha = 0.50.

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
Exponential Smoothing (7 of 14)
• The forecast that uses the higher smoothing constant (.50)
reacts more strongly to changes in demand than does the
forecast with the lower constant (.30).
• Both forecasts lag behind actual demand.
• Both forecasts tend to be consistently lower than actual
demand.
• Low smoothing constants are appropriate for stable data
without trend; higher constants appropriate for data with
trends.
Exponential Smoothing (8 of 14)
Figure 15.3 Exponential smoothing forecasts
Q1
3-quarter Weighted
Moving 5-quarter 3-quarter
Average Moving Moving
Quarter Demand Forecast Error Average Error Error Error

1 105.00 — — — — — —
2 150.00 — — — — — —
3 93.00 — — — — — —
4 121.00 116.00 5.00 — — 113.85 7.15
5 140.00 121.33 18.67 — — 116.69 23.31
6 170.00 118.00 52.00 121.80 48.20 125.74 44.26
7 105.00 143.67 −38.67 134.80 −29.80 151.77 −46.77
8 150.00 138.33 11.67 125.80 24.20 132.40 17.60
9 150.00 141.67 8.33 137.20 12.80 138.55 11.45
10 170.00 135.00 35.00 143.00 27.00 142.35 27.65
11 110.00 156.67 −46.67 149.00 −39.00 160.00 −50.00
12 130.00 143.33 −13.33 137.00 −7.00 136.69 −6.60
13 — 136.67 — 142.00 — 130.20 —

There appears to be a slight upward


trend in the demand data, and a
pronounced seasonal pattern with a
peak increase during the second quarter
each year, followed by a substantial
decrease in the third quarter.
PROBLEM SOLVING
Q1

The data below consist of the closing price of the common stock of the American Telephone and
Telegraph Corporation on 10 recent trading days.
Time(t) Price Time(t) Price
1 $24.10 6 $22.73
2 23.80 7 22.60
3 23.39 8 21.76
4 22.90 9 22.14
5 22.10 10 21.69
a. Using a five-period moving average, forecast the price of the stock for period 10.
b. What is the error of the forecast in #1-a?
c. Using a five-period moving average, forecast the price of the stock for period 11.
A forecast for t = 10 will require the previous five prices.
MA5 = (22.10 + 22.73 + 22.60 + 21.76 + 22.14)/5 = $22.27
b. Error = Actual - Forecast = 21.69 – 22.27 = -$0.58
c. MA5 = (22.73 + 22.60 + 21.76 + 22.14 + 21.69)/5 = $22.18
Q2

Exponential smoothing with alpha 0.5


Exponentially
Smoothed Forecast
Quarter Sales (a = .50)

1 350 350.00
2 510 350.00
3 750 430.00
4 420 590.00
5 370 505.00
6 480 437.50
7 860 458.75
8 500 659.37
9 450 579.69
10 550 514.84
11 820 532.42
12 570 676.21

13 — 623.105
Exponential Smoothing with Trend
Adjustment

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 + a(A1 – F1) = 100 + .4(100 – 100) = 100

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

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

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


Exponential Smoothing with
Trend Adjustment

Forecast Exponentially Exponentially


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

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

Step 1: Compute Ft
Step 2: Compute Tt
Step 3: Calculate the forecast FITt = Ft + Tt
Example Question
Trend adjusted exponential smoothing: a = 0.1, b = 0.2
Unadjusted Adjusted
Month Income Forecast Trend Forecast |Error| Error 2
February 70.0 65.0 0.0 65 5.0 25.0
March 68.5 65.5 0.1 65.6 2.9 8.4
April 64.8 65.9 0.16 66.05 1.2 1.6
May 71.7 65.92 0.13 66.06 5.6 31.9
June 71.3 66.62 0.25 66.87 4.4 19.7
July 72.8 67.31 0.33 67.64 5.2 26.6
August 68.16 68.60 24.3 113.2

MAD = 24.3/6 = 4.05, MSE = 113.2/6 = 18.87. Note that all numbers are rounded.
Seasonal Adjustments (1 of 5)

• A seasonal pattern is a repetitive up-and-down movement in


demand.
• Seasonal patterns can occur on a quarterly, monthly, weekly, or
daily basis.
• A seasonally adjusted forecast can be developed by multiplying
the normal forecast by a seasonal factor.
• Seasonal factors lie between zero and one and represent the
portion of total annual demand assigned to each season.
• Seasonal factors are multiplied by annual demand to provide
adjusted forecasts for each period.
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
Average 1,128
monthly = = 94
demand 12 months

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 Average monthly demand for past 3 years


=
index Average monthly demand
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,12
8
Seasonal Index Example
Seasonal forecast for Year 4 (*demand forecasted for year 4 as 1200)

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
Example (your turn)
Overview 3
• Time series techniques relate a single variable being forecast
to time.
• Regression is a forecasting technique that measures the
relationship of one variable to one or more other variables.
• For example, if we know that something has caused product demand to behave in a
certain way in the past, we might like to identify that relationship. If the same thing
happens again in the future, we can then predict what demand will be.

• For example, there is a well-known relationship between increased demand in new


housing and lower interest rates. Correspondingly, a numerous of building products
and services display increased demand if new housing starts increase.

• The simplest form of regression is linear regression.


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
Linear Trend Line (1 of 5)

• When demand displays an obvious trend over time, a least squares


regression line, or linear trend line, can be used to forecast.
• Formula:

b =  xy − nxy
 x2 − nx
a = y − bx
where:
n = number of periods
x = nx
y = ny
Least Squares Method
Equations to calculate the regression variables

Dependent variable ŷ = a+ bx

Slope of the regression


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

a = y - bx
X is the independent
Y-axis intercept
variable (years/months
etx)

© 2014 Pearson Education 4 - 94


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 8 ?
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
DEMAND (y)140 - ( 7) ( 4 )
å x - nx
ELECTRICAL
2 2 2
YEAR (x) 2
x 28 xy
1 74 1 74
2
3
79
()
a = y - bx = 98.86 -10.54 4 = 56.70
80
4
9
158
240
4 90 16 360
5 105 ŷ = 56.70 +10.54x 25
Thus, 525
6 142 36 852
7 122 49 854
Σx = 28 Σy = 692 Σx2 = 140 Σxy = 3,063

x=
å x = in28year
Demand
=4
8
y=
å=y56.70
=
692+ 10.54(8)
= 98.86
n 7 n= 141.02,
7 or 141 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 Figure 4.5
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
Linear Trend Line - Example
Example: use trend projection and forecast for period 13
Correlation
➢Regression lines are not “cause-and-effect” relationships.
➢They merely describe the relationships among variables.
➢The regression equation shows how one variable relates to the value and
changes in another variable.
➢Another way to evaluate the relationship between two variables is to
compute the coefficient of correlation. This measure expresses the degree
or strength of the linear relationship (but note that correlation does not
necessarily imply causality).
➢Usually identified as r, the coefficient of correlation can be any number
between +1 and -1.
Correlation (1 of 2)
• Correlation is a measure of the strength of the relationship
between independent and dependent variables.

Formula:
r= n xy −  x  y
 n x − (  x )   n y − (  y ) 
 2 2 2 2
  

• Value lies between +1 and −1.


• Value of zero indicates little or no relationship between
variables.
• Values near 1.00 and −1.00 indicate a strong linear
relationship.
Correlation (2 of 2)

Value for State University example:

r= (8)(2,167.7) −(49)(346.7) = .948


(8)(311) − (49)  (8)(15,224.7) − (346.7) 
 2  2 
  

Since the value is close to one, we have evidence of a


strong linear relationship.

r= n xy −  x  y
 n x − (  x )   n y − (  y ) 
 2 2 2 2
  
The company now wants to know the strength of the association between area payroll (x) and sales (y).
Standard Error of the Estimate
• The forecast of $3,250,000 for Nodel’s sales in previous example is called a
point estimate of y. The point estimate is really the mean, or expected value,
of a distribution of possible values of sales. Figure illustrates this concept.
Standard Error of the Estimate
• To measure the accuracy of the regression estimates, we must
compute the standard error of the estimate, Sy, x.
• This computation is called the standard deviation of the regression:
• It measures the error from the dependent variable, y, to the regression
line, rather than to the mean
Adjusting Trend Data- Example
ŷseasonal = Index ´ ŷtrend forecast

© 2014 Pearson Education 4 - 112


Example
A product is manufactured in distinct batches of various sizes. The cost accountant wished to obtain an
equation to use for estimating the cost of a batch. He obtained data on a number of batches,
consisting of the size of the batch, measured in number of pieces, and the total cost of the
batch, consisting of the setup cost and the variable costs of labor, material, etc. Costs are
stated in thousands of dollars.

Size of Cost of
Batch Batch
20 $1.4
30 3.4
40 4.1
50 3.8
70 6.7
80 6.6
100 7.8
120 10.4
150 11.7

a. Which is the dependent variable? The independent variable?


b. Draw the scatterplot of this data. Does a straight line look like a reasonable fit?
c. Obtain ∑ x 2 , ∑xy, and ∑ y 2 .
d. What is the value of the slope of the regression line that best fits this data?
e. What is the interpretation of the slope?
f. What is the value of the y intercept?
g. What is the interpretation of the y intercept?
The size of the batch will be the independent variable (X) and the cost of the batch will be the
dependent variable (Y). The cost accountant hypothesizes that the cost of the batch depends on its
size.
b.
Cost

10.5 •


7.0 •


3.5 • •

Size
25 50 75 100 125 150
Yes, this appears to be a reasonably linear fit.

c. x 2
 y = 439.11 ;  xy = 5,264
= 63,600 ; 2

n( xy ) − ( x )( y ) 9(5264) − ( 660)(55.9)


d. b= = = 0.0766
n ( x ) − ( x ) 9( 63600) − ( 660)
2 2 2

e. It is estimated that each additional piece in a batch costs 0.0766 thousands of dollars, or
0.0766*1,000 = $76.60 each.
f. a = y − bx = 6.211−.0766( 73.333) = 0.5937.
g. Technically, producing a batch of zero pieces would cost 0.5937 thousands of dollars. In
reality, this is probably the cost of setting up to produce a batch, which would be estimated at
0.5937*1,000= $593.70.
y0 = a + bx = 593.70 + 76.60(125) = $10,168.70.
n ( xy ) − ( x  y )
i. r=
n ( x 2 ) − ( x ) 2 • n ( y 2 ) − ( y ) 2
9(5264) − ( 660)(55.9)
= = 0.9854.
9 ( 63600) − ( 660) • 9( 439.11) − (55.9 )
2 2

This high value (close to the value 1.0) confirms the impression given by the scatterplot
and indicates a strong linear relationship.
Forecast Accuracy
• Forecasts will always deviate from actual values.
• Difference between forecasts and actual values are referred to
as forecast error.
• We would like forecast error to be as small as possible.
• If forecast error is large, either the technique being used is
the wrong one, or the parameters need adjusting.
MAD =
å Actual - Forecast
n
Mean Absolute Deviation 1 (1 of 8)
• MAD is the average absolute difference between the forecast and actual
demand.
• The most popular and simplest-to-use measures of forecast error.
• Formula:

 Dt −Ft
MAD = n
Where
t = the period number
Dt = demand in period t
Ft = the forecast for period t
n = the total number of periods
Determining the MAD
ACTUAL
TONNAGE FORECAST WITH
QUARTER UNLOADED FORECAST WITH a = .10 a = .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
Determining the MAD
ACTUAL FORECAST ABSOLUTE FORECAST ABSOLUTE
TONNAGE WITH DEVIATION WITH DEVIATION
QUARTER UNLOADED a = .10 FOR a = .10 a = .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
Mean Absolute Deviation 1 (3 of 8)
Table 15.8 Computational values for MAD and error

vertical bar, D sub t minus

Period Demand, Forecast, F sub Error left parenthesis, D


F sub t, vertical bar.

Dt
t, comma, left parenthesis, alpha =

Ft , (α = .30)
0.30 right parenthesis.
sub t minus F sub t right parenthesis.

(Dt − Ft ) Dt − Ft

1 37 37.00 — —
2 40 37.00 3.00 3.00
3 41 37.90 3.10 3.10
4 37 38.83 −1.83 1.83
5 45 38.28 6.72 6.72
6 50 40.29 9.71 9.71
7 43 43.20 −0.20 0.20
Mean Absolute Deviation 1 (4 of 8)
vertical bar, D sub t minus F sub t,

Period Demand, Forecast, F sub Error left parenthesis, D


vertical bar.

Ft , (α = .30)
t, comma, left parenthesis, alpha =
(Dt − Ft )
sub t minus F sub t right parenthesis.
Dt − Ft
Dt 0.30 right parenthesis.

8 47 43.14 3.86 3.86


9 56 44.30 11.70 11.70
10 52 47.81 4.19 4.19
11 55 49.06 5.94 5.94
12 54 50.84 3.16 3.16
Blank 520* Blank 49.31 53.41
Mean Absolute Deviation 1 (5 of 8)
• The lower the value of MAD relative to the magnitude of the
data, the more accurate the forecast.
• When viewed alone, MAD is difficult to assess.
• MAD must be considered in light of magnitude of the data.
Mean Absolute Deviation 1 (6 of 8)
• Can be used to compare the accuracy of different
forecasting techniques working on the same set of
demand data (PM Computer Services):
Exponential smoothing (a = .50): MAD = 4.04
Adjusted exponential smoothing (a = .50, b = .30): MAD
= 3.81
Linear trend line: MAD = 2.29
• The linear trend line has the lowest MAD; increasing a
from .30 to .50 improved the smoothed forecast.
Common Measures of Error

Mean Squared Error (MSE)

å( )
2
Forecast errors
MSE =
n
Determining the MSE
ACTUAL TONNAGE FORECAST FOR a =
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

å( )
2
Forecast errors
MSE = = 1,526.52 / 8 = 190.8
n
Common Measures of Error
Mean Absolute Percent Error (MAPE)

A variation on MAD is the mean absolute percent deviation (MAPD).


Measures the absolute error as a percentage of demand rather than
per period.
Eliminates the problem of interpreting the measure of accuracy relative
to the magnitude of the demand and forecast values.

å100 Actual -Forecast


i i
/ Actuali
MAPE = i=1
n
Determining the MAPE
ACTUAL TONNAGE FORECAST FOR a = 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
Cumulative Error (1 of 2)
• Cumulative error is the sum of the forecast errors (E =  et ).
• A relatively large positive value indicates the forecast is biased
low, a large negative value indicates the forecast is biased high.
• If the preponderance of errors are positive, the forecast is
consistently low; and vice versa.
• The cumulative error for a trend line is always almost zero, and is
therefore not a good measure for this method.


Comparison of Forecast Error
Rounded Absolute Rounded Absolute
Actual Forecast Deviation Forecast Deviation
Tonnage with for with for
Quarter Unloaded a = .10 a = .10 a = .50 a = .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 a = .50 a = .50
1 For a 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 a 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
Roundederrors) 2
Absolute Rounded Absolute
MSE =Tonnage
Actual Forecast Deviation Forecast Deviation
n
with for with for
Quarter Unloaded a = .10 a = .10 a = .50 a = .50
1 For a 180
= .10 175 5.00 175 5.00
2 168 175.5 7.50 177.50 9.50
3 =
159 1,526.54/8
174.75 = 190.82
15.75 172.75 13.75
4 175 173.18 1.82 165.88 9.12
5 For a 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|/actualiRounded
Absolute Absolute
=Actual
MAPE Tonnage
i=1 Forecast
with
Deviation
for
Forecast
with
Deviation
for
Quarter Unloaded a = .10 n a = .10 a = .50 a = .50
1 For a
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 = 5.59%
15.75 172.75 13.75
4 175 173.18 1.82 165.88 9.12
5 For a
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 a = .10 a = .10 a = .50 a = .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%
Example

You might also like