0% found this document useful (0 votes)
4 views65 pages

Statistics 2 Lecture 9

Uploaded by

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

Statistics 2 Lecture 9

Uploaded by

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

Basic Business Statistics

12th Edition
Global Edition

Chapter 16

Time-Series Forecasting

Copyright ©2012 Pearson Education Chap 16-1


Learning Objectives

In this chapter, you learn:


 About different time-series forecasting models:
moving averages, exponential smoothing, linear
trend, quadratic trend, exponential trend,
autoregressive models, and least-squares models
for seasonal data
 To choose the most appropriate time-series
forecasting model

Copyright ©2012 Pearson Education Chap 16-2


The Importance of Forecasting

 Governments forecast unemployment rates,


interest rates, and expected revenues from income
taxes for policy purposes
 Marketing executives forecast demand, sales, and
consumer preferences for strategic planning
 College administrators forecast enrollments to plan
for facilities and for faculty recruitment
 Retail stores forecast demand to control inventory
levels, hire employees and provide training

Copyright ©2012 Pearson Education Chap 16-3


Common Approaches
to Forecasting

Common Approaches
to Forecasting

Qualitative forecasting Quantitative forecasting


methods methods
 Used when historical data
are unavailable Time Series Causal
 Considered highly
subjective and judgmental  Use past data to predict
future values

Copyright ©2012 Pearson Education Chap 16-4


Time-Series Data

 Numerical data obtained at regular time


intervals
 The time intervals can be annually, quarterly,
monthly, weekly, daily, hourly, etc.
 Example:
Year: 2006 2007 2008 2009
2010
Sales: 75.3 74.2 78.5 79.7
80.2
Copyright ©2012 Pearson Education Chap 16-5
Time-Series Plot
A time-series plot is a two-dimensional
plot of time series data
 the vertical axis U.S. Inflation Rate
16.00
measures the variable 14.00
of interest 12.00
10.00
8.00
 the horizontal axis 6.00
corresponds to the 4.00
time periods 2.00
0.00
1983
1985
1987
1989
1991
1993
1995
1997
1999
2001
2003
2005
2007
2009
Copyright ©2012 Pearson Education Chap 16-6
Time-Series Components

Time Series

Trend Seasonal Cyclical Irregular


Component Component Component Component

Overall, Regular periodic Repeating Erratic or


persistent, long- fluctuations, swings or residual
term movement usually within a movements over fluctuations
12-month period more than one
year

Copyright ©2012 Pearson Education Chap 16-7


Trend Component

 Long-run increase or decrease over time


(overall upward or downward movement)
 Data taken over a long period of time

t re n d
Sales U pw a r d

Copyright ©2012 Pearson Education


Time Chap 16-8
Trend Component
(continued)

 Trend can be upward or downward


 Trend can be linear or non-linear

Sales Sales

Time Time
Downward linear trend Upward nonlinear trend

Copyright ©2012 Pearson Education Chap 16-9


Seasonal Component
 Short-term regular wave-like patterns
 Observed within 1 year
 Often monthly or quarterly

Sales
Summer
Winter
Summer
Winter Spring Fall

Spring Fall

Time (Quarterly)
Copyright ©2012 Pearson Education Chap 16-10
Cyclical Component
 Long-term wave-like patterns
 Regularly occur but may vary in length
 Often measured peak to peak or trough to
trough
1 Cycle
Sales

Year
Copyright ©2012 Pearson Education Chap 16-11
Irregular Component

 Unpredictable, random, “residual” fluctuations


 Due to random variations of
 Nature
 Accidents or unusual events
 “Noise” in the time series

Copyright ©2012 Pearson Education Chap 16-12


Does Your Time Series Have A
Trend Component?

 A time series plot should help you to answer


this question.

 Often it helps if you “smooth” the time series


data to help answer this question.

 Two popular smoothing methods are moving


averages and exponential smoothing.

Copyright ©2012 Pearson Education Chap 16-13


Smoothing Methods

 Moving Averages
 Calculate moving averages to get an overall
impression of the pattern of movement over time
 Averages of consecutive time series values for a
chosen period of length L

 Exponential Smoothing
 A weighted moving average

