You are on page 1of 76

Forecasting

Production Quantity over


Production Quantity Total Cost (in pence)
(in Chocolate bars)
Time
800
11-Aug 100 15,680
700

Production Quantity
185 19,200

(in chocolate bars)


11-Sep
600
11-Oct 350 24,100 500
11-Nov 390 24,800 400
11-Dec 520 32,900 300
12-Jan 400 40,000 200
12-Feb 490 29,800 100
12-Mar 550 36,100 0

1-Oct

1-Oct
1-Nov
1-Dec

1-Jul

1-Nov
1-Dec
1-Jan
1-Jan

1-Apr

1-Jun

1-Aug
1-Sep
1-Aug
1-Sep

1-Mar

1-May
1-Feb
12-Apr 640 49,600
12-May 250 21,300
12-Jun 370 24,500
12-Jul 670 56,200
12-Aug 690 72,100
12-Sep 720 91,300
12-Oct 440 26,000 Cost over time
12-Nov 320 22,800 100,000

Total Cost (in Pence)


12-Dec 50 13,000
80,000
13-Jan 150 30,000
60,000

40,000

20,000

A time series is a dataset that relates to one or


more variables over time.
How does this compare to a
scatter graph?
Similarity: 100,000

Total Production Cost (in


90,000
80,000

Visualization of two- 70,000


60,000

pence)
50,000
dimensional data points 40,000
30,000
20,000
Differences: 10,000
0

Time always appears on 0 200 400 600

Production Quantity (in Chocolate bars)


800

the x-axis (we implicitly


800
assume that time is the

Production Quantity
700

(in chocolate bars)


600
independent variable) 500
400
300
The points are connected 200
100
(this is possible because 0

they are in sequence)


How can we model time-
dependent behavior ?
• May use regression 100,000

Total Production Cost (in


90,000 y = 0.0009x 3 - 0.848x 2 + 258.16x + 268.38
R² = 0.9325
80,000
models: 70,000
60,000

pence)
Similarity: 50,000
40,000
30,000
Mathematical principles 20,000
10,000
0
Differences: 0 200 400 600 800

Production Quantity (in Chocolate bars)


Time is always used as the
independent variable 800

Production Quantity
We may have additional 700

(in chocolate bars)


600
understanding about the 500
y = 0.0939x - 3445.3
400
influence of time e.g. patterns 300
R² = 0.0055

with respect to weekdays, 200


100
months or quarters 0
Today
• Introduction to time series
• Components of a time series
• Classical decomposition analysis
• Forecasting - Questions
• Forecasting Errors / Accuracy of Forecast
Graph of a time series
Quarterly demand over 6 years
Demand
180
160
140
120
100
80
60
40
20
0
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
Quarter
Time series components
A time series consists of one variable (univariate) or several variables
(multivariate), e.g. sales, prices, wages, performance, over time.

A time series is often said to consist of the components:


• trend
• seasonal variation
• cyclical variation
• irregular (random) variation

However not all components may be present


The Trend component
• Trend: the growth or decline in a time series over an
extended period of time.

(Note that a time series that has no trend is described as


stationary.)
Trend patterns may be linear or non-linear
Linear trend pattern

x
x x x
TSt x
x x x x x
x x
x

t
Non-linear trend
pattern

TSt
Graph of a time series -
Trend component
Trend
Quarterly demand over 6 years
Demand
180
160
140
120
100
80
60
40
20
0
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
Quarter
The Seasonal component
• A seasonal pattern exists when a time series fluctuates
according to some ‘seasonal’ factor
– months of the year
– four seasons of the year
– days of the week
– hours of the day
– ....

• Examples:
– Shopping behaviour
– Electricity usage
– …
Seasonal Data Pattern

TSt

e.g. 1 year

t
Graph of a time series -
Seasonal component
Quarterly demand over 6 years
Demand
180 seasonal
160
140
120
100
80
60
40
20 Year 1 Year 2 Year 3 Year 4 Year 5 Year 6
0
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
Quarter
The Cyclical component

