0% found this document useful (0 votes)
63 views44 pages

CH - 7 Time Series and Forecasting

Uploaded by

emtiyazulhoq
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
63 views44 pages

CH - 7 Time Series and Forecasting

Uploaded by

emtiyazulhoq
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 44

Time Series and Forecasting

Chapter 7

Click this text to get other Resources


Visit khbmh.github.io/mgt2nd for more.

McGraw-Hill/Irwin ©The McGraw-Hill Companies, Inc. 2008


Goals

⚫ Define the components of a time series


⚫ Compute moving average
⚫ Determine a linear trend equation
⚫ Compute a trend equation for a nonlinear trend
⚫ Use a trend equation to forecast future time periods
and to develop seasonally adjusted forecasts
⚫ Determine and interpret a set of seasonal indexes
⚫ Deseasonalize data using a seasonal index
⚫ Test for autocorrelation

2
Time Series

What is a time series?


– a collection of data recorded over a period of time
(weekly, monthly, quarterly)
– an analysis of history, it can be used by
management to make current decisions and plans
based on long-term forecasting
– Usually assumes past pattern to continue into the
future

Year 2005 2006 2007 2008 2009 2010 2011


Power
15.3 16.2 16.82 21.37 21.37 21.38 23.94
Consumption
3
Time Series

Monthly electricity consumption from January 2014 to December 2020 for Dhaka
4 city. (Source: Istiaque and Khan, 2018)
Components of a Time Series

⚫ Secular Trend
– A type of variation in a time series, in which the value of the
variable tending to increase or decrease over a long period
of time
⚫ Cyclical Variation
– the rise and fall of a time series over periods longer than
one year
⚫ Seasonal Variation
– Patterns of change in a time series within a year which tends
to repeat each year
⚫ Irregular Variation
– A condition in a time series in which the value of a variable is
completely unpredictable
5
Secular Trend
Year 2013 2014 2015 2016 2017 2018 2019
Power Consumption
43.01 48.04 51.86 61.48 65.86 70.31 76.85
(in B. K.Watts)
Cyclical Variation – Sample Chart

7
Seasonal Variation – Sample Chart

8
Identifying the Trend
• Attributes:
• Persistent, overall upward or downward pattern of several years duration
• Due to population, technology etc.
• Trend can be linear or curvilinear
• Free hand trend line is subject to slightly different interpretation
•Reasons for studying trends
• The study of secular trends allows us to describe a historical pattern
• Studying secular trend permits us to project past patterns, or trends, into
the future
• Studying secular trend allows to eliminate the trend component from the
series and thus reveal other components.
•Methods to identify trend
• Graphical Method
• Semi-Averages Method
• Moving Average Method
• Least Squares Method
9
Trend by Graphic Method
Year 2013 2014 2015 2016 2017 2018 2019
Power Consumption
43.01 48.04 51.86 61.48 65.86 70.31 76.85
(in B. K.Watts)
Trend by Semi-Average Method

Year 2005 2006 2007 2008 2009 2010 2011


Power
15.3 16.2 16.82 21.37 21.37 21.38 23.94
Consumption

Average Average
⚫ For even numbers of data, divide the data into two equal part.
Calculate arithmetic mean of each part. Plot them and then
connect the points.
⚫ For odd numbers of data, ignore the middle value and then do as
above. Average Average

Year 2013 2014 2015 X


2016 2017 2018 2019
Power Consumption
43.01 48.04 51.86 61.48 65.86 70.31 76.85
(in B. K.Watts)
11
Trend by Moving Average Method

⚫ Useful in smoothing time series to see its


trend
⚫ Basic method used in measuring seasonal
fluctuation
⚫ Applicable when time series follows fairly
linear trend that have definite rhythmic
pattern

12
Trend by Moving Average Method

Year Power 3 period 24.0

Consum moving 22.0


21.4 21.4 21.4
ption average
20.0

18.0 Power Consumption


16.8
2005 15.3 16.0 16.2 3 period moving
average

2006 16.2 16.1 14.0

12.0
2007 16.8 18.1
10.0
2008 21.4 19.9 2006 2007 2008 2009 2010

2009 21.4 21.4


2010 21.4 22.2
2011 23.9
13
Three-year and Seven-Year Moving Averages
8

4 Sales ($ millions)
3 Years Moving Average
7 Years Moving Average
3

15
Linear Trend by Least square method

⚫ The long term trend of many business series often