Copyright ©2012 Pearson Education Chap 16-14


Moving Averages
 Used for smoothing
 A series of arithmetic means over time

 Result dependent upon choice of L (length of

period for computing means)


 Examples:
 For a 5 year moving average, L = 5
 For a 7 year moving average, L = 7
 Etc.

Copyright ©2012 Pearson Education Chap 16-15


Moving Averages
(continued)
 Example: Five-year moving average
 First average:
Y1  Y2  Y3  Y4  Y5
MA(5) 
5

 Second average:

Y2  Y3  Y4  Y5  Y6
MA(5) 
5

 etc.

Copyright ©2012 Pearson Education Chap 16-16


Example: Annual Data
Year Sales
1 23 Annual Sales
2 40
60
3 25
4 27 50
5 32 40
6 48
Sales

30
7 33
20
8 37
9 37 10
10 50 0
11 40 1 2 3 4 5 6 7 8 9 10 11
etc… etc… Year

Copyright ©2012 Pearson Education Chap 16-17


Calculating Moving Averages
5-Year
Average Moving
Year Sales Year Average
1 2  3  4  5
1 23 3 29.4 3
5
2 40 4 34.4
3 25 5 33.0 23  40  25  27  32
29.4 
4 27 6 35.4 5
5 32 7 37.4
6 48 8 41.0
7 33 9 39.4
8 37 … …
9 37 etc…

10 50  Each moving average is for a


11 40 consecutive block of 5 years
Copyright ©2012 Pearson Education Chap 16-18
Annual vs. Moving Average

Annual vs. 5-Year Moving Average


The 5-year moving
average smoothes 60
the data and 50
makes it easier to 40
see the underlying
Sales

30
trend 20
10
0
1 2 3 4 5 6 7 8 9 10 11
Year

Annual 5-Year Moving Average

Copyright ©2012 Pearson Education Chap 16-19


Exponential Smoothing

 Used for smoothing and short term


forecasting (one period into the future)

 A weighted moving average


 Weights decline exponentially
 Most recent observation is given the highest
weight

Copyright ©2012 Pearson Education Chap 16-20


Exponential Smoothing (continued)

 The weight (smoothing coefficient) is W


 Subjectively chosen
 Ranges from 0 to 1
 Smaller W gives more smoothing, larger W gives
less smoothing
 The weight is:
 Close to 0 for smoothing out unwanted cyclical
and irregular components
 Close to 1 for forecasting

Copyright ©2012 Pearson Education Chap 16-21


Exponential Smoothing Model
 Exponential smoothing model

E1  Y1
Ei  WYi  (1  W )Ei 1
For i = 2, 3, 4, …
where:
Ei = exponentially smoothed value for period i
Ei-1 = exponentially smoothed value already
computed for period i - 1
Yi = observed value in period i
W = weight (smoothing coefficient), 0 < W < 1
Copyright ©2012 Pearson Education Chap 16-22
Exponential Smoothing Example
 Suppose we use weight W = 0.2
Time Forecast
Sales Exponentially Smoothed
Period from prior
(Yi) Value for this period (Ei)
(i) period (Ei-1)
E1 = Y 1
1 23 -- 23
since no
2 40 23.000 (.2)(40)+(.8)(23)=26.4 prior
3 25 26.400 (.2)(25)+(.8)(26.4)=26.12 information
4 27 26.120 (.2)(27)+(.8)(26.12)=26.296 exists
5 32 26.296 (.2)(32)+(.8)(26.296)=27.437
6 48 27.437 (.2)(48)+(.8)(27.437)=31.549 Ei 

7 33 31.549 (.2)(48)+(.8)(31.549)=31.840 WYi  (1  W )Ei 1


8 37 31.840 (.2)(33)+(.8)(31.840)=32.872
9 37 32.872 (.2)(37)+(.8)(32.872)=33.697
10 50 33.697 (.2)(50)+(.8)(33.697)=36.958
etc. etc. etc. etc.

Copyright ©2012 Pearson Education Chap 16-23


Sales vs. Smoothed Sales

 Fluctuations
have been 60
smoothed
50

40
 NOTE: the Sales
30
smoothed value in
this case is 20