• A cyclical pattern is similar to a seasonal pattern but usually


– the length of a single cycle is more than one year.

Examples:
- House prices
- Sales of i-phones
Cyclical data pattern

TSt

> 1 year

t
Graph of a time series -
cyclical component
Quarterly demand over 6 years
Dem and cyclical
200

150

100

50
Year 1 Year 2 Year 3 Year 4 Year 5 Year 6
0
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
Quarter

(Downturn) in Year 5
Graph of a time series -
irregular component
Quarterly demand over 6 years
Dem and
200

150

100

50
Year 1 Year 2 Year 3 Year 4 Year 5 Year 6
0
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
Quarter

Irregular component (seen from the small (random) differences


in the seasonal pattern between years).
May model this e.g. as a random variable.
Try this – Which components
can you identify?
Classical decomposition
The analysis stage identifies the basic features of a time series i.e.
trend (T), seasonals (S), cyclicals (C) and irregulars (I).

Each feature is modelled and combined to produce forecasts at period


(t) by either:

Ft = Tt + St + Ct +It (additive model)

Ft = Tt*St*Ct*It (multiplicative model)

Generally, the multiplicative model gives better forecasts.


Classical Decomposition
Analysis
• Trend (T)…… Least Squares Regression (LSR)
Moving Averages (MA)
• Seasonals (S)…  value (additive model)
Index (multiplicative model)
(e.g. ratio of actual to trend or MA)
• Cyclicals (C)…  value (additive model)
Wave functions (e.g. sine)
Index (multiplicative model)
• Irregulars (I)… Probability distribution variable
(e.g. Normal)
An example
A firm has recorded the demand for a particular product at the end
of each quarter over the last 4 years as follows:
Year Qtr Demand
1 1 95
2 90
3 120
4 110
2 1 98
2 92
3 140
4 120
3 1 100
2 95
3 135
4 120
4 1 110
2 120
3 160
4 130
Graph of example time
series
Quarterly sales over 4 years
Sales
Seasonal Trend
200 variation
150

100

50

0
1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4

Insufficient data to identify cyclicals Quarters


and irregulars have been ignored
Identifying trend
Can use Regression Analysis:
• Requires relabeling of the time measure (x variable) to obtain a
numerical variable
• Can then apply standard regression analysis to obtain linear or
non-linear models of trend.
11 11 95
95
22 90
90 180

33 120
120 160
44 110
110
22 15 98
98 140

26 92
92 120
37 140
140
48 120 100
Demand

120
33 19 100
100 80
10 2 95
95
3 135 60
11 135
12 4 120
120 40 y = 2.425x + 94.075
44 13 1 110
110 R² = 0.3394
20
14 2 120
120
15 3 160
160 0
4 130 0 2 4 6 8 10 12 14 16 18
16 130
Quarter
Identifying trend
Alternatively, can use a Moving Average
- Will de-seasonalise the data
Actual MA(4) Centred - Requires appropriate choice of the number of
95 the periods in the Moving Average
90
103.75
120 104.13
104.50
110 105.00 104.75 Actuals versus 4 period Moving average
98 110.00 107.50 180
92 112.50 111.25 160
140 113.00 112.75 140
120 113.75 113.38 120
100 112.50 113.13 100
95 113.75 113.13 80
135 116.25 Actual
115.00 60
125 119.50 117.88 40 MA(4)
110 125.75 122.63 20
108 127.00 126.38 0
160 128.50 127.75 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
130 126.00 127.25
116 121.25 quarter
123.63
98 121.75 121.50
141 123.67 Note we use centred values when we have an
132
even number of periods in the moving average
Try this – Moving Averages
• Calculate an MA(3) and MA(7) for the
following sales data from a shoe shop in
the Trafford Centre
Date Sales (in Pairs of Shoes)
9.3.2013 132
10.3.2013 110
Which of the two
11.3.2013 45
moving averages
12.3.2013 35
would you expect to
13.3.2013 23
be more appropriate
14.3.2013 36
(and why)?
15.3.2013 54
16.3.2013 145
17.3.2013 121
Calculation of MA(3) and
MA(7)
Date Sales (in Pairs MA(3) MA(7)
of Shoes)
9.3.2013 132
10.3.2013 110 96
11.3.2013 45 63
12.3.2013 35 34 62
13.3.2013 23 31 64
14.3.2013 36 38 66
15.3.2013 54 78
16.3.2013 145 107
17.3.2013 121
Visual comparison

