Sunteți pe pagina 1din 67

Timeline Values Forecast Lower Confidence Bound

1 4.8
2 4.1
3 6
4 6.5
5 5.8
6 5.2
7 6.8
8 7.4
9 6
10 5.6
11 7.5
12 7.8
13 6.3
14 5.9
15 8
16 8.4 8.4 8.40
17 #NAME? #NAME?
18 #NAME? #NAME?
19 #NAME? #NAME?
20 #NAME? #NAME?
21 #NAME? #NAME?
22 #NAME? #NAME?
23 #NAME? #NAME?
24 #NAME? #NAME?
25 #NAME? #NAME?
26 #NAME? #NAME?
27 #NAME? #NAME?
28 #NAME? #NAME?
29 #NAME? #NAME?
30 #NAME? #NAME?
Upper Confidence Bound Statistic Value
Alpha 0.50
Beta 0.00
Gamma 0.00
MASE 0.22
SMAPE 0.03
MAE 0.20
RMSE 0.27

5
8.40
4 #NAME?

3 #NAME?

2
#NAME?
#NAME?
1
#NAME?
0 #NAME?
1#NAME?
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21

#NAME? Values Forecast Lower Confidence Bound Upper


#NAME?
#NAME?
#NAME?
#NAME?
#NAME?
#NAME?
4 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30

r Confidence Bound Upper Confidence Bound


Yt
Year Quarter Time, t Sales
Year 1 1 1 4.8
2 2 4.1
3 3 6 9
4 4 6.5 8
Year 2 1 5 5.8 7
2 6 5.2 6
3 7 6.8
5
4 8 7.4
4
Year 3 1 9 6
2 10 5.6 3

3 11 7.5 2
4 12 7.8 1
Year 4 1 13 6.3 0
0 2 4
2 14 5.9
3 15 8
4 16 8.4
Sales
9
8
7
6
5
4
3
2
1
0
0 2 4 6 8 10 12 14 16 18
Classical Multiplicative Model: Yt = It * Tt * St

1 2 3

Quarter #Yt -- Actual Sales Moving Average


Year Quarter Time, t Sales MA(4)
Year 1 1 1 4.8
2 2 4.1
3 3 6 5.35
4 4 6.5 5.60
Year 2 1 5 5.8 5.88
2 6 5.2 6.08
3 7 6.8 6.30
4 8 7.4 6.35
Year 3 1 9 6 6.45
2 10 5.6 6.63
3 11 7.5 6.73
4 12 7.8 6.80
Year 4 1 13 6.3 6.88
2 14 5.9 7.00
3 15 8 7.15
4 16 8.4
Year 5 1 17
2 18
3 19
4 20
Yt = It * Tt * St

(Baseline)
4 5 6a 6a
Centered
Moving Seasonality Seasonal Seasonal
Average Contributions16 Components Components
CMA(4) Yt/CMA(4) 14 St St - Adjusted

12

5.48 10
5.74
8
5.98
6.19 6
6.33
4
6.40
Quarter

3
6.54
6.68 Year Year 1 Year 2 Year 3
6.76
6.84
6.94 Sales CMA(4)

7.08
1 2 3
1.095890411
0.9707112971 0.8404040404 1.0750988142
0.9177820268 0.8389513109 1.1090573013
0.9081081081 0.8339222615
0.9322004773 0.8377592042 1.0933488422
0.0016534166 0.0016534166 0.0016534166
0.9305470607 0.8361057877 1.0916954256
7 8 9 10

Data Trend Cycle and


Deseasonalised Components Irregular Cycle
Yt/St Tt Ct, It Ct (MA) CMA
2

Year 2 Year 3 Year 4

Sales CMA(4)
4
1.1328976035
1.15625
1.1407678245

1.1433051427 4.0066136664 0.0066136664


0.0016534166 4 0.0016534166
1.1416517261
Forecast 1 Forecast 2
Ct Tt*St Tt*St*Ct

Quarter Ct
1 #DIV/0!
2 #DIV/0!
3 #DIV/0!
4
Classical Multiplicative Model: Yt = It * Tt * St

1 2 3

Quarter #Yt -- Actual Sales Moving Average