approximates a straight line

Linear Trend Equation : Y = a + bt
where :

Y − read "Y hat", is the projected value of the
variable of interest (response variable)

a − the Y - intercept
(estimated value of Y when t = 0)

b− the slope of the line


(average change in Y for each unit change in t )

t − any value of time (coded) that is selected

17
Linear Trend Plot

18
Linear Trend – Using the Least
Squares Method

⚫ Use the least squares method in Simple


Linear Regression (Chapter 13) to find the
best linear relationship between 2 variables
⚫ Code time (t) and use it as the independent
variable
⚫ E.g. let t be 1 for the first year, 2 for the
second, and so on (if data are annual)

19
Linear Trend – Using the Least Squares
Method: An Example

The sales of Jensen Foods, a small grocery


chain located in southwest Texas, since 2002
are:

Sales Sales
Year ($ mil.) Year t ($ mil.)
2002 7 2002 -2 7
2003 10 2003 -1 10
2004 9 2004 0 9
2005 11 2005 1 11
2006 13 2006 2 13
20
Sales
Year t ($ mil.)

2002 -2 7

2003 -1 10

2004 0 9

2005 1 11

2006 2 13

Visit khbmh.github.io/mgt2nd for more.

21
Linear Trend – Using the Least Squares
Method: An Example Using Excel

22
Fitting the Linear Trend
(Least Square Method)

Straight _ Line _ Equation



Y = a + bX
Slope :

b=
 XY − n X Y

 X − nX
2 2

INTERCEPT :
a = Y −bX
Fitting the Linear Trend
(Least Square Method)
⚫ Here
X = values of the independent variable
Y= values of dependent variable
X = mean of the values of independent variable
= mean of the values of dependent variable
Y
a = Y- intercept
b = slope

Y = estimated value of the dependent variable
Fitting the Linear Trend
(Least Square Method)
Year Power Consumption
X Y XY x2
2000 11.04 22080 4000000
2001 11.22 22451 4004001
2002 12.55 25125 4008004
2003 14.26 28563 4012009
2004 14.25 28557 4016016
2005 15.3 30677 4020025
2006 16.2 32497 4024036
2007 16.82 33758 4028049
2008 21.37 42911 4032064
2009 21.37 42932 4036081
2010 21.38 42974 4040100
2011 23.94 48143 4044121
2012 23.94 48167 4048144
X = 2006 Y= 17.20  XY = 448835  = 52312650
X 2

n= 13
Fitting the Linear Trend
(Least Square Method)

⚫ Slope, b = 1.172582
⚫ Intercept , a = -2334.997
⚫ Forecast for 2015 : 27.76 B. KWh
Fitting the Linear Trend
(Least Square Method) – Simplified
Calculation

⚫ If we can reduce time values in such a way


that ΣX= 0 than Mean of Xs become Zero
and the formula changes to:

Slope :
b=
 xY
and
x 2

INTERCEPT :
a =Y
Fitting the Linear Trend
(Least Square Method) – Simplified Calculation – Odd
# of data

Odd Number of Data

Year Power Consumption


X x= X-X bar Y xY x2

1989 -3 105 -315 9


1990 -2 116 -232 4
1991 -1 119 -119 1
1992 0 135 0 0
1993 1 156 156 1
1994 2 177 354 4
1995 3 208 624 9

X = 1992 Y= 145.14  xY = 468  = 28


x 2

n= 7
Fitting the Linear Trend
(Least Square Method)- Simplified (odd # of
data)

⚫ Slope, b = 16.71429
⚫ Intercept , a = 145.14
⚫ Linear equation,
Estimated Y = 145.14 + 16.71429x,
where x = (X - 1992)
⚫ What will be the forecast for year 1996?
Fitting the Linear Trend
(Least Square Method) – Simplified Calculation – Even
# of data

Even Number of Data

Power
Year Consumption
X X-X bar x=2 * (X-Xbar) Y xY x2
1988 -3.5 -7 98 -686 49
1989 -2.5 -5 105 -525 25
1990 -1.5 -3 116 -348 9
1991 -0.5 -1 119 -119 1
1992 0.5 1 135 135 1
1993 1.5 3 156 468 9
1994 2.5 5 177 885 25
1995 3.5 7 208 1456 49

0 0
X = 1991.5
n= 8
 xi = 0 Y = 139.25  XY = 1266  X 2