160

140
Sales (in Pairs of Shoes)

120

100

80
Original data
60 MA(3)
40
MA(7)

20

0
Classical Decomposition
Analysis
• Trend (T)…… Least Squares Regression (LSR)
Moving Averages (MA)
• Seasonal (S)…  value (additive model)
Index (multiplicative model)
(e.g. ratio of actual to trend or MA)

• Cyclicals (C)…  value (additive model)


Wave functions (e.g. sine)
Index (multiplicative model)
• Irregulars (I)… Probability distribution variable
(e.g. Normal)
Seasonal indices
• Seasonal indices can be computed in a number
of ways including:
1) Calculate trend (using moving average or linear
regression)
2) Multiplicative model:
1) Divide original values by the trend
2) For each season, take the mean or median of
the resulting values
3) Or Additive model:
• Subtract the trend from the original values
• For each season, take the mean or median of
the resulting values
Qtr Actual(A) Trend(T) (A/T)
Seasonal indices
1
2
95
90
96.50
98.93
0.98
0.91
based on trend
y = 2.425x + 94.075
3 120 101.35 1.18
4
5
110
98
103.78
106.20
1.06
0.92
This assumes that
6 92 108.63 0.85 a multiplicative
7 140 111.05 1.26 model is to be
8
9
120
100
113.48
115.90
1.06
0.86
used.
10 95 118.33 0.80
11 135 120.75 1.12 Seasonal indices can be
12 120 123.18 0.97
13 110 125.60 0.88 calculated from mean or
14 120 128.03 0.94 even better from the
15 160 130.45 1.23 median
16 130 132.88 0.98
Ye ar 1 Ye ar 2 Ye ar 3 Ye ar 4 M e dian
Qtr1 0.98 0.92 0.86 0.88 0.90
Qtr2 0.91 0.85 0.80 0.94 0.88
Qtr3 1.18 1.26 1.12 1.23 1.21
Qtr4 1.06 1.06 0.97 0.98 1.02
Seasonal indices using moving
averages
Actual MA(4) Centred Act/Cent
This assumes a
95 multiplicative model
90 103.75
120 104.50 104.13 1.15 Notice how there is less data
110 105.00 104.75 1.05
98 110.00 107.50 0.91 available on which to
92 112.50 111.25 0.83 calculate the indices due to
140 113.00 112.75 1.24
120 113.75 113.38 1.06
taking the moving average.
100 112.50 113.13 0.88
95 113.75 113.13 0.84
135 116.25 115.00 1.17
125 119.50 117.88 1.06
Index calculated from
110 125.75 122.63 0.90 mean or median
108 127.00 126.38 0.85
160 128.50 127.75 1.25
Year 1 Year 2 Year 3 Year 4 Year 5 Median
130 126.00 127.25 1.02
116 121.25 123.63 0.94 Qtr 1 0.91 0.88 0.90 0.94 0.91
98 121.75 121.50 0.81 Qtr 2 0.83 0.84 0.85 0.81 0.84
141 Qtr 3 1.15 1.24 1.17 1.25 1.21
132 Qtr 4 1.05 1.06 1.06 1.02 1.06
Try this – Seasonal Indices
• Use the MA(7) to calculate a seasonal index for the
shoe shop in the Trafford Centre
• Interpret the result
Date Sales (in Pairs MA(7) Actual / MA(7)
of Shoes)
9.3.2013 132
10.3.2013 110
11.3.2013 45
12.3.2013 35 62
13.3.2013 23 64
14.3.2013 36 66
15.3.2013 54
16.3.2013 145
17.3.2013 121
De-seasonalized data
Date Sales (in Pairs MA(7) Actual / MA(7)
of Shoes)
9.3.2013 132
10.3.2013 110
11.3.2013 45
12.3.2013 35 62 35/62=0.56
13.3.2013 23 64 23/64=0.36
14.3.2013 36 66 36/66=0.55
15.3.2013 54
16.3.2013 145
17.3.2013 121
Interpretation
Date Actual / MA(7)