generally a little low, 10


since the trend is 0
upward sloping and 1 2 3 4 5 6 7 8 9 10
Time Period
the weighting factor
Sales Smoothed
is only .2

Copyright ©2012 Pearson Education Chap 16-24


Forecasting Time Period i + 1
 The smoothed value in the current
period (i) is used as the forecast value
for next period (i + 1) :

Ŷi1 Ei

Copyright ©2012 Pearson Education Chap 16-25


Exponential Smoothing in Excel

 Use data analysis / exponential smoothing


 The “damping factor” is (1 - W)

Exponential Smoothing Time Sales Smoothed


1 23
60
50 2 40 23
40 3 25 26.4
Actual
Value

30 4 27 26.12
20 Forecast
5 32 26.296
10
6 48 27.4368
0
1 2 3 4 5 6 7 8 9 10 7 33 31.54944
8 37 31.83955
Data Point
9 37 32.87164
10 50 33.69731

Copyright ©2012 Pearson Education Chap 16-26


Exponential Smoothing in Minitab

 Use stat / time series / simple exp. smoothing

Smoothing Plot for Sales


Single Exponential Method
Variable
50
Actual
Fits
45 Smoothing Constant
Alpha 0.2

40 Accuracy Measures
MAPE 20.0118
Sales

MAD 7.1397
35 MSD 80.1601

30

25

20
1 2 3 4 5 6 7 8 9 10
Index

Copyright ©2012 Pearson Education Chap 16-27


There Are Three Popular Methods
For Trend-Based Forecasting

 Linear Trend Forecasting

 Nonlinear Trend Forecasting

 Exponential Trend Forecasting

Copyright ©2012 Pearson Education Chap 16-28


Linear Trend Forecasting

Estimate a trend line using regression analysis


Time  Use time (X) as the
Year Period Sales independent variable:
(X) (Y)
2004 0 20
2005 1 40 Ŷ b0  b1X
2006 2 30
In least squares linear, non-linear, and
2007 3 50 exponential modeling, time periods are
2008 4 70 numbered starting with 0 and increasing
by 1 for each time period.
2009 5 65

Copyright ©2012 Pearson Education Chap 16-29


Linear Trend Forecasting (continued)

The linear trend forecasting equation is:


Time
Year Period Sales Ŷi 21.905  9.5714 Xi
(X) (Y)
Sales trend
2004 0 20
2005 1 40 80
70
2006 2 30 60
50
2007 3 50
sales

40
2008 4 70 30
20
2009 5 65 10
0
0 1 2 3 4 5 6

Year
Copyright ©2012 Pearson Education Chap 16-30
Linear Trend Forecasting (continued)

 Forecast for time period 6 (2010):


Time
Period
Ŷ  21.905  9.5714 (6)
Year Sales
(X) (y)  79.33
2004 0 20
Sales trend
2005 1 40
2006 2 30 80
70
2007 3 50 60
2008 4 70 50
sales

40
2009 5 65 30
2010 6 ?? 20
10
0
0 1 2 3 4 5 6

Year
Copyright ©2012 Pearson Education Chap 16-31
Nonlinear Trend Forecasting
 A nonlinear regression model can be used when
the time series exhibits a nonlinear trend
 Quadratic form is one type of a nonlinear model:
2
Yi 0  1Xi  2 X   i
i

 Compare adj. r2 and standard error to that of


linear model to see if this is an improvement or
test significance of the quadratic term
 Can try other functional forms to get best fit
Copyright ©2012 Pearson Education Chap 16-32
Exponential Trend Model

 Another nonlinear trend model:


Xi
Yi β β0 1 εi

 Transform to linear form:

log(Yi ) log(β0 )  Xi log(β1 )  log( ε i )

Copyright ©2012 Pearson Education Chap 16-33


Exponential Trend Model (continued)

 Exponential trend forecasting equation:


