2 production and operation problems. MSD 340

profilescotla
chapter_3.pptx

CHAPTER 3 Forecasting

Outline

Definition

Forecast Accuracy

Types of Forecasts

Judgmental

Time series

Associative models

2

Forecast

A statement about the future value of a variable of

interest, such as demand. Equivalently, prediction

about the future.

- Not necessarily numerical, e.g. weather forecasts

3

Cautions

Assume a causal system

Future resembles the past

Forecasts rarely perfect because of randomness

Forecasts more accurate for groups vs. individuals.

Forecasting errors among items in a group usually have a canceling effect.

Extremes in a group cancel each other

Forecast accuracy decreases as time horizon for forecasts increases.

Ex. weather forecast

4

Accounting Cost/profit estimates
Finance Cash flow and funding
Human Resources Hiring/recruiting/training
Marketing Market trend, pricing
MIS IT/IS systems, computers
Operations Schedules, workloads
Product/service design New products or services

Uses of Forecast

5

Steps in the Forecasting Process

Step 1. Determine purpose of forecast

Step 2. Establish a time horizon

Step 3. Select a forecasting technique

Step 4. Obtain, clean, analyze appropriate data

Step 5. Make the forecast

Step 6. Monitor the forecast

“The forecast”

6

Forecast Accuracy

7

Forecast Error

Error:

Difference between the actual value and the value that was predicted for a given period.

8

Errort = Actualt - Forecastt

Measures of Forecast Accuracy

Mean Absolute Deviation (MAD)

Mean Squared Error (MSE)

Mean Absolute Percent Error (MAPE)

MAD =

Actualt

Forecastt

n

2

MSE

=

Actualt

Forecastt)

-

1

n