9.3.2013

10.3.2013

11.3.2013

Tuesday
35/62=0.56
Wednesday
23/64=0.36
Thursday
36/66=0.55
15.3.2013

16.3.2013

17.3.2013
A look towards - Forecasting

?
Forecasts for the example
Qtr Actual Trend S. Index Forecast
1 95 96.50 0.90 87
2 90 98.93 0.88 87 These forecasts
3 120 101.35 1.21 122
were obtained by
4 110 103.78 1.02 106
5 98 106.20 0.90 95
using a
6 92 108.63 0.88 95 multiplicative
7 140 111.05 1.21 134 model of the
8 120 113.48 1.02 115 form:
9 100 115.90 0.90 104
10 95 118.33 0.88 104
11 135 120.75 1.21 146 Ft = Tt*St
12 120 123.18 1.02 125
13 110 125.60 0.90 113 and then
14 120 128.03 0.88 112 rounding the
15 160 130.45 1.21 157 result.
16 130 125.55 1.02 128
Graph of actual versus forecasts
Demand
Actual versus forecasts
Actual
180
Forecast
160

140

120

100

80
Notice how good the forecasts are in this
60
case.
40
This is because we are only forecasting the
20
period over which we built the model.
0
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
Quarter
Summary: Classical
decomposition
The analysis stage identifies the basic features of a time series i.e.
trend (T), seasonals (S), cyclicals (C) and irregulars (I).

Each feature is modelled and combined to produce forecasts at period


(t) by either:

Ft = Tt + St + Ct +It (additive model)

Ft = Tt*St*Ct*It (multiplicative model)

Generally, the multiplicative model gives better forecasts.


The Real Aim of Forecasting

?
Qtr Actual Trend S. Index Forecast
1 95 96.50 0.90 87
2 90 98.93 0.88 87
3 120 101.35 1.21 122
Try this: 4 110 103.78 1.02 106
5 98 106.20 0.90 95
6 92 108.63 0.88 95
7 140 111.05 1.21 134
Model for trend:
8 120 113.48 1.02 115
y = 2.425x + 94.075 9 100 115.90 0.90 104
10 95 118.33 0.88 104
Model for seasonal 11 135 120.75 1.21 146
variation (seasonal 12 120 123.18 1.02 125
index):
13 110 125.60 0.90 113
14 120 128.03 0.88 112
Q1 0.90 15 160 130.45 1.21 157
Q2 0.88 16 130 125.55 1.02 128
Q3 1.21 17 NA 135.30 0.90 121.77
Q4 1.02 18 NA 137.73 0.88 121.20
19 NA 140.15 1.21 169.58
Ft = Tt*St 20 NA 142.58 1.02 145.43
Outline
Worked example
• The “art” of forecasting
• Steps of time series analysis and
forecasting
Quarter Sales (in 100s)
A worked Q1 2008 6.51
Q2 2008 23.08
example Q3 2008
Q4 2008
39.88
53.27
Q1 2009 69.82
A firm has recorded the
Q2 2009 147.53
sales for a particular product
Q3 2009 180.36
at the end of each quarter
Q4 2009 189.43
over the last 4 years as
Q1 1010 213.48
follows:
Q2 2010 388.61
Q3 2010 434.37
Q4 2010 410.20
Q1 2011 426.12
Q2 2011 741.31
Q3 2011 756.37
Q4 2011 718.62
Q1 2012 727.46
Graph of time series

Cyclicals?
Sales over the past four years Trend?
900.00