Year Quarter Time, t Sales MA(4)
Year 1 1 1 4.8
2 2 4.1
3 3 6 5.35
4 4 6.5 5.6
Year 2 1 5 5.8 5.875
2 6 5.2 6.075
3 7 6.8 6.3
4 8 7.4 6.35
Year 3 1 9 6 6.45
2 10 5.6 6.625
3 11 7.5 6.725
4 12 7.8 6.8
Year 4 1 13 6.3 6.875
2 14 5.9 7
3 15 8 7.15
4 16 8.4
Year 5 1 17
2 18
3 19
4 20

SUMMARY OUTPUT

Regression Statistics
Multiple R 0.9595786157
R Square 0.9207911196
Adjusted R Square 0.9151333425
Standard Error 0.2126712474
Observations 16

ANOVA
df SS MS F
Regression 1 7.360933 7.3609325797 162.7478587703
Residual 14 0.633207 0.0452290595
Total 15 7.994139
CoefficientsStandard Error t Stat P-value
Intercept 5.0996100949 0.111526 45.7258562762 1.209866355E-016
Time, t 0.1471387159 0.011534 12.7572669005 4.247717297E-009
Yt = It * Tt * St

(Baseline)
4 5 6a 6a
Centered
Moving Seasonality Seasonal Seasonal
Average Contributions Index Components
CMA(4) Yt/CMA(4) St St - Adjusted
0.93 0.93
0.84 0.84
5.48 1.10 1.09 1.09
5.74 1.13 1.14 1.14
5.98 0.97 0.93 0.93
6.19 0.84 0.84 0.84
6.33 1.08 1.09 1.09
6.40 1.16 1.14 1.14
6.54 0.92 0.93 0.93
6.68 0.84 0.84 0.84
6.76 1.11 1.09 1.09
6.84 1.14 1.14 1.14
6.94 0.91 0.93 0.93
7.08 0.83 0.84 0.84
1.09 1.09
1.14 1.14
0.93 0.93
0.84 0.84
1.09 1.09
1.14 1.14

Significance F
4.248E-009
Lower 95% Upper 95% Lower 95.0% Upper 95.0%
4.86041117 5.3388090238 4.860411166 5.3388090238
0.12240135 0.1718760802 0.1224013515 0.1718760802

1 2 3
1.095890411
0.9707112971 0.8404040404 1.0750988142
0.9177820268 0.8389513109 1.1090573013
0.9081081081 0.8339222615
0.9322004773 0.8377592042 1.0933488422
0.0016534166 0.0016534166 0.0016534166
0.9305470607 0.8361057877 1.0916954256
7 8 9 10

Data Trend Cycle and


Deseasonalised Components Irregular Cycle
Yt/St Tt Ct, It Ct (MA) CMA
5.16 5.25 0.98
4.90 5.39 0.91
5.50 5.54 0.99 0.97 0.98
5.70 5.69 1.00 0.99 1.01
6.23 5.84 1.07 1.03 1.03
6.22 5.98 1.04 1.03 1.04
6.23 6.13 1.02 1.04 1.03
6.48 6.28 1.03 1.02 1.02
6.45 6.42 1.00 1.02 1.02
6.69 6.57 1.02 1.02 1.01
6.87 6.72 1.02 1.01 1.01
6.84 6.87 1.00 1.00 1.00
6.77 7.01 0.97 0.99 0.99
7.05 7.16 0.99 0.99 0.99
7.33 7.31 1.00 0.99
7.36 7.45 0.99
7.60
7.75
7.90
8.04
Upper 95.0%
5.3388090238
0.1718760802

4
1.1328976035
1.15625
1.1407678245

1.1433051427 4.0066136664 0.0066136664


0.0016534166 4 0.0016534166
1.1416517261
Forecast 1 Forecast 2
Ct Tt*St Tt*St*Ct 0.93
1.01 4.88 4.93 0.84
1.01 4.51 4.56 1.09
1.00 6.05 6.07 1.14
1.01 6.49 6.54 4.00
1.01 5.43 5.48
1.01 5.01 5.06
1.00 6.69 6.72 0.9322
1.01 7.16 7.21 0.837759
1.01 5.98 6.04 1.093349
1.01 5.50 5.55 1.143305
1.00 7.33 7.36
1.01 7.83 7.89
1.01 6.53 6.59
1.01 5.99 6.05
1.00 7.97 8.01
1.01 8.51 8.56
1.01 7.07 7.14
1.01 6.48 6.55
1.00 8.62 8.66
1.01 9.18 9.24