(

MAPE =

Actualt

Forecastt

n

Actualt

× 100

9

Example 1

Period

1

2

3

4

5

6

7

8

Forecast

215

216

215

214

211

214

217

216

(A-F)

|A-F|

(A-F) 2

(|A-F|/Actual)×100

Actual

217

213

216

210

213

219

216

212

10

Example 1

Period

1

2

3

4

5

6

7

8

Forecast

215

216

215

214

211

214

217

216

(A-F)

2

-3

1

-4

2

5

-1

-4

-2

|A-F|

2

3

1

4

2

5

1

4

22

(A-F) 2

4

9

1

16

4

25

1

16

76

(|A-F|/Actual)×100

0.92

1.41

0.46

1.90

0.94

2.28

0.46

1.89

10.26

Actual

217

213

216

210

213

219

216

212

MAD=

 ׀A-F׀/ n = 22 / 8 = 2.75

MSE =

 (A-F)2/ (n-1) = 76 / 7 = 10.86

MAPE =

10.26/8 = 1.28

11

Types of Forecasts

Judgmental - uses subjective inputs

Executive opinions

Sales force opinions

Consumer surveys

Time series - uses historical data assuming the future will be like the past

Associative models - uses explanatory variables to predict the future

12

Time Series Forecasting

13

Time series

Time-ordered sequence of observations taken at regular intervals

Data : measurements of demand (sales, earnings, profits, …)

Example:

Types of Variations in Time Series Data:

Trend - long-term movement in data

Seasonality - short-term regular variations in data

Cycles - wavelike variations of long-term

Irregular variations - caused by unusual circumstances

Random variations - caused by chance

Year 1998 1999 2000 2001 2002
Sales (thousand units) 78.7 63.5 89.7 93.2 92.1

14

Forecast Variations

Trend

Irregular variation

Cycles

Seasonal variations

Year 01

00

99

Cyclical

15

Time Series Methods

Naïve methods

Moving average

Weighted moving average

Exponential smoothing

Forecasting with a trend

Forecasting with seasonality

16

Time Series Forecasting

- Naïve Method

17

Naïve Forecast

The forecast for any period

=

The previous period’s actual value.

Uh, give me a minute....

We sold 250 wheels last

week.... Now, next week we should sell....

18

Some Notation:

Today’s temperature is 63 → AToday = 63

Forecast for tomorrow → FTomorrow = 63

Ft Forecast at time t
At Actual observation at time t

19

Naïve Method

Example 2: Naïve Forecasts

Forecast for period t is the actual value for period t-1: Ft = At-1.

Period t Actual Demand Forecast

1

2

3

4

5

6

7

8

9

10

11

12

42

40

43

40

41

39

46

44

45

38

40

-

20

Solution to Example 2

Period t Actual Demand Forecast

1

2

3

4

5

6

7

8

9

10

11

12

42

40

43

40

41

39

46

44

45

38

40

-

-

42

40

43

40

41

39

46

44

45

38

40

21

Time Series Forecasting

- Averaging

22

Moving Average

Moving average – A technique that averages a number of recent actual values, updated as new values become available.

Ft = MAn =

n

At-i

i = 1

n

t = an index that corresponds to periods.

n = Number of periods (data points) in the moving

average period.

At = Actual value in period t.

MAn = Forecast based on most-recent n periods.

Ft = Forecast for time period t.

Where

23

Example 3: Moving Average

Find moving average with n = 5.

Period t Actual Demand Forecast

1

2

3

4

5

6

7

8

9

10

11

12

42

40

43

40

41

39

46

44

45

38

40

-

24

Solution to Example 3

Start from F6 (forecast for period 6).

Period t Actual Demand Forecast

1

2

3

4

5

6

7

8

9

10

11

12

42

40

43

40

41

39

46

44

45

38

40

-

-

-

-

-

-

41.2

40.6

41.8

42.0

43.0

42.4

42.6

42+40+43+40+41

5

=

46+44+45+38+40

5

=

25

Moving Averages

New value becomes available?

Drop oldest value from total

Add newest value to total

Recalculate average (divide by n)

26

Lag Increases with Periods

27

MA3

MA5

 Average the last 3 actual values

 Average the last 5 actual values

The less numbers used to get average the more likely line will be straighter.

Moving Averages

Fewer data points (n )

More responsive to real changes

More responsive to random variations

28

Weighted moving average – more recent values in a series are given more weight in computing the forecast

Reminder that Simple Moving Average:

Weighted Moving Averages

Ft = WMAn

=

wiAt-i

i = 1

n

w1 + w2 +  + wn = 1

wi =

n

1

n

MAn

=

n

At-i

i = 1

=

At-i

n

1

i = 1

n

29

w1 ≥ w2 ≥  ≥ wn

Weighted Moving Average

Moving Average

Pros: Easy to compute and easy to understand

Cons: All values in the average are weighted equally

Weighted Moving Average

Similar to moving average

Assigns more weight to recent observed values

Idea: most recent observations are better indicators of future

More responsive to changes

Selection of weights is arbitrary, but weights must add to one. The values for the weights are always given.

30

Example 4: Weighted Moving Average

Find weighted moving average using

Ft =0.4At-1 + 0.3At-2 + 0.2At-3 + 0.1At-4.

Period t Actual Demand Forecast

1

2

3

4

5

6

7

8

9

10

11

12

42

40

43

40

41

39

46

44

45

38

40

-

31

Solution to Example 4

Start from F5 (forecast for period 5).

Period i Actual Demand Forecast

1

2

3

4

5

6

7

8

9

10

11

12

42

40

43

40

41

39

46

44

45

38

40

-

-

-

-

-

41.1

41.0

40.2

42.3

43.3

44.3

42.1

40.8

0.1(42)+.2(40)+.3(43)+.4(40)

=

=

0.1(39)+.2(46)+.3(44)+.4(45)

32

.4 goes to the most recent weight and .1 the furthest. When taking the previous four numbers the 4th one is multiplied by .4 and the first gets .1

Shown solutions of Example 3 and 4

30

32

34

36

38

40

42

44

46

48

1

2

3

4

5

6

7

8

9

10

11

12

Observed

MA

WMA

33

Exponential Smoothing

Current forecast = Previous forecast + (Actual - Previous forecast)

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

Ft = Forecast for period t

Ft-1 = Forecast for period t-1

 = Smoothing constant

At-1 =Actual demand or sales for period t-1

where

34

Example 5: Exponential Smoothing

Period (t)

Actual (At)

Ft (α = 0.1)

Error (A-F)

Ft ( α = 0.4)

1

42

2

40

3

43

4

40

5

41

6

39

7

46

8

44

9

45

10

38

11

40

12

Error (A-F)

Hint: To calculate Ft, you need Ft-1 and At-1

For initial forecast, you can use naïve approach

35

Solution to Example 5

For example: α = 0.1

A1 = 42 → F2 = 42 (Naïve)

A2 = 40 → F3 = F2 + α (A2 - F2)

= 42 + 0 .1 × (40 - 42) = 41.8

A3 = 43 → F4 = F3 + α (A3 - F3)

= 41.8 + 0 .1 × (43 - 41.8) = 41.92

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

36

Solution to Example 5 (Cont.)

1

42

2

40

42

-2.00

42

-2

3

43

41.8

1.20

41.2

1.8

4

40

41.92

-1.92

41.92

-1.92

5

41

41.73

-0.73

41.15

-0.15

6

39

41.66

-2.66

41.09

-2.09

7

46

41.39

4.61

40.25

5.75

8

44

41.85

2.15

42.55

1.45

9

45

42.07

2.93

43.13

1.87

10

38

42.36

-4.36

43.88

-5.88

11

40

41.92

-1.92

41.53

-1.53

12

41.73

40.92

Period (t)

Actual (At)

Ft (α = 0.1)

Error (A-F)

Ft ( α = 0.4)

Error (A-F)

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

37

Picking a Smoothing Constant α

Actual

 .1

.4

35

40

45

50

1

2

3

4

5

6

7

8

9

10

11

12

Period

Demand

38

Time Series Forecasting

- Trend

39

Linear Trend Equation

Ft = Forecast for period t

t = Specified number of time periods from t = 0

a = Value of Ft at t = 0

b = Slope of the line

Ft = a + b t

0 1 2 3 4 5 t

Ft

40

Calculating a and b

n = Number of periods

y = Value of the time series

t = Specified number of time periods from t = 0

t

n

-

b

=

n

(ty)

-

y

t

2

(

t)

2

a

=

y

-

b

t

n

41

Example 6:

Calculator sales for a California-based firm over the last 10 weeks are shown in the following table.

Week (t) y yt t2

1

2

3

4

5

6

7

8

9

10

700

724

720

728

740

742

758

750

770

775

700

1448

2160

2912

3700

4452

5306

6000

6930

7750

1

4

9

16

25

36

49

64

81

100

55

7407

41358

385

42

Solution to Example 6

Plot the data, and visually check to see if a linear trend line would be appropriate.

n = 10,  t = 55,  y =7407,  yt = 41358, t2 = 385

b

=

10(41358)

-

55(7407)

10(385)

-

55(55)

=

413580

-

407385

3850

-

3025

7.51

y = 699.40 + 7.51t

a

=

7407 -

7.51(55)

10

699.40

43

Solution to Example 6 (Cont.)

660

680

700

720

740

760

780

800

1

2

3

4

5

6

7

8

9

10

Observed

Trend line

44

Solution to Example 6 (Cont.)

Then determine the equation of the trend line, and predict sales for weeks 11 and 12.

y11 =699.40 + 7.51(11) = 782.01

y12 =699.40 + 7.51(12) = 789.51

45

Time Series Forecasting

- Seasonality

46

Techniques for Seasonality

Example :

Winter and summer sports equipment

Rush hour traffic occurs twice a day

Theaters and Restaurants often experience weekly demand pattern

Banks may experience daily and monthly seasonal variation.

Regularly repeating upward or downward movements in time series values

47

Techniques for seasonality

Seasonality: Expressed in terms of the amount that actual values deviate from the average (or trend) value of the series

Additive: seasonality is expressed as a quantity, which is added or subtracted from the average to incorporate seasonality.

Multiplicative: seasonality is expressed as a percentage of the average amount, which is used to multiply the value of a series to incorporate seasonality.

seasonal percentages = seasonal relatives = seasonal indexes

1.20  sales 20% above average 0.90  sales 10% below average

48

Additive Model and Multiplicative Model

Seasonal Relative

49

Example 7: Seasonality

A manager wants to predict the quarterly demand for period 15 and 16, which are the 2nd and 3rd quarters of a particular year. Demand series consists of both trend and seasonality. The trend portion is Ft = 124 + 7.5t. Quarter relatives are Q1 = 1.20, Q2 = 1.10, Q3 = 0.75, and Q4 = 0.95.

Trend equation: Ft = 124 + 7.5t

t

y

Q1

Q2

Q3

Q4

50

Example 7 (P 92)

The trend values at t = 15 and t = 16:

F15 = 124 + 7.5(15) = 236.5

F16 = 124 + 7.5(16) = 244.0

Incorporating seasonality

Period 15: 236.5(1.10) = 260.15

Period 16: 244.0(0.75) = 183.00

51

Example : Compute seasonality relatives (one period)

Day

Tues

Wed

Thur

Fri

Sat

Sun

Mon

Demand

67

75

82

98

90

36

55

Average

71.86

Seasonal Index

67/71.86

75/71.86

82/71.86

98/71.86

90/71.86

36/71.86

55/71.86

52

Associative Forecasting

53

Simple Linear Regression (SLR)

Find linear relationship between the predictor and the predicted.

Predictor variable - used to predict values of variable interest, sometimes called independent variable

Predicted variable - Dependent variable

Regression - technique for fitting a straight line to a set of points

Objective - obtain an equation of a straight line (least square line) that minimizes the sum of squared vertical deviations of data points from the line.

54

Some Examples of SLR

Based on identification of related variables that can be used to predict values of the variable of interest.

Sales of mountain bikes in an area may be related to the percentage of the young population living in that area.

Sales of Harley-Davidson motorcycles is related to mid-aged men population. Average age of H-D owners is 46.

Ice cream sales can be related to temperature.

Home depot bases sales forecasts on mortgage refinancing rates, and smaller rates imply higher sales.

Increase in energy cost leads to price increases in products and services

55

y

What is a straight line?

y = predicted (dependent) variable

x = predictor (independent) variable

b = slope of the line

a = value of y when x = 0

(the height of line at the y intercept)

y = a + bx

y

x

x

0

a

b>0

b<0

56

Graphical Interpretation of SLR

y = a + bx

57

Which straight line is a better fit?

L2: y = a2 + b2x

L1: y = a1 + b1x

L3: y = a3 + b3x

58

Graphical Interpretation of SLR

Dependent variable

Independent variable

x

y

Estimate of

y from

regression

equation

Actual

value

of y

Value of x used

to estimate y

Deviation,

or error

Regression

equation:

y = a + bx

y = dependent variable

x = independent variable

a = y-intercept of the line

b = slope of the line

59

Computing a and b

Given n data points, find the intercept a and slope b to

60

One Example: SLR Model Seems Reasonable

A straight line is fitted to a set of sample points.

Computed relationship

y = 5.06 + 1.593 x

61

Correlation

Correlation (r) between variables: The strength and direction of relationships between two variables

1.00 means changes in one variable are always matched by changes in the other.

-1.00 means increases in one variable are always matched by decreases in the other.

A correlation close to zero (0) means little linear relationship.

The square of the correlation coefficient, i.e., r2, provides a measure of the percentage of variability in the values of y that is explained by the independent variable.(80% or more: the independent variable is a good predictor of the values of dependent variable)

62

Recap

Forecasting

Forecast Error

Mean Absolute Deviation

Mean Squared Error

Mean Absolute Percent Error

Judgmental Forecast

Time Series Data

63

Trend

Seasonality

Associative Forecast

Predictor Variables

Regression

Correlation

2

1

1

2

1

1

1

÷

ø

ö

ç

è

æ

-

-

=

å

å

å

å

å

=

=

=

=

=

n

t

t

n

t

t

n

t

n

t

n

t

t

t

t

t

x

x

n

y

x

y

x

n

b

2

1

Minimize the sum of squared deviations f

rom the line

Minimize ()

n

tt

t

yabx

=

=

--

å

n

x

b

y

a

n

t

t

n

t

t

å

å

=

=

-

=

1

1

593

.

1

132

1796

12

271

132

3529

12

2

=

-

´

´

-

´

=

b

06

.

5

12

132

593

.

1

271

=

´

-

=

a

010203040500510152025

x

y

xy

x

2

y

2

7

15

105

49

225

2

10

20

4

100

6

13

78

36

169

4

15

60

16

225

14

25

350

196

625

15

27

405

225

729

16

24

384

256

576

12

20

240

144

400

14

27

378

196

729

20

44

880

400

1936

15

34

510

225

1156

7

17

119

49

289

132

271

3529

1796

7159

Sheet1

Period Actual MA3 MA5
1 700
2 675
3 690
4 730 688
5 740 698
6 650 720 707
7 800 707 697
8 790 730 722
9 775 747 742
10 700 788 751
11 780 755 743
12 800 752 769
13 760 769
x y xy x2 y2
7 15 105 49 225
2 10 20 4 100
6 13 78 36 169
4 15 60 16 225
14 25 350 196 625
15 27 405 225 729
16 24 384 256 576
12 20 240 144 400
14 27 378 196 729
20 44 880 400 1936
15 34 510 225 1156
7 17 119 49 289
132 271 3529 1796 7159
&A
Page &P

Sheet1

&A
Page &P
Actual
MA3
MA5

Sheet2

&A
Page &P

Sheet3

&A
Page &P

Sheet4

&A
Page &P

Sheet5

&A
Page &P

Sheet6

&A
Page &P

Sheet7

&A
Page &P

Sheet8

&A
Page &P

Sheet9

&A
Page &P

Sheet10

&A
Page &P

Sheet11

&A
Page &P

Sheet12

&A
Page &P

Sheet13

&A
Page &P

Sheet14

&A
Page &P

Sheet15

&A
Page &P

Sheet16

&A
Page &P
&A
Page &P

22

22

()()()

()()

nxyxy

r

nxxnyy

-

=

æöæö

--

ç÷ç÷

èøèø

ååå

åååå