= 168
Fitting the Linear Trend
(Least Square Method)- Simplified (Even # of
data)

⚫ Slope, b = 7.535714
⚫ Intercept , a = 139.25
⚫ Linear equation,
Estimated Y = 139.25 + 7.536x,
where x = 2 * (X - 1991.5)
⚫ What will be the forecast for year 1996?

Visit khbmh.github.io/mgt2nd for more.


Nonlinear Trends

⚫ A linear trend equation is used when the data


are increasing (or decreasing) by equal
amounts
⚫ A nonlinear trend equation is used when the
data are increasing (or decreasing) by
increasing amounts over time
⚫ When data increase (or decrease) by equal
percents or proportions plot will show
curvilinear pattern

32
Quadratic (Second-Degree Trend)
Time-Series Forecasting Model

⚫ Used for forecasting trend


⚫ Relationship between response variable Y &
time X is a quadratic function
⚫ Coded years used
⚫ Quadratic model


Y = a + b x + cx 2
Quadratic Time-Series
Model Relationships
Y C>0 Y C>0

Year, X1 Year, X1

Y C<0 Y C<0

Year, X1 Year, X1
Quadratic Trend Model
When _ x = ( X − X ) _ and _  xi = 0

 Y = an + c x 2

 x Y = a x + c x
2 2 4

b=
 xY
x 2
Quadratic Trend Model
Y X X-Xbar x=(X-Xbar)*2 x^2 x^4 xY x^2.Y
2 94 -2.5 -5 25 625 -10 50
5 95 -1.5 -3 9 81 -15 45
2 96 -0.5 -1 1 1 -2 2
2 97 0.5 1 1 1 2 2
7 98 1.5 3 9 81 21 63
6 99 2.5 5 25 625 30 150
0 0 0 0
0 0 0 0
0 0 0 0
24 96.5 Sum 70 1414 26 312
6

Equation 1: 6a + 70c = 24

Equation 2: 70a + 1414c = 312

Equation 3: b= 0.371(approx)
a= 3.375(approx)
c= 0.054(approx)
Seasonal Variation

⚫ One of the components of a


time series
⚫ Seasonal variations are
fluctuations that coincide with
certain seasons and are
repeated year after year
⚫ Understanding seasonal
fluctuations help plan for
sufficient goods and materials
on hand to meet varying
seasonal demand
⚫ Analysis of seasonal
fluctuations over a period of
years help in evaluating
current sales

37
Seasonal Index

⚫ A number, usually expressed in percent, that


expresses the relative value of a season with
respect to the average for the year (100%)
⚫ Ratio-to-moving-average method
– The method most commonly used to compute the
typical seasonal pattern
– It eliminates the trend (T), cyclical (C), and
irregular (I) components from the time series

Visit khbmh.github.io/mgt2nd for more.


38
Seasonal Index – An Example

The table below shows the quarterly sales for Toys International for the
years 2001 through 2006. The sales are reported in millions of
dollars. Determine a quarterly seasonal index using the ratio-to-
moving-average method.

39
Step (1) – Organize time series data
in column form
Step (2) Compute the 4-quarter
moving totals
Step (3) Compute the 4-quarter
moving averages
Step (4) Compute the centered
moving averages by getting the
average of two 4-quarter moving
averages
Step (5) Compute ratio by dividing
actual sales by the centered
moving averages

40
Seasonal Index – An Example

41
Actual versus Deseasonalized Sales
for Toys International
Deseasonalized Sales = Sales / Seasonal Index

42
Actual versus Deseasonalized Sales for Toys
International – Time Series Plot using Minitab

43
Seasonal Index – An Excel Example
using Toys International Sales

44
Forecasting– An Example Using Excel

Given the deseasonalized linear equation for Toys International


sales as Ŷ=8.109 + 0.0899t, generate the seasonally adjusted
forecast for the each of the quarters of 2007

Ŷ Quarterly Forecast
(unadjusted Seasonal (seasonally adjusted
Quarter t forecast) Index forecast)
Winter 25 10.35675 0.765 7.923

Spring 26 10.44666 0.575 6.007

Summer 27 10.53657 1.141 12.022

Fall 28 10.62648 1.519 16.142

Ŷ X SI = 10.62648 X 1.519
Ŷ = 8.109 + 0.0899(28)

45
END OF CHAPTER 16

Click this text to get other Resources


Visit khbmh.github.io/mgt2nd for more.

46

You might also like