800.00

700.00 Seasonal
600.00 Variation?
Sales (in £)

500.00

400.00

300.00

200.00

100.00

0.00
Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4 Q1
2008 2008 2008 2008 2009 2009 2009 2009 1010 2010 2010 2010 2011 2011 2011 2011 2012
Seasonal component TS MA(3)
6.51
23.08 23.16
• First step requires 39.88 38.74
53.27 54.32
calculation of a moving 69.82 90.21
average for an appropriate 147.53 132.57
number of periods 180.36 172.44
189.43 194.43
213.48 263.84
388.61 345.49
• Centred moving average is 434.37 411.06
then plotted as a function of 410.20 423.56
426.12 525.88
the centre of the window 741.31 641.27
756.37 738.77
718.62 734.15
727.46
Seasonal TS MA(4) Adjusted MA(4)

component (2) 6.51


23.08 30.68
39.88 46.51 38.60

• Extra work is required 53.27


69.82
77.62
112.74
62.07
95.18
for an even window 147.53 146.79 129.77
180.36 182.70 164.74
size, as the centre of 189.43 242.97 212.84
the window falls 213.48 306.47 274.72
388.61 361.66 334.07
between two numbers 434.37 414.82 388.24

• Need to introduce an 410.20


426.12
503.00
583.50
458.91
543.25
extra column 741.31 660.61 622.05
756.37 735.94 698.27
(Adjusted Moving 718.62
Average) 727.46
Calculation of a seasonal
index
Quarter TS MA(4) Adjusted MA(4) Index Index is obtained as
TS divided by
Q1 2008 6.51
Adjusted MA(4)
Q2 2008 23.08 30.68
Q3 2008 39.88 46.51 38.60 1.03
Q4 2008 53.27 77.62 62.07 0.86
Q1 2009 69.82 112.74 95.18 0.73
Q2 2009 147.53 146.79 129.77 1.14
Q3 2009 180.36 182.70 164.74 1.09
Q4 2009 189.43 242.97 212.84 0.89
Q1 1010 213.48 306.47 274.72 0.78
Q2 2010 388.61 361.66 334.07 1.16
Q3 2010 434.37 414.82 388.24 1.12
Q4 2010 410.20 503.00 458.91 0.89
Q1 2011 426.12 583.50 543.25 0.78
Q2 2011 741.31 660.61 622.05 1.19
Q3 2011 756.37 735.94 698.27 1.08
Q4 2011 718.62
Q1 2012 727.46
Adjustment of
seasonal index
Index

1.03
2008 2009 2010 2011 Mean Adjusted
0.86
0.73 Q1 0.73 0.78 0.78 0.76 0.79
1.14
1.09 Q2 1.14 1.16 1.19 1.16 1.20
0.89
0.78 Q3 1.03 1.09 1.12 1.08 1.08 1.11
1.16
1.12 Q4 0.86 0.89 0.89 0.88 0.91
0.89 3.89 4.00
0.78
1.19
1.08 Adjusted Index is obtained as Mean*Expected Sum/Sum
Use of the seasonal index
to de-seasonalize the data
Seasonal
Quarter TS Index Deseasonalized TS
Q1 2008 6.51 0.79 8.28
Q2 2008 23.08 1.20 19.28
Deseasonalized data is Q3 2008 39.88 1.11 35.88
obtained by dividing Q4 2008 53.27 0.91 58.82
the original time series Q1 2009 69.82 0.79 88.87
data by the seasonal Q2 2009 147.53 1.20 123.23
index Q3 2009 180.36 1.11 162.27
Q4 2009 189.43 0.91 209.16
Q1 1010 213.48 0.79 271.75
Q2 2010 388.61 1.20 324.58
Q3 2010 434.37 1.11 390.80
Q4 2010 410.20 0.91 452.92
Q1 2011 426.12 0.79 542.42
Q2 2011 741.31 1.20 619.18
Q3 2011 756.37 1.11 680.50
Q4 2011 718.62 0.91 793.48
Q1 2012 727.46 0.79 922.03
Original graph of time series