ˆ ) b  b X
log(Yi 0 1 i

where b0 = estimate of log(β0)


b1 = estimate of log(β1)

Interpretation:
(β̂1  1) 100% is the estimated annual compound
growth rate (in %)

Copyright ©2012 Pearson Education Chap 16-34


Trend Model Selection Using
Differences
 Use a linear trend model if the first differences
are approximately constant
(Y2  Y1 ) ( Y3  Y2 )  ( Yn  Yn-1 )
 Use a quadratic trend model if the second
differences are approximately constant

[(Y3  Y2 )  ( Y2  Y1 )]  [(Y4  Y3 )  ( Y3  Y2 )]
 [(Yn  Yn-1 )  ( Yn-1  Yn-2 )]

Copyright ©2012 Pearson Education Chap 16-35


Trend Model Selection Using
Differences (continued)

 Use an exponential trend model if the


percentage differences are approximately
constant

(Y2  Y1 ) (Y3  Y2 ) (Yn  Yn-1 )


100%  100%   100%
Y1 Y2 Yn-1

Copyright ©2012 Pearson Education Chap 16-36


Autoregressive Modeling

 Used for forecasting


 Takes advantage of autocorrelation
 1st order - correlation between consecutive values
 2nd order - correlation between values 2 periods
apart
 pth order Autoregressive model:
Yi A 0  A 1Yi-1  A 2 Yi-2    A p Yi-p  δi
Random
Error
Copyright ©2012 Pearson Education Chap 16-37
Autoregressive Model:
Example DCOVA
The Office Concept Corp. has acquired a number of office
units (in thousands of square feet) over the last eight years.
Develop the second order Autoregressive model.

Year Units
02 4
03 3
04 2
05 3
06 2
07 2
08 4
09 6

Copyright ©2012 Pearson Education Chap 16-38


Autoregressive Model:
Example Solution DCOVA
 Develop the 2nd order Year Yi Yi-1 Yi-2
table 02 4 -- --
03 3 4 --
 Use Excel to estimate a 04 2 3 4
regression model 05 3 2 3
06 2 3 2
Excel Output 07 2 2 3
Coefficients 08 4 2 2
Intercept 3.5 09 6 4 2
X Variable 1 0.8125
X Variable 2 -0.9375

Ŷi 3.5  0.8125Yi 1  0.9375Yi 2


Copyright ©2012 Pearson Education Chap 16-39
Autoregressive Model
Example: Forecasting

Use the second-order equation to forecast


number of units for 2010:

Ŷi  3.5  0.8125Yi  1  0.9375Yi  2


Ŷ2010  3.5  0.8125(Y2009 )  0.9375(Y2008 )
 3.5  0.8125(6)  0.9375(4)
 4.625

Copyright ©2012 Pearson Education Chap 16-40


Autoregressive Modeling Steps
DCOVA
1.Choose p (note that df = n – 2p – 1)
2.Form a series of “lagged predictor” variables
Yi-1 , Yi-2 , … ,Yi-p
3.Use Excel or Minitab to run regression model
using all p variables
4.Test significance of Ap
 If null hypothesis rejected, this model is selected
 If null hypothesis not rejected, decrease p by 1 and
repeat

Copyright ©2012 Pearson Education Chap 16-41


Choosing A Forecasting Model
 Perform a residual analysis
 Eliminate a model that shows a pattern or trend
 Measure magnitude of residual error using
squared differences and select the model
with the smallest value
 Measure magnitude of residual error using
absolute differences and select the model
with the smallest value
 Use simplest model
 Principle of parsimony
Copyright ©2012 Pearson Education Chap 16-42
Residual Analysis
e e

0 0

T T
Random errors Cyclical effects not accounted for
e e
0 0

T T
Trend not accounted for Seasonal effects not accounted for
Copyright ©2012 Pearson Education Chap 16-43
Measuring Errors
 Choose the model that gives the smallest
measuring errors
 Sum of squared errors  Mean Absolute Deviation
(SSE) (MAD)
n n
SSE  (Yi  Ŷi ) 2
 Y  Ŷ
i i
i1
MAD  i1
n
 Sensitive to outliers
 Less sensitive to extreme
observations

Copyright ©2012 Pearson Education Chap 16-44


Principal of Parsimony
 Suppose two or more models provide a
good fit for the data
 Select the simplest model
 Simplest model types:

Least-squares linear

Least-squares quadratic

1st order autoregressive
 More complex types:

2nd and 3rd order autoregressive

Least-squares exponential

Copyright ©2012 Pearson Education Chap 16-45


Forecasting With Seasonal Data
 Time series are often collected monthly or
quarterly
 These time series often contain a trend
component, a seasonal component, and the
irregular component
 Suppose the seasonality is quarterly
 Define three new dummy variables for quarters:
Q1 = 1 if first quarter, 0 otherwise
Q2 = 1 if second quarter, 0 otherwise
Q3 = 1 if third quarter, 0 otherwise
(Quarter 4 is the default if Q1 = Q2 = Q3 = 0)
Copyright ©2012 Pearson Education Chap 16-46
Exponential Model with
Quarterly Data
Xi Q1 Q2 Q3
Yi β β β 2 β3 β 4 ε i
0 1

(β1–1)x100% is the quarterly compound growth rate


βi provides the multiplier for the ith quarter relative to the 4th
quarter (i = 2, 3, 4)
 Transform to linear form:

log(Yi ) log(β0 )  Xilog(β1 )  Q1log(β 2 )


 Q 2log(β3 )  Q3log(β 4 )  log( ε i )

Copyright ©2012 Pearson Education Chap 16-47


Estimating the Quarterly Model
 Exponential forecasting equation:

log(Ŷi ) b0  b1Xi  b 2Q1  b3Q 2  b 4Q3


b
where b0 = estimate of log(β0), so 10 0 β̂0
b
b1 = estimate of log(β1), so 10 1 β̂1
etc…
Interpretation:
(β̂1  1) 100% = estimated quarterly compound growth rate (in %)
β̂ 2 = estimated multiplier for first quarter relative to fourth quarter
β̂3 = estimated multiplier for second quarter rel. to fourth quarter
β̂ 4 = estimated multiplier for third quarter relative to fourth
quarter
Copyright ©2012 Pearson Education Chap 16-48
Quarterly Model Example
 Suppose the forecasting equation is:
log(Ŷi ) 3.43  .017X i  .082Q1  .073Q 2  .022Q 3

b0 = 3.43, so 10b0 β̂0 2691.53

b1 = .017, so 10b1 β̂1 1.040

b2 = -.082, so 10b2 β̂ 2 0.827

b3 = -.073, so 10b3 β̂3 0.845

b4 = .022, so 10b 4 β̂ 4 1.052

Copyright ©2012 Pearson Education Chap 16-49


Quarterly Model Example
(continued)

Value: Interpretation:
β̂0 2691.53 Unadjusted trend value for first quarter of first year
β̂1 1.040 4.0% = estimated quarterly compound growth rate

β̂ 2 0.827 Average sales in Q1 are 82.7% of average 4th quarter


sales, after adjusting for the 4% quarterly growth rate
β̂3 0.845 Average sales in Q2 are 84.5% of average 4th quarter
sales, after adjusting for the 4% quarterly growth rate
β̂ 4 1.052 Average sales in Q3 are 105.2% of average 4th quarter
sales, after adjusting for the 4% quarterly growth rate

Copyright ©2012 Pearson Education Chap 16-50


Pitfalls in
Time-Series Analysis
 Assuming the mechanism that governs the time
series behavior in the past will still hold in the
future
 Using mechanical extrapolation of the trend to
forecast the future without considering personal
judgments, business experiences, changing
technologies, and habits, etc.

Copyright ©2012 Pearson Education Chap 16-51


Chapter Summary

 Discussed the importance of forecasting


 Addressed component factors of the time-series
model
 Performed smoothing of data series
 Moving averages
 Exponential smoothing
 Described least square trend fitting and
forecasting
 Linear, quadratic and exponential models

Copyright ©2012 Pearson Education Chap 16-52


Chapter Summary
(continued)

 Addressed autoregressive models


 Described procedure for choosing appropriate
models
 Addressed time-series forecasting of monthly or
quarterly data (use of dummy variables)
 Discussed pitfalls concerning time-series
analysis

Copyright ©2012 Pearson Education Chap 16-53


Basic Business Statistics
12th Edition
Global Edition

Online Topic

Index Numbers

Copyright ©2012 Pearson Education Chap 16-54


Learning Objective
 In this On Line Topic you learn about price index
numbers and differences between aggregated and
disaggregated index numbers

Copyright ©2012 Pearson Education Chap 16-55


Index Numbers
DCOVA
 Index numbers allow relative comparisons
over time
 Index numbers are reported relative to a Base
Period Index
 Base period index = 100 by definition
 Used for an individual item or group of items

Copyright ©2012 Pearson Education Chap 16-56


Simple Price Index
DCOVA
 Simple Price Index:

Pi
Ii  100
Pbase
where
Ii = index number for year i
Pi = price for year i
Pbase = price for the base year
Copyright ©2012 Pearson Education Chap 16-57
Index Numbers: Example
DCOVA
Airplane ticket prices from 1995 to 2003:
Index
Year Price (base year
= 2006)
2001 272 85.0
P2002 288
2002 288 90.0 I 2000  100  (100) 90
2003 295 92.2
P2006 320
2004 311 97.2
2005 322 100.6 Base Year:
2006 320 100.0
P2006 320
I 2006  100  (100) 100
2007 348 108.8 P2006 320
2008 366 114.4
2009 384 120.0 P2009 384
I 2009  100  (100) 120
P2006 320
Copyright ©2012 Pearson Education Chap 16-58
Index Numbers: Interpretation
DCOVA

P 288
 Prices in 2000 were 90%
I 2000  2002 100  (100) 90 of base year prices
P2006 320

P 320
 Prices in 2006 were 100%
I 2006  2006 100  (100) 100 of base year prices (by
P2006 320
definition, since 2006 is the
base year)

P 384  Prices in 2009 were 120%


I 2009  2009 100  (100) 120
P2006 320 of base year prices

Copyright ©2012 Pearson Education Chap 16-59


Aggregate Price Indexes
DCOVA
 An aggregate index is used to measure the rate
of change from a base period for a group of items
Aggregate
Price Index
numbers

Unweighted Weighted
aggregate aggregate
price index price index
numbers numbers

Paasche Index Laspeyres Index


numbers numbers
Copyright ©2012 Pearson Education Chap 16-60
Unweighted
Aggregate Price Index
DCOVA
 Unweighted aggregate price index formula:
n

(t)
 i
P (t)
i = item

I 
U
i1
n
100 t = time period
n = total number of items
P
i1
i
(0)

IU( t ) = unweighted price index at time t


n

P
i1
i
(t)
= sum of the prices for the group of items at time t
n

 i = sum of the prices for the group of items in time period 0


P (0)

i1

Copyright ©2012 Pearson Education Chap 16-61


Unweighted Aggregate Price
Index: Example DCOVA
Automobile Expenses:
Monthly Amounts ($):
Index
Year Lease payment Fuel Repair Total (2006=100)
2006 260 45 40 345 100.0
2007 280 60 40 380 110.1
2008 305 55 45 405 117.4
2009 310 50 50 410 118.8

I 2009 
 P 2009
100 
410
(100) 118.8
P 2006 345
 Unweighted total expenses were 18.8%
higher in 2009 than in 2006
Copyright ©2012 Pearson Education Chap 16-62
Weighted
Aggregate Price Index Numbers
DCOVA
 Laspeyres index  Paasche index
n n

(t)
P i
(t)
Q (0)
i
(t)
P i
(t)
Q (t)
i
I 
L
i1
n
100 I 
P
i1
n
100
Pi1
i
(0)
Q (0)
i P i
(0)
Q (t)
i
i1

Q(i 0 ) : weights based on Q(i t ) : weights based on


current
period 0 quantities period quantities
Pi( t )
( 0 ) = price in time period t
Pi
Copyright ©2012 Pearson Education
= price in period 0 Chap 16-63
Common Price Index Numbers
DCOVA
 Consumer Price Index (CPI)
 Producer Price Index (PPI)
 Stock Market Index Numbers
 Dow Jones Industrial Average
 S&P 500 Index
 NASDAQ Index

Copyright ©2012 Pearson Education Chap 16-64


Topic Summary
 Learned about price index numbers and
differences between aggregated and
disaggregated index numbers

Copyright ©2012 Pearson Education Chap 16-65

You might also like