Quarter Ct Quarter St
1 1.01 1 0.93 0.93
2 1.01 2 0.84 0.84
3 1.01 3 1.09 1.09
4 1.01 4 1.14 1.14
Time Series Plot of Car Sales
9

3
Quarter 1 2 3 4 1 2 3 4 1 2 3
Year Year 1 Year 2 Year 3

Sales CMA(4)

Sales History / Forecast


10
9
8
7
6
5
4
Quarter

Year Year 1 Year 2 Year 3 Ye

Sales Tt*St*Ct
Car Sales

1 2 3 4 1 2 3
Year 3 Year 4

MA(4)

orecast
3

ear 3 Year 4 Year 5

*St*Ct
Classical Multiplicative Model: Yt = It * Tt * St
Yt
Time, t Year Quarter Sales MA(4)
1 Year 1 1 4.8
2 2 4.1
3 3 6 5.35
4 4 6.5 5.6
5 Year 2 1 5.8 5.875
6 2 5.2 6.075
7 3 6.8 6.3
8 4 7.4 6.35
9 Year 3 1 6 6.45
10 2 5.6 6.625
11 3 7.5 6.725
12 4 7.8 6.8
13 Year 4 1 6.3 6.875
14 2 5.9 7
15 3 8 7.15
16 4 8.4
17 Year 5 1
18 2
19 3
20 4

SUMMARY OUTPUT

Regression Statistics
Multiple R 0.9595786157
R Square 0.9207911196
Adjusted R Square 0.9151333425
Standard Error 0.2126712474
Observations 16

ANOVA
df SS MS
Regression 1 7.3609325797 7.3609325797
Residual 14 0.6332068323 0.0452290595
Total 15 7.994139412

Coefficients Standard Error t Stat


Intercept 5.0996100949 0.111525743 45.725856276
Time, t 0.1471387159 0.0115337178 12.7572669
del: Yt = It * Tt * St
Baseline Yt/CMA(4) SeasonalcompoDeseasonalised Trend function
CMA(4) St, It St Yt/St Tt Forecast
0.93 5.15 5.25 4.89
0.84 4.89 5.39 4.52
5.48 1.10 1.09 5.49 5.54 6.06
5.74 1.13 1.14 5.69 5.69 6.50
5.98 0.97 0.93 6.22 5.84 5.44
6.19 0.84 0.84 6.21 5.98 5.01
6.33 1.08 1.09 6.22 6.13 6.70
6.40 1.16 1.14 6.47 6.28 7.18
6.54 0.92 0.93 6.44 6.42 5.99
6.68 0.84 0.84 6.68 6.57 5.50
6.76 1.11 1.09 6.86 6.72 7.35
6.84 1.14 1.14 6.82 6.87 7.85
6.94 0.91 0.93 6.76 7.01 6.54
7.08 0.83 0.84 7.04 7.16 6.00
1.09 7.32 7.31 7.99
1.14 7.35 7.45 8.52
0.93 7.60 7.09
0.84 7.75 6.49
1.09 7.90 8.63
1.14 8.04 9.19

F Significance F
162.7479 4.247717296668E-009

P-value Lower 95% Upper 95% Lower 95.0% Upper 95.0%


1.21E-016 4.860411166 5.3388090238 4.860411166 5.33881
4.25E-009 0.1224013515 0.1718760802 0.1224013515 0.17188
Time Series Plot of Car Sales
10
9
8
7
6
5
4
3
Quarter

2
Year Year 1 Year 2 Year 3 Year

Sales CMA(4) Forecast Deseasonalised

Quarter St
1 0.93 0.93
2 0.84 0.84
3 1.09 1.09
4 1.14 1.14
Car Sales
3

r3 Year 4

Deseasonalised
Sales Demand Forecast
Agriculture
Manufacturing
Airports
Maritime/Seaports
Healthcare / Epidermic Outbreak
Logistics / Supply Chains / Procurement
Retails
Inflation
Employement / Unemployement
Real Estate
Sports
Immigration
Stock marget margins