900.00

800.00

700.00

600.00
Sales (in £)

500.00

400.00

300.00

200.00

100.00

0.00
Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4 Q1
2008 2008 2008 2008 2009 2009 2009 2009 1010 2010 2010 2010 2011 2011 2011 2011 2012
Visualization of de-
seasonalized data Form of trend?
1000.00

900.00

800.00
Sales (in 100s)

700.00

600.00

500.00

400.00

300.00

200.00

100.00

0.00
0 2 4 6 8 10 12 14 16 18

Quarter
1000.00

How can we

Sales (in 100s)


900.00
800.00
700.00
600.00

model trend? 500.00


400.00
300.00
200.00
Quarter TS Adjusted MA(4) 100.00
Q1 2008 6.51 0.00
0 5 10 15 20
Q2 2008 23.08 Quarter
Q3 2008 39.88 38.60
Q4 2008 53.27 62.07
Q1 2009 69.82 95.18
Q2 2009 147.53 129.77 Simplest approach: A model
Q3 2009 180.36 164.74 of trend could calculated as the
Q4 2009 189.43 212.84 median of the Adjusted MA(4):
Q1 1010 213.48 274.72 In this case 274.72
Q2 2010 388.61 334.07
Q3 2010 434.37 388.24 Limitation: Cannot capture
Q4 2010 410.20 458.91 upwards or downwards trend
Q1 2011 426.12 543.25
Q2 2011 741.31 622.05 Preferable approach:
Q3 2011 756.37 698.27 Estimate trend using regression
Q4 2011 718.62 analysis
Q1 2012 727.46
Visualization of
deseasonalized Suitable model?
1000.00

900.00
data
800.00
Sales (in 100s)

700.00

600.00

500.00

400.00

300.00

200.00

100.00

0.00
0 2 4 6 8 10 12 14 16 18

Quarter
Note the move from categorical labels (Quarters) to a
numerical ordering (x-axis) to perform the linear
regression and evaluate the resulting model.
Linear trend?
1000.00
y = 55.82x - 166.89
R² = 0.9471
800.00
Sales (in 100s)

600.00

400.00

200.00

0.00
0 2 4 6 8 10 12 14 16 18

-200.00
Quarter
Polynomial trend?
1000.00
y = 2.9997x2 + 1.8254x + 4.0981
900.00
R² = 0.999
800.00
Sales (in 100s)

700.00

600.00

500.00

400.00

300.00

200.00

100.00

0.00
0 2 4 6 8 10 12 14 16 18

Quarter
Forecasting
Seasonal
TS Index Trend Forecast
6.51 0.79 8.92 7.01
23.08 1.20 19.75 23.64
39.88 1.11 36.57 40.65
53.27 0.91 59.39 53.79
In a multiplicative model, the 69.82 0.79 88.22 69.30
forecast is obtained as 147.53 1.20 123.04 147.31
180.36 1.11 163.86 182.13
Forecast=Trend*Seasonal Index 189.43 0.91 210.68 190.81
(assuming no cyclical component 213.48 0.79 263.50 207.01
and ignoring the irregular 388.61 1.20 322.32 385.90
component), 434.37 1.11 387.14 430.30
410.20 0.91 457.96 414.76
426.12 0.79 534.78 420.12
741.31 1.20 617.59 739.42
756.37 1.11 706.41 785.17
718.62 0.91 801.23 725.64
727.46 0.79 902.04 711.69
Graphical comparison
Comparison Extrapolation

2000.00

1800.00

1600.00

1400.00

1200.00
Sales (in 100s)

1000.00
Forecast
800.00
TS
600.00

400.00

200.00

0.00
0.00 5.00 10.00 15.00 20.00 25.00 30.00

Quarters
Forecast Error
Compare forecasts with actuals:
- Graphically
- Quantitative measures of forecast error, e.g. based on the mean or
average of the differences between actuals and forecasts
– MAE (Mean Absolute Error)
– MSE (Mean Square Error)

