You are on page 1of 37

OPMG Session 5

Forecasting
Prediction is very difficult,
especially if it's about the future.
Nils Bohr

So far in the course


Emphasis on adopting the right process for the company
Process view of organizations

A process uses resources to transform inputs into outputs


Inputs

Process

Resources

Outputs

So far in the course


There is a one-to-one correspondence between product attributes and
process competencies:
Product attribute

Process competencies

Product cost

Process cost

Product availability

Process flow time

Product variety

Process flexibility

Product quality

Process quality

For example:
Wal-mart has low cost, high availability, average variety, and medium quality
Walmarts process uses cross-docking system, elaborate IT system, and high
inventory turnover.

With the process in place, we turn our attention to demand in the rest
of the course!!

Introduction to Forecasting
Why do companies forecast?

What do they forecast?

How do they forecast?

The latest in forecasting: Using social media


data to forecast
6 surprising things social media can predict*
1.
2.
3.
4.
5.

Predicting terrorist attacks


Forecasting election winners
Red Carpet prognostications
Picking the winner of the big game
Future home sales forecast

The results of the study, ''The Future of Prediction,'' by Lynn Wu & Erik
Brynjolfsson, a professor at M.I.T. have held up over time. In the most recent version, their
model using search data predicted future home sales 24 percent more accurately than
the forecasts by experts from the National Association of Realtors.

6. Choosing winning stocks

Johan Bollen, an associate professor at Indiana University's school of


informatics and computing, contended in a 2010 paper written with a
doctoral student that an analysis of Twitter data could predict the Dow
Jones industrial average with 87.6 percent accuracy.**

* The Week, Feb 13, 2012, http://theweek.com/articles/478162/6-surprising-things-social-media-predict


** The New York Times, William Alden, Nov 12, 2013, Separating the Market-Moving Tweets From the Chaff
*** The New York Times, Steve Lohr, Sep 8, 2013, More Data Can Man Less Guessing About the Economy

The Latest Fashion, Trending on Google*

Predicting fashion trend


Normcore? So last year. String bikinis? Most definitely over. Even
interest in skinny jeans may be waning, if six billion fashion-related
queries by Google users are any indication of this year's most popular
trends
Lisa Green, who heads Google's fashion and luxury team, said the
company had begun working with major retailers, including Calvin Klein,
to help them incorporate real-time Google search data into fashion
planning and forecasting.
''The ability to detect trends very early on before they really become
noticeable, and to follow them, is invaluable.

* The New York Times, Horoko Tabuchi, April 26, 2015, http://www.nytimes.com/2015/04/27/technology/the-latest-fashion-trending-ongoogle.html?_r=0
** The New York Times, Hiroko Tabuchi and Josh Katz, April 26, 2015, Fashion Is Trending, in Google Searches,
http://www.nytimes.com/interactive/2015/04/27/business/google-fashion-trends-map.html

6 surprising things social media can predict*


1.
2.
3.
4.
5.
6.

Predicting terrorist attacks


Forecasting election winners
Red Carpet prognostications
Picking the winner of the big game
Choosing winning stocks
Predicting what articles people will read

The Latest Fashion, Trending on Google**

Predicting fashion trend


Maps***

6 surprising things social media can predict*


1.
2.
3.
4.
5.
6.

Predicting terrorist attacks


Forecasting election winners
Red Carpet prognostications
Picking the winner of the big game
Choosing winning stocks
Predicting what articles people will read

The Latest Fashion, Trending on Google**

Predicting fashion trend


Maps***

Todays class
In todays class, we are going to understand the
nuts-and-bolts of forecasting, albeit very briefly.
Understand two time series techniques to forecast
( Moving Average and Exponential Smoothing)

Calculate accuracy of forecast

Importance of Forecasting
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.

What is forecasting all about?


We try to predict the
future by looking back
at the past

Demand for Mercedes E


Class

Ja
n

Fe Mar Apr May Jun Jul Aug


b

Actual demand (past sales)


Predicted demand

Time

Predicted
demand
looking
back six
months

Some general characteristics of forecasts


