Transcript Business Statistics: A Decision
Business Statistics: A Decision-Making Approach
6 th Edition
Chapter 15
Analyzing and Forecasting Time-Series Data
Business Statistics: A Decision-Making Approach, 6e © 2005 Prentice-Hall, Inc.
Chap 15-1
Chapter Goals
After completing this chapter, you should be able to:
Develop and implement basic forecasting models Identify the components present in a time series Compute and interpret basic index numbers Use smoothing-based forecasting models, including single and double exponential smoothing Apply trend-based forecasting models, including linear trend, nonlinear trend, and seasonally adjusted trend Business Statistics: A Decision-Making Approach, 6e © 2005 Prentice-Hall, Inc.
Chap 15-2
The Importance of Forecasting
Governments forecast unemployment, 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 Business Statistics: A Decision-Making Approach, 6e © 2005 Prentice-Hall, Inc.
Chap 15-3
Time-Series Data
Numerical data obtained at regular time intervals The time intervals can be annually, quarterly, daily, hourly, etc.
Example: Year: 1999 2000 2001 2002 2003 Sales: 75.3 74.2 78.5 79.7 80.2
Business Statistics: A Decision-Making Approach, 6e © 2005 Prentice-Hall, Inc.
Chap 15-4
Time Series Plot
A time-series plot is a two-dimensional plot of time series data the vertical axis measures the variable of interest the horizontal axis corresponds to the time periods 16.00
14.00
12.00
10.00
8.00
6.00
4.00
2.00
0.00
U.S. Inflation Rate Year
Business Statistics: A Decision-Making Approach, 6e © 2005 Prentice-Hall, Inc.
Chap 15-5
Time-Series Components
Time-Series
Trend Component Seasonal Component Cyclical Component Random Component Business Statistics: A Decision-Making Approach, 6e © 2005 Prentice-Hall, Inc.
Chap 15-6
Trend Component
Long-run increase or decrease over time (overall upward or downward movement) Data taken over a long period of time Sales Business Statistics: A Decision-Making Approach, 6e © 2005 Prentice-Hall, Inc.
Time Chap 15-7
Trend Component
Trend can be upward or downward Trend can be linear or non-linear Sales Sales (continued) Downward linear trend Time Business Statistics: A Decision-Making Approach, 6e © 2005 Prentice-Hall, Inc.
Upward nonlinear trend Time Chap 15-8
Seasonal Component
Short-term regular wave-like patterns Observed within 1 year Often monthly or quarterly Sales Summer Winter Spring Time (Quarterly) Business Statistics: A Decision-Making Approach, 6e © 2005 Prentice-Hall, Inc.
Fall Chap 15-9
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 Chap 15-10 Business Statistics: A Decision-Making Approach, 6e © 2005 Prentice-Hall, Inc.
Random Component
Unpredictable, random, “residual” fluctuations Due to random variations of Nature Accidents or unusual events “Noise” in the time series Business Statistics: A Decision-Making Approach, 6e © 2005 Prentice-Hall, Inc.
Chap 15-11
Index Numbers
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 measurement Business Statistics: A Decision-Making Approach, 6e © 2005 Prentice-Hall, Inc.
Chap 15-12
Index Numbers
Simple Index number formula: (continued) I t y y 0 t 100 where I t = index number at time period t y t = value of the time series at time t y 0 = value of the time series in the base period Business Statistics: A Decision-Making Approach, 6e © 2005 Prentice-Hall, Inc.
Chap 15-13
Index Numbers: Example
Company orders from 1995 to 2003:
Year
1995 1996 1997 1998 1999 2000 2001 2002 2003
Number of Orders
272 288 295 311 322 320 348 366 384
Index (base year = 2000)
85.0
90.0
92.2
97.2
100.6
100.0
108.8
114.4
120.0
Business Statistics: A Decision-Making Approach, 6e © 2005 Prentice-Hall, Inc.
I 1996 y 1996 y 2000 100 288 320 ( 100 ) 90 Base Year: I 2000 y 2000 100 y 2000 320 320 ( 100 ) 100 I 2003 y 2003 y 2000 100 384 320 ( 100 ) 120 Chap 15-14
Index Numbers: Interpretation
I 1996 y 1996 y 2000 100 288 320 ( 100 ) 90 Orders in 1996 were 90% of base year orders I 2000 y 2000 y 2000 100 320 320 ( 100 ) 100 Orders in 2000 were 100% of base year orders (by definition, since 2000 is the base year) I 2003 y 2003 y 2000 100 384 320 ( 100 ) 120 Orders in 2003 were 120% of base year orders Business Statistics: A Decision-Making Approach, 6e © 2005 Prentice-Hall, Inc.
Chap 15-15
Aggregate Price Indexes
An aggregate index is used to measure the rate of change from a base period for a group of items Aggregate Price Indexes Unweighted aggregate price index Weighted aggregate price indexes Paasche Index Business Statistics: A Decision-Making Approach, 6e © 2005 Prentice-Hall, Inc.
Laspeyres Index Chap 15-16
Unweighted Aggregate Price Index
Unweighted aggregate price index formula: I t p p 0 t ( 100 ) where I t = unweighted aggregate price index at time t p t = sum of the prices for the group of items at time t p 0 = sum of the prices for the group of items in the base period Business Statistics: A Decision-Making Approach, 6e © 2005 Prentice-Hall, Inc.
Chap 15-17
Unweighted Aggregate Price Index Example
Year
2001 2002 2003 2004
Automobile Expenses: Monthly Amounts ($): Lease payment
260 280 305 310
Fuel
45 60 55
Repair
40 40 45
Total
345 380 405
Index (2001=100)
100.0
110.1
117.4
I 2004 50 p 2004 p 2001 50 (100) 410 118.8
410 345 (100) 118.8
Combined expenses in 2004 were 18.8% higher in 2004 than in 2001 Business Statistics: A Decision-Making Approach, 6e © 2005 Prentice-Hall, Inc.
Chap 15-18
Weighted Aggregate Price Indexes
I t Paasche index q t p t q t p 0 ( 100 ) I t Laspeyres index q 0 p q 0 p 0 t ( 100 ) q t = weighting percentage at time t q 0 = weighting percentage at base period p t = price in time period t p 0 = price in the base period Business Statistics: A Decision-Making Approach, 6e © 2005 Prentice-Hall, Inc.
Chap 15-19
Commonly Used Index Numbers
Consumer Price Index Producer Price Index Stock Market Indexes Dow Jones Industrial Average S&P 500 Index NASDAQ Index Business Statistics: A Decision-Making Approach, 6e © 2005 Prentice-Hall, Inc.
Chap 15-20
Deflating a Time Series
Observed values can be adjusted to base year equivalent Allows uniform comparison over time Deflation formula: y adj t y t ( 100 ) I t where y adj t = adjusted time series value at time t y t = value of the time series at time t I t = index (such as CPI) at time t Business Statistics: A Decision-Making Approach, 6e © 2005 Prentice-Hall, Inc.
Chap 15-21
Deflating a Time Series: Example
Which movie made more money (in real terms)?
Year 1939 1977 1997 Movie Title Gone With the Wind Star Wars Titanic Total Gross $ 199 461 601 (Total Gross $ = Total domestic gross ticket receipts in $millions) Business Statistics: A Decision-Making Approach, 6e © 2005 Prentice-Hall, Inc.
Chap 15-22
Deflating a Time Series: Example
(continued) Year 1939 1977 1997 Movie Title Gone With the Wind Star Wars Titanic Total Gross 199 461 601 CPI (base year = 1984) Gross adjusted to 1984 dollars 13.9
60.6
160.5
1431.7
760.7
374.5
GWTW adj 1984 199 13 .
9 ( 100 ) 1431 .
7 Business Statistics: A Decision-Making Approach, 6e © 2005 Prentice-Hall, Inc.
GWTW made about twice as much as Star Wars, and about 4 times as much as Titanic when measured in equivalent dollars Chap 15-23
Trend-Based Forecasting
Estimate a trend line using regression analysis Year 1999 2000 2001 2002 2003 2004 Time Period (t) 1 2 3 4 5 6 Sales (y) 20 40 30 50 70 65 Business Statistics: A Decision-Making Approach, 6e © 2005 Prentice-Hall, Inc.
Use time (t) as the independent variable: yˆ b 0 b 1 t Chap 15-24
Year 1999 2000 2001 2002 2003 2004 Time Period (t) 1 2 3 4 5 6
Trend-Based Forecasting
(continued) The linear trend model is: Sales (y) 20 40 30 50 70 65 80 70 60 50 40 30 20 10 0 0 yˆ 12 .
333 9 .
5714 t 1 2 Sales trend 3 4 5 6 7 Year Business Statistics: A Decision-Making Approach, 6e © 2005 Prentice-Hall, Inc.
Chap 15-25
Year 1999 2000 2001 2002 2003 2004 2005 Time Period (t) 1 2 3 4 5 6 7
Trend-Based Forecasting
(continued) Forecast for time period 7: Sales (y) 20 40 30 50 70 65
??
80 70 60 50 40 30 20 10 0 0 yˆ 12 .
333 9 .
5714 (7) 79 .
33 1 2 3 Year 4 5 6 7 Business Statistics: A Decision-Making Approach, 6e © 2005 Prentice-Hall, Inc.
Chap 15-26
Comparing Forecast Values to Actual Data
The forecast error or residual is the difference between the actual value in time t and the forecast value in time t: Error in time t: e t y t F t Business Statistics: A Decision-Making Approach, 6e © 2005 Prentice-Hall, Inc.
Chap 15-27
Two common Measures of Fit
Measures of fit are used to gauge how well the forecasts match the actual values MSE (mean squared error) Average squared difference between y t and F t MAD (mean absolute deviation) Average absolute value and F t of difference between y Less sensitive to extreme values t Business Statistics: A Decision-Making Approach, 6e © 2005 Prentice-Hall, Inc.
Chap 15-28
MSE vs. MAD
Mean Square Error ( y t MSE n F t ) 2 Mean Absolute Deviation MAD | y t n F t | where:
y
t
F
t = Actual value at time t = Predicted value at time t n = Number of time periods Business Statistics: A Decision-Making Approach, 6e © 2005 Prentice-Hall, Inc.
Chap 15-29
Autocorrelation
(continued) Autocorrelation is correlation of the error terms (residuals) over time
Time (t) Residual Plot
Here, residuals show a cyclic pattern, not random 15 10 5 0 -5 0 -10 -15 2 4 6 8
Time (t)
Violates the regression assumption that residuals are random and independent Business Statistics: A Decision-Making Approach, 6e © 2005 Prentice-Hall, Inc.
Chap 15-30
Testing for Autocorrelation
The Durbin-Watson Statistic autocorrelation is used to test for H 0 : ρ = 0 (residuals are not correlated) H A : ρ ≠ 0 (autocorrelation is present) Durbin-Watson test statistic: d t n 1 ( e t e t 1 ) 2 t n 1 e t 2 Business Statistics: A Decision-Making Approach, 6e © 2005 Prentice-Hall, Inc.
Chap 15-31
Testing for Positive Autocorrelation
H 0 : ρ = 0 (positive autocorrelation does not exist) H A : ρ > 0 (positive autocorrelation is present) Calculate the Durbin-Watson test statistic = d (The Durbin-Watson Statistic can be found using PHStat or Minitab) Find the values d L and d U from the Durbin-Watson table (for sample size n and number of independent variables p) Decision rule: reject H 0 if d < d L Reject H 0 Inconclusive Do not reject H 0 0 d L Business Statistics: A Decision-Making Approach, 6e © 2005 Prentice-Hall, Inc.
d U 2 Chap 15-32
Testing for Positive Autocorrelation
(continued) 160 Example with n = 25: 140 Excel/PHStat output:
Durbin-Watson Calculations
Sum of Squared Difference of Residuals 3296.18
Sum of Squared Residuals
Durbin-Watson Statistic
3279.98
1.00494
120 100 80 60 40 20 0 0 5 10 15
Tim e
y = 30.65 + 4.7038x R 2 = 0.8976
20 25 30 d t n 1 ( e t e t 1 ) 2 t n 1 e t 2 3296 .
18 3279 .
98 Business Statistics: A Decision-Making Approach, 6e © 2005 Prentice-Hall, Inc.
1 .
00494 Chap 15-33
Testing for Positive Autocorrelation
(continued) Here, n = 25 and there is one independent variable Using the Durbin-Watson table, d L = 1.29 and d U = 1.45
d = 1.00494 < d L = 1.29, so reject H 0 and conclude that significant positive autocorrelation exists Therefore the linear model is not the appropriate model to forecast sales Decision:
reject H 0
since d = 1.00494 < d L 0 Reject H 0 d L =1.29
Inconclusive d U =1.45
Do not reject H 0 Business Statistics: A Decision-Making Approach, 6e © 2005 Prentice-Hall, Inc.
2 Chap 15-34
Nonlinear Trend Forecasting
A nonlinear regression model can be used when the time series exhibits a nonlinear trend One form of a nonlinear model: y t β 0 β 1 t 2 ε t Compare R 2 and s ε to that of linear model to see if this is an improvement Can try other functional forms to get best fit Business Statistics: A Decision-Making Approach, 6e © 2005 Prentice-Hall, Inc.
Chap 15-35
Multiplicative Time-Series Model
Used primarily for forecasting Allows consideration of seasonal variation Observed value in time series is the product of components y t T t S t C t I t where T t = Trend value at time t S t = Seasonal value at time t C t = Cyclical value at time t I t = Irregular (random) value at time t Business Statistics: A Decision-Making Approach, 6e © 2005 Prentice-Hall, Inc.
Chap 15-36
Finding Seasonal Indexes
Ratio-to-moving average method: Begin by removing the seasonal and irregular components (S t and I t ), leaving the trend and cyclical components (T t and C t ) To do this, we need moving averages Moving Average: averages of consecutive time series values Business Statistics: A Decision-Making Approach, 6e © 2005 Prentice-Hall, Inc.
Chap 15-37
Moving Averages
Used for smoothing Series of arithmetic means over time Result dependent upon choice of L (length of period for computing means) To smooth out seasonal variation, L should be equal to the number of seasons For quarterly data, L = 4 For monthly data, L = 12 Business Statistics: A Decision-Making Approach, 6e © 2005 Prentice-Hall, Inc.
Chap 15-38
Moving Averages
Example: Four-quarter moving average First average: Moving average 1 Q1 Q2 Q3 Q4 4 Second average: Moving average 2 Q2 Q3 Q4 Q5 4 etc… Business Statistics: A Decision-Making Approach, 6e © 2005 Prentice-Hall, Inc.
(continued) Chap 15-39
Seasonal Data
Quarter
1 2 3 4 5 6 7 8 9 10 11 etc…
Sales
23 40 25 27 32 48 33 37 37 50 40 etc…
Quarterly Sales
60 50 40 30 20 10 0 1 2 3 4 5 6
Quarter
7 8 Business Statistics: A Decision-Making Approach, 6e © 2005 Prentice-Hall, Inc.
… 9 10 11 … Chap 15-40
Calculating Moving Averages
Quarter
1 2
Sales
23 40
Average Period 4-Quarter Moving Average
2.5
28.75
3.5
4.5
31.00
33.00
2.5
1 2 3 4 4
Centered Moving Averages
Average periods of 2.5 or 3.5 don’t match the original quarters, so we average two consecutive moving averages to get centered moving averages
Average Period
2.5
3.5
4.5
5.5
6.5
7.5
8.5
4-Quarter Moving Average
28.75
31.00
33.00
35.00
37.50
etc…
Centered Period
38.75
39.25
9.5
41.00
Business Statistics: A Decision-Making Approach, 6e © 2005 Prentice-Hall, Inc.
7 8 9 3 4 5 6
Centered Moving Average
29.88
32.00
34.00
36.25
38.13
39.00
40.13
Chap 15-42
Calculating the Ratio-to-Moving Average
Now estimate the S t x I t value Divide the actual sales value by the centered moving average for that quarter Ratio-to-Moving Average formula: S t I t T t y t C t Business Statistics: A Decision-Making Approach, 6e © 2005 Prentice-Hall, Inc.
Chap 15-43
Calculating Seasonal Indexes
Quarter Sales Centered Moving Average Ratio-to Moving Average
1 2 3 4 5 6 23 40 25 27 32 48 29.88
32.00
34.00
36.25
0.837
0.844
0.941
1.324
7 33 38.13
0.865
8 37 39.00
0.949
9 10 37 50 40.13
etc… 0.922
etc… 11 40 … … … … … Business Statistics: A Decision-Making Approach, 6e © 2005 Prentice-Hall, Inc.
… 0 .
837 25 29 .
88 Chap 15-44
Calculating Seasonal Indexes
(continued)
Quarter Sales Centered Moving Average Ratio-to Moving Average
Fall 1 2 3 4 5 23 40 25 27 32 29.88
32.00
34.00
0.837
0.844
0.941
6 48 36.25
1.324
Fall 7 33 38.13
0.865
8 37 39.00
0.949
9 10 37 50 40.13
etc… 0.922
etc… Fall 11 40 … … … … … Business Statistics: A Decision-Making Approach, 6e © 2005 Prentice-Hall, Inc.
… Average all of the Fall values to get Fall’s seasonal index Do the same for the other three seasons to get the other seasonal indexes Chap 15-45
Interpreting Seasonal Indexes
Suppose we get these seasonal indexes: Season Seasonal Index Spring Summer 0.825
1.310
Interpretation: Spring sales average 82.5% of the annual average sales Summer sales are 31.0% higher than the annual average sales Fall 0.920
etc… Winter 0.945
= 4.000 -- four seasons, so must sum to 4 Business Statistics: A Decision-Making Approach, 6e © 2005 Prentice-Hall, Inc.
Chap 15-46
Deseasonalizing
The data is deseasonalized by dividing the observed value by its seasonal index T t C t I t y S t t This smooths the data by removing seasonal variation Business Statistics: A Decision-Making Approach, 6e © 2005 Prentice-Hall, Inc.
Chap 15-47
Deseasonalizing
Quarter
7 8 9 10 11 … 1 2 3 4 5 6
Sales
33 37 37 50 40 23 40 25 27 32 48
Seasonal Index
0.825
1.310
0.920
0.945
0.825
1.310
0.920
0.945
0.825
1.310
0.920
…
Deseasonalized Sales
27.88
30.53
27.17
28.57
38.79
36.64
35.87
39.15
44.85
38.17
43.48
… Business Statistics: A Decision-Making Approach, 6e © 2005 Prentice-Hall, Inc.
(continued) 27.88
23 0.825
etc… Chap 15-48
Unseasonalized vs. Seasonalized
Sales: Unseasonalized vs. Seasonalized
60 50 40 30 20 10 0 1 2 3 4 5 6
Quarter
7 8 9 10 11 Sales Deseasonalized Sales Business Statistics: A Decision-Making Approach, 6e © 2005 Prentice-Hall, Inc.
Chap 15-49
Forecasting Using Smoothing Methods
Exponential Smoothing Methods Single Exponential Smoothing Double Exponential Smoothing Business Statistics: A Decision-Making Approach, 6e © 2005 Prentice-Hall, Inc.
Chap 15-50
Single Exponential Smoothing
A weighted moving average Weights decline exponentially Most recent observation weighted most Used for smoothing and short term forecasting Business Statistics: A Decision-Making Approach, 6e © 2005 Prentice-Hall, Inc.
Chap 15-51
Single Exponential Smoothing
(continued) The weighting factor is Subjectively chosen Range from 0 to 1 Smaller gives more smoothing, larger less smoothing gives The weight is: Close to 0 for smoothing out unwanted cyclical and irregular components Close to 1 for forecasting Business Statistics: A Decision-Making Approach, 6e © 2005 Prentice-Hall, Inc.
Chap 15-52
Exponential Smoothing Model
Single exponential smoothing model F t 1 F t ( y t F t ) or: F t 1 y t ( 1 ) F t where: F t+1 = forecast value for period t + 1 y t = actual value for period t F t = forecast value for period t = alpha (smoothing constant) Business Statistics: A Decision-Making Approach, 6e © 2005 Prentice-Hall, Inc.
Chap 15-53
Exponential Smoothing Example
Suppose we use weight = .2
Quarter (t) Sales (y t ) Forecast from prior period Forecast for next period (F t+1 )
1 2 3 4 23 40 25 27 NA 23 26.4
26.12
23 (.2)(40)+(.8)(23)=26.4
(.2)(25)+(.8)(26.4)=26.12
(.2)(27)+(.8)(26.12)=26.296
5 6 7 8 32 48 33 37 26.296
27.437
31.549
31.840
(.2)(32)+(.8)(26.296)=27.437
(.2)(48)+(.8)(27.437)=31.549
(.2)(48)+(.8)(31.549)=31.840
(.2)(33)+(.8)(31.840)=32.872
9 37 32.872
(.2)(37)+(.8)(32.872)=33.697
10 etc… 50 etc… 33.697
etc… (.2)(50)+(.8)(33.697)=36.958
etc… Business Statistics: A Decision-Making Approach, 6e © 2005 Prentice-Hall, Inc.
F 1 = y 1 since no prior information exists F t 1 y t ( 1 ) F t Chap 15-54
Sales vs. Smoothed Sales
Seasonal fluctuations have been smoothed NOTE: the smoothed value in this case is generally a little low, since the trend is upward sloping and the weighting factor is only .2
60 50 40 30 20 10 0 1 2 Business Statistics: A Decision-Making Approach, 6e © 2005 Prentice-Hall, Inc.
3 4 5 6
Quarter
7 Sales 8 Smoothed 9 10 Chap 15-55
Double Exponential Smoothing
Double exponential smoothing is sometimes called exponential smoothing with trend If trend exists, single exponential smoothing may need adjustment Add a second smoothing constant to account for trend Business Statistics: A Decision-Making Approach, 6e © 2005 Prentice-Hall, Inc.
Chap 15-56
Double Exponential Smoothing Model
C t T t y t ( C t ( 1 )( C t 1 T t 1 ) C t 1 ) ( 1 ) T t 1 F t 1 C t T t where: y t = actual value in time t = constant-process smoothing constant = trend-smoothing constant C t = smoothed constant-process value for period t T t = smoothed trend value for period t F t+1 = forecast value for period t + 1 t = current time period Business Statistics: A Decision-Making Approach, 6e © 2005 Prentice-Hall, Inc.
Chap 15-57
Double Exponential Smoothing
Double exponential smoothing is generally done by computer Use larger less smoothing constants smoothing is desired and β when Use smaller more smoothing constants smoothing is desired and β when Business Statistics: A Decision-Making Approach, 6e © 2005 Prentice-Hall, Inc.
Chap 15-58
Exponential Smoothing in Excel
Use tools / data analysis / exponential smoothing The “damping factor” is (1 ) Business Statistics: A Decision-Making Approach, 6e © 2005 Prentice-Hall, Inc.
Chap 15-59
Chapter Summary
Discussed the importance of forecasting Addressed component factors present in the time-series model Computed and interpreted index numbers Described least square trend fitting and forecasting linear and nonlinear models Performed smoothing of data series moving averages single and double exponential smoothing Business Statistics: A Decision-Making Approach, 6e © 2005 Prentice-Hall, Inc.
Chap 15-60