Planning & Budgeting

Tools Need: Basic Excel Commands / Functionalities


Year Quarter Sales (1000s)
2013 Year 1 1 4.8
2 4.1
3 6
4 6.5
2014 Year 2 1 5.8
2 5.2
3 6.8
4 7.4
2015 Year 3 1 6
2 5.6
3 7.5
4 7.8
2016 Year 4 1 6.3
2 5.9
3 8
4 8.4
2017 Year 5 1
2
3
4
Quarterly sales data.
Quarterly: Data is captured once every quarter

What are we measuring/recording? Why are we doing this?


Historical Time Series Data
We want to study and understand the historical behaviour of our variable of interest, namely sales

Goal
We want to be able to provide reliable sales forecast, say for year 5
doing this?

nterest, namely sales over time


TIME SERIES

Is a collection of data recorded over a period of time (daily, weekly, m


an analysis of history, that can be used by management to make cur
decisions and plans based on long-term forecasting. It usually assum
pattern to continue into the future

Components of Time Series

1 Trend: This is the direction of movement of the data over a re


It is indicative of the overall direction of the time series data

2 Cyclical Fluctuations: These are deviations from the trend du


For example, considering the GDP over a prolong period, an upward trend wo

3 Seasonal Fluctuations: These are generally patterns that rep


For example, high sales of soft drinks during warm periods. Increased sales o

4 Irregular: Departures from the norm may be caused by speci


They can occur randomly and thus cannot be predicted.
(daily, weekly, monthly, quarterly, yearly),
ment to make current
It usually assumes past

the data over a relatively long period of time, either upwards or downwards

rom the trend due to general economic conditions.


d, an upward trend would be evident. Also evident in this series would be movement around the trend at the

patterns that repeat (annually) over an extended period of time


ods. Increased sales of gift items during christmas

e caused by special events may just represent random noise in the series.
nwards

ound the trend at the economy rises or declines


Mathematical Representation of Time Series
Time Series data can be represented by the following mathematical expressio

Yt = f(Tt, Ct, St, Rt)

where Yt is the actual value of the data in the time series at time t
Tt is the trend component at time at time t
Ct is the cyclic component at time at time t
St is the cyclic component at time at time t
Rt is the random component at time at time t

The specific form of this equation could be additive:

Y t = T t + Ct + S t + R t

Other forms exist. The specification most commonly used is the multiplicative form:

Y t = T t * C t * S t * Rt

Thus, the changes in the actual values of Y t are determined by four factors.
Our task is to decompose the time series of Y into its four components.
ime Series
athematical expression:

series at time t

ultiplicative form:
Seasonality / Seasonal Fluctuations:
The process of decomposing the time series data into its components, starts with identif
This allows for computing the trend.

The Moving Average Method --- Isolate Seasonal fluctu


1 Useful in smoothing time series to see its trend
2 Basic method used in measuring seasonal fluctuation
3 Applicable when time series follows fairly linear trend that have definite rhythmic patter
nts, starts with identifying and removing the seasonal factor from the series.

easonal fluctuations

finite rhythmic pattern


1 Visualize the data: Line Charts, Plots, Bubble Maps,
It allows for visual inspection of the data, conceptualize interaction a
What do we see in our historical data?
Cycles within a year, Yearly seasonal behaviour, overal upward trend
Did you observe any irregularities/randomness/variability in the data?

2 Add a time code column to the data


To allow for consistent ordering of the quarterly data

3 Smooth out the seasonal (and noise/random) effect inherent in the da


Add a new column and compute moving average with period 4, since

4 Centeralize the moving average to reflect actual positions since our p


Compute moving average with period 2 on the MA column
The center of two off centers falls back to center

5 Plot the CMA rigth on top of the historical data


Now we can see the difference between the CMA(4) and the historica
In column 7, we will plot the deseasonalized data against the historic

6 Next we account for the contribution of the seasonal and irregular co


How much of the original data was of S t and It ?
We want to have some insight on the S t and It
Let us extract the St and It Divide column 2 by column 4

7 Get rid of It and then focus on St - Column 6


Quantify the seasonal component
We are going to have 4 seasonal indexes (4 periods) --- Seasonal inde
Logic: Average each St and It (combined) for each quarter and will ge

8 Next, we deseasonalise the data - Column 7


Plot the deseasonalized data on top of the historical data for visualiza

9 Now we have to move on to accounting for the trend component


9.1 Run a Simple Linear Regression
Using the deseasonalized data as our response (Y) variable and time
Use the Excel Data Analysis Tool Pack to perform the Regression Anal
Use the coefficients obtained from regression in deriving the trend co
Y = mX + C m = Slope; C = Intercept
lize interaction among variables, perceive the overal trend of the historical data

ral upward trend?


bility in the data?

inherent in the data by the use of the Moving Average technique


th period 4, since we have quarterly data. Use period of 12 if you are dealing with mo

sitions since our period is an even number


Remember:
Steps 3 and 4 are for smooting purposes, to get rid of the seasonality/ir

and the historical data.


ainst the historical data for better visual inspection/investigation

l and irregular components to the overal behavoir of the historical data

Remember:
y column 4 We are using the multiplicative time series model: Yt

--- Seasonal indexes for quarter 1, 2, 3, and 4


uarter and will get rid of irregularities Remember:
The cycle lasts for four seasons (One

Yt / St
data for visualization and appreciate the seasonal effects

d component
ariable and time (t) as independent variable
e Regression Analysis Again, Remember:
ving the trend components We are using the multiplicative time series m
torical data

e dealing with mothly data

the seasonality/irregularity effects/components

series model: Yt = St * It * Ct * Tt

four seasons (One year)


Again, Remember:
tive time series model: Y t = St * I t * C t * T t
Error or Residual = Actual - Forecast

Month Sales Forecast 1 Forecast 2 Forecast 3 Forecast 4


1 10 12 8 5 15
2 20 18 22 25 25
3 15 13 17 10 20
4 25 27 23 30 30
5 35 33 37 30 40
6 40 42 38 45 45

Month Error 1 Error 2 Error 3 Error 4


1 -2 2 5 -5
2 2 -2 -5 -5
3 2 -2 5 -5
4 -2 2 -5 -5
5 2 -2 5 -5
6 -2 2 -5 -5

Forecast 1 and 2 are better than forecast 3 and 4


MAD = Mean Absolute Deviation Average Absolute Average Values of E

Month Sales Forecast Error Absolute Error


1 37 26 11 11
2 32 40 -8 8
3 28 45 -17 17
4 32 38 -6 6
5 32 22 10 10
6 32 22 10 10

Average Error 0
MAD 10.33333

Is this a good forecast ??


Absolute Average Values of Errors
APE = Absolute Percentage Error
MAPE = Mean Absolute Percentage Error
Percentage Error = (Actual - Forecast)/Actual

Series 1 MAD MAPE


3 9.63%

Absolute Percentge
Month Sales Forecast Error Error Error APE
1 20 23 -3 3 -0.15 0.15
2 30 27 3 3 0.1 0.1
3 40 43 -3 3 -0.075 0.075
4 50 47 3 3 0.06 0.06

Series 2 MAD MAPE


10 3.21%

Absolute Percentge
Month Sales Forecast Error Error Error APE
1 200 210 -10 10 -0.05 0.05
2 300 290 10 10 0.03333333 0.033333
3 400 390 10 10 0.025 0.025
4 500 510 -10 10 -0.02 0.02
SSE = Sum of Squared Forecast Error SSE
43
Series 1
Squared
Month Sales Forecast Error Error
1 20 23 -3 9
2 30 27 3 9
3 40 43 -3 9
4 50 46 4 16

SSE
400
Series 2
Squared
Month Sales Forecast Error Error
1 200 210 -10 100
2 300 290 10 100
3 400 390 10 100
4 500 510 -10 100
Month Sales Forecast 1 (Actual/Forecast)-1
1 10 8 0.25
2 20 25 -0.2
3 15 10 0.5
4 25 30 -0.1666666667
5 35 30 0.1666666667

Month Sales Forecast 2 (Actual/Forecast)-1


1 10 15 -0.3333333333
2 20 25 -0.2
3 15 20 -0.25
4 25 30 -0.1666666667
5 35 40 -0.125
Mean Bias Forecast 1 11.00% Std dev Bias Forecast 1
Std dev Bias Forecast 2
Mean Bias Forecast 2 -21.50%

95% Confindence Interval for Bias


Mean bias-2*Stdevbias/observations
Mean bias+2*Stdevbias/observations

We are 95% sure that our bias lies in these confidence intervals

0 not in 95%
Confidence
Interval: Bias is
significant
as Forecast 1 29.48%
as Forecast 2 8.05%

Insignificant Bias Significant Bias


Forecast 1 Forecast 2
-15.36% -28.70%
37.36% -14.30%

onfidence intervals

0 in 95%
Confidence
Interval: Bias is
not significant
TRENDLINE
Year Percentage Sales
2012 88
Percenta
2013 83 90
2014 80 88
2015 75 86 f(x) = - 4x + 8135.5999999994
84 R = 0.9925558313
2016 72
82
80
78
2017 67.6 76
74
72
70
2012 2012.5 2013 2013.5 20

Percentage Sales

Trendline: Line that best fits your data

R2 always lies between 0 and 1


closer to 1 means a better fit and conversely closer to 0 depicts a poor fit

R2 Percentage of variation in the dependent variable y that is explained by the d


Here in our example, our line explanis 99.26% of variations in our data

Year Percentage Revenue


2000 71
2001 83
2002 44 100
2003 82 90
2004 72 80
2005 88 70
f(x) = - 0.850
2006 53 60 R = 0.07346
2007 55 50
2008 75 40
2009 61 30
2010 40 20
2011 68 10
0
1998 2000 2002
40
30
20
10
2012 90 0
2013 70 1998 2000 2002
2014 72
2015 50
2016 44
Percentage Sales

= - 4x + 8135.5999999994
0.9925558313

2012.5 2013 2013.5 2014 2014.5 2015 2015.5 2016

Percentage Sales Linear (Percentage Sales)

oser to 0 depicts a poor fit

ble y that is explained by the dependent variable x.


of variations in our data

Percentage Revenue
100
90
80
70
f(x) = - 0.8504901961x + 1773.5490196078
60 R = 0.0734667106
50
40
30
20
10
0
1998 2000 2002 2004 2006 2008 2010 2012 2014 2016 2018
40
30
20
10
0
1998 2000 2002 2004 2006 2008 2010 2012 2014 2016 2018

Here in this example, our line can only explan about 7.35% of the variations in our data
About 93% remain unxplained
n our data
TRENDLINE PERFORMANCE
1 Standard Error of a Trendline / Regression
2 Outliers

STEYX 0.632456 No outliers

Year Percentage Sales Error


1970 88 0.4
1980 83 -0.6
1990 80 0.4
2000 75 -0.6
2010 72 0.4

Standard Error of the regression: 68% of your data points should lie w
95% of your data points should lie w
Any point outside 2 std error of trend

STEYX 27.63265 55.2653084638

Year Percentage Revenue Error


1995 71 -3.516
1996 83 9.5472
1997 44 -28.3896 120
1998 82 10.6736
1999 2 -68.2632 100
2000 88 18.8
80
2001 53 -15.1368
2002 55 -12.0736
60 f(x) = - 0
2003 75 8.9896 R = 0.05
2004 61 -3.9472 40
2005 4 -59.884
2006 68 5.1792 20

2007 90 28.2424
0
2008 70 9.3056 1990 1995
2009 72 12.3688
2010 50 -8.568
2011 44 -13.5048
2012 98 41.5584
2013 29 -26.3784
2014 61 6.6848
2015 40 -13.252
2016 5 -47.1888
Percentage Sales
90
88
86 f(x) = - 0.4x + 875.6
84
R = 0.9925558313
82
80
78
76
74
72
70
1970 1975 1980 1985 1990 1995 2000 2005 2010

data points should lie within 1 std error of trendline


data points should lie within 2 std error of trendline
utside 2 std error of trendline is considered an onutlier

Percentage Revenue

f(x) = - 0.9751552795x + 2012.2648221344


R = 0.0522578015

0 1995 2000 2005 2010 2015 2020


2020

S-ar putea să vă placă și