Foreign Trade University
Learning Objectives
Defining and understanding different types of
forecasting
Clarifying features common of forecasting
Understanding and able to apply quantitative and
qualitative approaches for demand forecasting
Analyzing forecast accuracy
“GIANT” WAL-MART
WAL-MART’S DATA WAREHOUSE
500 terabytes: One of the world’s largest data
warehouses
The systems track:
- Point-of-sale data at each store,
- Inventory levels by store,
- Products in transit,
- Market statistics,
- Customer demographics,
- Finance,
- Product returns,
- Supplier performance, etc...
WAL-MART’S DATA WAREHOUSE
The data are used Data mining: demand-
for decision forecasting application
support:
- Analyzing trend,
- Managing Seasonal sales profile of
inventory, 100,000 products
- Understanding
customers. Market-basket analysis:
Relationship and
patterns in customer
purchases
Forecast
Forecast – a statement about the future value of a
variable of interest
We make forecasts about such things as weather,
demand, and resource availability
Forecasts are important to making informed
decisions
Forecast is familiar with the management science
(facts or conditions) and an art (past experiences...)
Demand forecasting is one of the earliest and most
popular in OM
Two Important Aspects of Forecasts
Expected level of demand
The level of demand may
be a function of some
structural variation such ??
as trend or seasonal
variation
Accuracy
Related to the potential
size of forecast error
Forecast Uses
Plan the system
Generally involves long-range plans related to:
Types of products and services to offer
Facility and equipment levels
Facility location
Plan the use of the system
Generally involves short- and medium-range plans related to:
Inventory management
Workforce levels
Purchasing
Production
Budgeting
Scheduling
Features Common to all Forecasts
Forecasting techniques assume that the same
underlying causal system that existed in the past will
continue to exist in the future.
Forecasts are rarely perfect.
Forecasts for groups of items tend to be more accurate
than forecasts for individual items.
Forecast accuracy decreases as the time horizon
increases.
Forecasting Time Horizons
• Short-range forecast
Up to 1 year, generally less than 3 months
Purchasing, job scheduling, workforce levels, job
assignments, production levels
Forecasting Time Horizons
Medium-range forecast
3 months to 3 years
Sales and production planning, budgeting
Forecasting Time Horizons
Long-range forecast
3+ years
New product planning, facility location, research
and development
Forecasts Are Not Perfect
Forecasts are not perfect:
Because random variation is always present,
there will always be some residual error, even if
all other factors have been accounted for.
Elements of a Good Forecast
The forecast
Should be timely
Should be accurate
Should be reliable
Should be expressed in meaningful units
Should be in writing
Technique should be simple to understand and use
Should be cost-effective
Steps for Forecasting
Determine the use of the forecast
Select the items to be forecasted
Determine the time horizon of the forecast
Select the forecasting model/technique(s)
Gather and analyze the data
Make the forecast
Validate and implement results
Approaches to Forecasting
• Qualitative methods
• Quantitative methods
Approaches to Forecasting
Qualitative methods
Used when situation is vague and little data
exist
New products
New technology
Includes soft information
e.g., human factors, personal opinions,
hunches…
Approaches to Forecasting
Quantitative methods
Used when situation is ‘stable’ and historical
data exist
Existing products
Current technology
Involves mathematical techniques
e.g., forecasting sales of LCD full HD
Overview of Qualitative Methods
Executive opinions
Sales force opinions
Consumer survey
Delphi method
Executive Opinions
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
Sales Force Opinions
Each salesperson projects his or her sales
Combined at district and national levels
Sales representatives know customers’ wants
Tends to be overly optimistic, some of them can’t
identify want/need or demand
Consumer Survey
Ask customers about purchasing plans
What consumers say, and what they actually do
are often different
Sometimes difficult to answer or they can easily
be affected by others’ opinions, etc.
Delphi Method
Iterative group
process, continues
until consensus is Decision Makers
reached (Evaluate responses
and make decisions)
Staff
3 types of participants (Administering
survey)
Decision makers
Staff
Respondents
Respondents
(People who can make
valuable judgments)
Delphi Method
Steps to do:
1. Choose respondents;
2. Create a questionnaire and send it to respondents;
3. Collect and analyze respondents’ answers, then re-do
the questions if possible;
4. Send a questionnaire to respondents again;
5. Collect and analyze answers secondly, if the answers
can satisfy decision makers, the survey can be
finished. If they can’t, the admin staffs have to redo
the questionnaire...
Overview of Quantitative Methods
1. Naive approach
2. Moving averages
3. Exponential smoothing Time-Series Forecasting
4. Trend projection (time
series trend)
5. Linear regression Associative Forecasting
Time Series Forecasting
Forecasts that project patterns identified in recent
time-series observations
Time-series – a time-ordered sequence of observations
taken at regular time intervals
Assume that future values of the time-series can be
estimated from past values of the time-series
Time-Series Behaviors
Trend
Seasonality
Cycles
Irregular variations
Random variation
Trends and Seasonality
Trend
A long-term upward or downward movement in
data
Population shifts
Changing income
Seasonality
Short-term, fairly regular variations related to the
calendar or time of day
Restaurants, service call centers, and theaters all
experience seasonal demand
Cycles and Variations
Cycle
Wavelike variations lasting more than one year
These are often related to a variety of economic, political, or
even agricultural conditions
Irregular variation
Due to unusual circumstances that do not reflect typical
behavior
Labor strike
Weather event
Random Variation
Residual variation that remains after all other behaviors have
been accounted for
Time-Series Forecasting
Naive Method
Assumes demand in next period is the same as demand
in most recent period
Ft = Dt-1
Ft : Demand forecasted at time t
Dt-1: Actual demand at time t-1
e.g., If January sales were 5000 products, then
February sales will be 5000 products
Can be used with
A stable time series
Seasonal variations
Trend
Naive Method
Advantages
Sometimes cost effective and efficient
Can be good starting point
Suitable for demand forecasting with trend
Disadvantages:
Naïve and not precise
Not suitable for demand forecasting with
seasonal component => big error!
Time-Series Forecasting - Averaging
These techniques work best when a series tends to vary
about an average
Averaging techniques smooth variations in the data
They can handle step changes or gradual changes in
the level of a series
Techniques
1. Moving average
2. Weighted moving average
3. Exponential smoothing
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
n
D t −i
Ft = i =1
n
1. n →
2. n is finite number
Moving Average Method
As new data become available, the forecast is updated
by adding the newest value and dropping the oldest
and then re-computing the average
The number of data points included in the average
determines the model’s sensitivity
Fewer data points used—more responsive
More data points used—less responsive
Moving Average Example
Making forecast for the following months:
Month Actual Demand
(100 units)
1 98
2 102
3 103
4 97
5 95
6
With n =3, making forecast for the next coming
months:
Month Actual Sales (units)
1 900
2 1100
3 1300
4 1050
5 950
6 1249
7
Weighted Moving Average
Used when trend is present
Older data usually less important
Weights based on experience and intuition
n
Ft = D
i =1
t −i t −i
Ft : Forecast at time t
Dt-i : Actual demand at time t - i
t-i : Weight at time t- i
n
Condition for t-i :
i =1
t −i =1 0 t −i 1
Example: with n =3 and weights are t-1 = 0.5 ; t-2 =
0.3; t-3 = 0.2, making forecast for the following
months.
Sales Actual Demand
1 900
2 1100
3 1300
4 1050
5 950
6 1250
7
Exponential Smoothing
Form of weighted moving average
Weights decline exponentially
Most recent data weighted most
Ft = Ft-1 + (Dt-1 - Ft-1) = Dt-1 + (1-)Ft-1
Requires smoothing constant ()
Ranges from 0 to 1
Subjectively chosen
Involves little record keeping of past data
Choosing
The objective is to obtain the most accurate forecast no
matter the technique
We generally do this by selecting alpha that gives us the
lowest forecast error
Forecast error (e)= Actual demand - Forecast value
= Dt - Ft
Example: Making forecast for following months with
= 0.8 and it is assumed that D1 = F1
Month Actual Sales (units)
1 900
2 1100
3 1300
4 1050
5 950
6 1250
7
Making forecast with = 0.1 or = 0.4. Which is
better? Assume that D1= F1.
Month, i Actual Forecast, Ft
Demand, α=0.1 α=0.4
Dt
Ft0.1 e Ft0.4 e
1 100
2 110
3 120
4 115
5 125
6
Linear Trend
Assumption
β1 ≠ 0
β1 is in the population regression model
y t = β 0 + β1x + ε
Linear Trend
Consider the time series data as bivariate
The procedure for conducting the method
- Step 1: Take the physical time points as values of
the independent variable x (coded as 1, 2, 3, etc).
- Step 2: Take the data values themselves as values
of the dependent variable y
- Step 3: Calculate the regression line of y on x, y=
a+bx
- Step 4: Translate the regression line as t=a+bx,
where any given value of time point x will yield a
corresponding value of the trend, t.
Formulas
n n n
n xiyi − xi yi
n n n n
yi − xi xiyi
xi
2
a= i =1
n
i =1 i =1
n
i =1
b= i =1
n
i =1
n
i =1
n xi − ( xi )
2 2
n xi 2 − ( xi ) 2
i =1 i =1
i =1 i =1
or
xy − x y
b= a = y − bx
( x ) − ( x)
2 2
Example
Estimate a trend line using regression analysis
Year Time Σx = 21
Period (x) Sales (y)
Σy = 275
Σxy = 1130
2015 1 20
2016 2 40 = 91
x 2
2017 3 30
2018 4 50
2019 5 70
2020 6 65
Example
xy − x . y 188.333 − 3.5 45.833
b= = = 9.5714
x2
15.167 − (3.5) 2
a = y − bx = 45.833 − 9.5714 3.5 = 12.3358
Translate the regression line as: t = a+bx
t (x = 1) = 12.3358 + 9.5714 * 1 = 21.9072
t (x = 2) = 12.3358 + 9.5714 * 2 = 31.4786
…
Trend-Based Forecasting
The linear trend model is:
t = 12.333 + 9.5714 x
Sales trend
80
70
60
50
sales
40
30
20
10
0
0 1 2 3 4 5 6 7
Year
Trend-Based Forecasting
Forecast for time period 7:
Time y= 12.333+9.5714(7)
Year Period (t) Sales
(y)
=79.33
2015 1 20
2016 2 40
2017 3 30
2018 4 50
2019 5 70
2020 6 65
2021 7 ??
Associative Forecasting
Sometimes called as Causal relationship
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
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= computed value of the variable to be
predicted (dependent variable)
a = y-axis intercept
b = slope of the regression line
x = the independent variable though to predict
the value of the dependent variable
Associative Forecasting
Past data:
y1 y2 y3 ... yn
x1 x2 x3 ... xn
n: number of observations
Associative Forecasting
Y
y10
y8
y7
y9
Estimated
y6
y5
regression
y4 line
y3
y2
y1
0 1 1x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 X
Formulas
n n n
n xiyi − xi yi
n n n n
yi − xi xiyi
xi
2
a= i =1
n
i =1 i =1
n
i =1
b= i =1
n
i =1
n
i =1
n xi − ( xi )
2 2
n xi 2 − ( xi ) 2
i =1 i =1
i =1 i =1
or
xy − x y
b= a = y − bx
( x ) − ( x)
2 2
Example
The data below Cost of No of products
relates cost of advertisement sold
advertising (VND (VND m) (1000 units)
m)to number of 1 2
products sold (1000 3 8
units). 4 9
Prepare the 5 15
regression model and 6 15
make a conclusion 7 20
about this relation. 9 23
12 25
Forecast the number 14 22
of products sold if 15 36
cost of ads is 20 m.
VND
Correlation Analysis
Correlation is a technique used to measure the
strength of the relationship between two variables.
The stronger the correlation, the better the
relationship or the better fit the regression line and
vice versa.
Correlation Coefficient (r)
The correlation coefficient is used to measure the
strength of the linear relationship between two
variables
The product moment correlation coefficient is
calculated using the formula:
n xy − x y
r=
n x − ( x) n y − ( y )
2 2 2 2
Correlation Coefficient (r)
-1 r 1
r < 0 : negative relationship between x and y
r > 0 : positive relationship between x and y
r→ 1/-1: strong linear relationship
Forecast Accuracy
Mean absolute deviation (MAD)
MAD =
Actual t − Forecast t
n
MAD weights all errors evenly
Mean squared error (MSE)
(Actual − Forecast t )
2
MSE = t
n −1
MSE weights errors according to their squared values
The smaller MAD and MSE are, the better they are.
Forecast Accuracy
Actualt − Forecast t
Actual t
100
MAPE =
n
MAPE weights errors according to relative error
Forecast Error Calculation
Actual Forecast (A-F)
Period
(A) (F) Error |Error| Error2 [|Error|/Actual]x100
1 107 110 -3 3 9 2.80%
2 125 121 4 4 16 3.20%
3 115 112 3 3 9 2.61%
4 118 120 -2 2 4 1.69%
5 108 109 1 1 1 0.93%
Sum 13 39 11.23%
n=5 n-1 = 4 n=5
MAD MSE MAPE
= 2.6 = 9.75 = 2.25%
Calculate MAD, MSE
Period Actual Forecast Error |e| e²
Demand (D-F)
1 217 215
2 213 216
3 216 215
4 210 214
5 213 211
6 219 214
7 216 217
8 212 216
Exercise 1
UK outward passenger movements by sea
(millions):
Qtr 1 Qtr 2 Qtr 3 Qtr 4
Year 1 2.2 5.0 7.9 3.2
Year 2 2.9 5.2 8.2 3.8
Year 3 3.2 5.8 9.1 4.1
Using regression model to extract the trend line
and making forecast for 4 quarters of year 4?
Exercise 2
The data below Cost of No of products
relates cost of advertisement sold
advertising (VND (VND m) (1000 units)
m)to number of 1 2
products sold (1000 3 8
units). 4 9
Prepare the 5 15
regression model and 6 15
make a conclusion 7 20
about this relation. 9 23
12 25
14 22
15 36
Exercise 3
A director of industrial pump company has to choose one
of following methods in order to make demand forecasting.
If he takes MAD as standard measure, which method is
better, method 1 or method 2?
Month Actual demand Forecast Forecast
(Method 1) (Method 2)
1 492 488 495
2 470 484 482
3 485 480 478
4 493 490 488
5 498 497 492
6 492 493 493
Exercise 4
A CEO considers whether his company can take the
unemployment rate to measure the number of products sold
or not. Write down the regression model displaying the
relationship between those variables and make conclusion
based on your results.
Period 1 2 3 4 5 6 7 8 9 10
Unemployment 1.3 2.0 1.7 1.5 1.6 1.2 1.6 1.4 1.0 1.1
rate, %
Number of10 6 5 12 10 15 5 12 17 20
products sold
(1000 units)