MAE and MSE are known as ‘absolute’ measures and can be used to
compare different forecasts of the same time series (e.g. to select the
best forecasting model).

Comparisons between different time series:


Need to use ‘relative’ measures such as:
– MAPE (Mean Absolute Percentage Error)
Mean MAE=5.09
MAE and MSE Mean MSE=80.53

Forecast TS MAE MSE


1.00 7.01 6.51 0.50 0.25
2.00 23.64 23.08 0.56 0.32
3.00 40.65 39.88 0.77 0.59
4.00 53.79 53.27 0.52 0.28
5.00 69.30 69.82 0.51 0.26
6.00 147.31 147.53 0.22 0.05
7.00 182.13 180.36 1.77 3.13
8.00 190.81 189.43 1.37 1.89
9.00 207.01 213.48 6.48 41.98
10.00 385.90 388.61 2.70 7.31
11.00 430.30 434.37 4.07 16.54
12.00 414.76 410.20 4.56 20.80
13.00 420.12 426.12 6.01 36.07
14.00 739.42 741.31 1.89 3.59
15.00 785.17 756.37 28.80 829.32
16.00 725.64 718.62 7.02 49.27
17.00 708.64 727.46 18.82 354.33
5.09 80.35
The Art of Forecasting
Forecasting
Past and present The Future

Forecasts
Knowledge and
Experience EXTRAPOLATION predictions
Insight to plan
ahead

Warning: the past might not be indicative of the future


Types of forecasting

Causal:
Price Demand
 

Past and
present Future
Time series: demand demand
over time over time
Practical Relevance of Forecasting
Forecasting is both ‘art’
and ‘science’

Forecasts
Long & short term
forecasting
Distinction between
• long-term and
• short-term forecasting
Key difference: The number of periods that are
forecast ahead from the present time.
In general: The further ahead the less likely
(accurate) the forecasts will be.
Application: For operational planning we are
usually interested in short-term forecasting
whilst for strategic planning we are interested
in long-term forecasting.
Time Series forecasting

The past The future

1 2 3 4 5 6 7 8 9

Start of the Point from which


time series forecasts are made
Steps of Time Series Analysis
and Forecasting
A basic time series forecasting
methodology
Collect sample data

Examine and clean data

Split data

Analyse data

Select/construct models

Test and validate models

Forecast (stating assumptions)


Examine and clean the data
• Outliers
• Changes in Trend
• Level Shifts
• Unusual Last Period
• Irregular Events/Unexpected
Events / Shocks
• Expected Non-periodic Events
Outliers
• Outliers are irregular points – easily(?)
distinguished from the rest of the series

Outliers

How do you spot an outlier?


Change in Trend
• Changes in Trend are changes in the
recent trend of a series versus the
long trend
Change
in Trend

Lancaster Centre for Forecasting


Level Shift
• Level Shifts are abrupt changes in
level of a series

Level Shift
Special Events
• Such as Promotions, strikes etc as well
as Earthquakes etc
If this series stands for
monthly Check Ups in NHS
centres …

ie. this point here could


resemble an open invitation
from PCTs for a free Check Up
Forecasting is both:
Qualitative and Quantitative

• Sampling – collecting data and knowledge


• Data cleaning – personal insight
• Examine data – pattern recognition
• Initial selection of model(s) – experience
• Data analysis – calculate components and indices
• Modelling – construct model(s) and set parameters
• Test models and select – choose and apply measures
• Validate and tune – forecast and change parameters
• Base-line forecasts – implement model
• Modify base-line forecasts – insight, consensus, etc
Quantitative approaches
to forecasting
Are often categorised in terms of:
•Decomposition (aka ‘Classical’ Decomposition)
•Exponential Smoothing
•ARMA/ARIMA (Box-Jenkins) methods

However, they are all related and essentially


belong to
one large family of forecasting methods.
NOTE: Sometimes better forecasts can be
obtained by combining the results from
several methods

You might also like