Forecasts are always wrong
Forecasts are more accurate for groups or
families of items
Forecasts are more accurate for shorter time
periods
Every forecast should include an error estimate
REMEMBER: Forecasting is based on the assumption
that the past predicts the future! When forecasting,
think carefully whether or not the past is strongly related
to what you expect to see in the future

What should we consider when looking at


past demand data?
Trends
Seasonality

Cyclical elements
Autocorrelation
Random variation

Time series forecasting


A time series is a sequence of observations of some process
over time. (Historical sales in most of our examples.)
A time series forecasting method uses past observations of
sales of a product to create a forecast for that product.

Systematic and unsystematic variability


We divide variability into two categories: systematic and
unsystematic (or random) variability.

Systematic variability can be explained or predicted. Some


examples of systematic variation are:
Consistent trend over time
Consistent seasonal patterns
Product promotions or price changes

Forecasting example
We will assume there is no systematic variation that we need to consider
in our model.
Our forecasting task is to identify the current level of the sales process.
(Let Lt be our estimate of the level of the sales process at the end of
period t.)

No systematic variation
Both examples show data series
with no systematic variation.
The changing level example
shows a data series where the
level moves up and down
somewhat quickly but there is not
lots of noise.
The stable level example shows
a series where there is more
noise but the level does not
change much over time.

Time series models: Moving average


With no systematic variability, we can use an average of past
observations as our forecast.
With time series data, how far back into the past should you look?

Calculating a moving average of the past N observations is one


reasonable forecasting method. (This method simply averages the most
N observations as the forecast.)

Moving average forecast


The text defines the current level of the process Lt as the forecast value
when there are no systematic adjustments.
For N-period moving average:

Lt ( At At 1 At N 1 ) / N
The forecast for any future period is then set equal to the level:

Ft ,t k Lt

Moving Average 3-Period MA Example 1

Ft+1 = (At + At-1+At-2)/3


Week

Demand

820

775

680

655

758.3333333

750

703.3333333

802

695

798

735.6666667

689

783.3333333

775

763

10

Forecast

754

Time Series: Exponential Smoothing (ES)


Main idea: The prediction of the future depends mostly on the
most recent observation, and on the error for the latest forecast.

Smoothin
g constant
alpha

Denotes the
importance of the past
error

Exponential smoothing: the method


Assume that we are currently in period t. We calculated the
forecast for the last period (Ft-1) and we know the actual
demand last period (At-1)

Ft Ft1 ( At1 Ft1 )

Need initial
forecast Ft-1
to start.

The smoothing constant expresses how much our


forecast will react to observed differences
If is low: there is little reaction to differences.
If is high: there is a lot of reaction to differences.

3a. Exponential Smoothing Example 1

Ft+1 = Ft + (At - Ft)


i

Week
1
2
3
4
5
6
7
8
9
10

Ai

Demand
820
775
680
655
750
802
798
689
775

Given the weekly demand


data what are the exponential
smoothing forecasts for
periods 2-10 using =0.10?

Assume F1=D1

3a. Exponential Smoothing Example 1

Ft+1 = Ft + (At - Ft)


i

Week
1
2
3
4
5
6
7
8
9
10

Ai

Demand
820
775
680
655
750
802
798
689
775

Fi

= 0.1

0.6
820.00
820.00
820.00
820.00
F2 = F1+ (A1F1)
815.50
793.00=820+.1(820820)
801.95
725.20=820
787.26
683.08
783.53
723.23
785.38
770.49
786.64
787.00
776.88
728.20
776.69
756.28

3a. Exponential Smoothing Example 1

Ft+1 = Ft + (At - Ft)


i

Week
1
2
3
4
5
6
7
8
9
10

Ai

Demand
820
775
680
655
750
802
798
689
775

Fi

= 0.1

0.6
820.00
820.00
820.00
820.00
815.50
F3 =
F2+ (A2F2)793.00=820+.1(775820)
801.95
725.20
=815.5
787.26
683.08
783.53
723.23
785.38
770.49
786.64
787.00
776.88
728.20
776.69
756.28

3a. Exponential Smoothing Example 1

Ft+1 = Ft + (At - Ft)


i

Week
1
2
3
4
5
6
7
8
9
10

Ai

Demand
820
775
680
655
750
802
798
689
775

Fi

= 0.1

820.00
820.00
815.50
801.95
787.26
783.53
785.38
786.64
776.88
776.69

0.6
820.00
820.00
793.00
725.20
683.08
723.23 This process
770.49 continues
through week 10
787.00
728.20
756.28

3a. Exponential Smoothing Example 1

Ft+1 = Ft + (At - Ft)


i

Week
1
2
3
4
5
6
7
8
9
10

Ai

Demand
820
775
680
655
750
802
798
689
775

Fi

= 0.1

= 0.6

820.00
820.00
815.50
801.95
787.26
783.53
785.38
786.64
776.88
776.69

820.00
820.00
793.00
725.20
683.08
723.23
770.49
787.00
728.20
756.28

What if the
constant
equals 0.6

3a. Exponential Smoothing In-class Exercise

Ft+1 = Ft + (At - Ft)


i

Month
January
February
March
April
May
June
July
August
September

Ai

Demand
120
90
101
91
115
83

Fi

0.3
100.00
106.00
101.20
101.14
98.10
103.17
97.12

0.6
100.00
112.00
98.80
100.12
94.65
106.86
92.54

Assume initial
forecast = 100

Choice of smoothing constant


The two charts here show exponential
smoothing applied to the changing level
series with smoothing constant values of
0.10 (top chart) and 0.40 (bottom chart.)

In the top chart our forecast appears to be


reacting somewhat slowly to new (and
seemingly relevant) sales information, and
the more reactive forecast process
(bottom) seems to be working better.

Choice of smoothing constant


We apply exponential smoothing with
smoothing constants of 0.10 (top) and 0.40
(bottom) to the stable series.

Here we see that the more reactive model


(bottom chart with 0.40 as smoothing
constant) seems to react to noise.

What happens to exponential smoothing forecasts


when there is trend in the data?
Linear trends are one common type of systematic
variability.
If we use exponential smoothing without
adjusting for trend, we will be constantly trying to
catch up (assuming the trend is upward.)

The two charts show the same sales data. The


top chart shows what happens if we apply
exponential smoothing with no trend adjustment.
The forecasts in the bottom chart adjust for the
growth trend.

Regular exponential smoothing will always lag behind the trend.


Note: Trend adjusted exponential smoothing is not covered in this class

How can we compare across forecasting


models?
We need a metric that provides estimation of accuracy

Errors can be:


Forecast Error

1. Biased
2. random

Forecast error = Difference between actual and forecasted value

Measuring Accuracy: MFE


MFE = Mean Forecast Error (Bias)
It is the average error in the observations
n

MFE

A F
i 1

1. A more positive or negative MFE implies worse


performance; the forecast is biased.

Measuring Accuracy: MAD


MAD = Mean Absolute Deviation
It is the average absolute error in the observations
n

MAD

A F
i1

1. Higher MAD implies worse performance.

2. If errors are normally distributed, then =1.25MAD

Measuring Accuracy: MSE


MSE = Root Mean Square Error
It is the average absolute error in the observations
n

( A -F )
t

MSE=

t=1

1. Higher MSE implies worse performance.


2. RMSE (Root Mean Square Error) =

MSE

3. Compared to MAD, RMSE & MSE severely punish large


errors

Example
Week

Demand

Forecasts

MFE

820

820.00

0.00

0.000

775

820.00

-45.00

45.000

2025

680

815.50

-135.50

135.500

18360.25

655

801.95

-146.95

146.950 21594.3025

750

787.26

-37.26

37.255 1387.935025

802

783.53

18.47

18.471 341.1593703

798

785.38

12.62

12.623 159.3514899

689

786.64

-97.64

97.639 9533.353817

775

776.88

-1.88

1.875

10

MAD

MSE

3.515645625

776.69
MFE
MAD

-48.13
55.035

MSE

5933.874205

RMSE

77.03164418

Conclusions and discussion


Forecasting is the act of predicting the predictable and describing the
unpredictable to support a decision.
Forecasting is difficult, important, supported by statistical models,
subject to both improvement and degradation by human judgment.

Choice of forecast error measure depends upon the application.

You might also like