Stat 12
Stat 12
Lecture 12:
Time Series and Forecasting
Master of Management
Faculty of Economics and Business
Universitas Gadjah Mada
2019
Time Series and Forecasting
The Nature of Time Series Data
CYCLICAL VARIATION The rise and fall of a time series over periods
longer than 1 year.
Components of a Time Series
There are four components to a time series:
2. The cyclical variation
A typical business cycle consists of a period of prosperity followed by periods of
recession, depression, and then recovery
Components of a Time Series
There are four components to a time series:
3. The seasonal variation
The seasonal variation is a pattern that tends to repeat itself from year to
year for most businesses.
Techniques to Analyse
The graph of sales fluctuates but the moving average removes the
cyclical and irregular fluctuations leaving an upsloping trend line.
3- and 5-Year Moving Average Example
This is a table and graph of production numbers along with 3-year and 5-year moving totals
and moving averages. Note, moving averages do not always result in a precise line.
A Weighted Moving Average
▪ A moving average uses the same weight for each observation.
▪ A weighted moving average, in contrast, involves selecting a
possibly different weight for each data value and then
computing a weighted average of the most recent n values as
the smoothed value.
A Weighted Moving Average Example
Where yො is sales
a is the intercept with the Y-axis
b is the slope of the line
t is the coded time period for each year
Linear Trend
The equation for the line in the chart below is, 𝑦ො = 1 + 2𝑡
Linear Trend with Least Squares Method Example
……………………………
Seasonal Index Example
▪ Step 5: Organize the data in a table (below) ▪ Step 6: Apply the correction factor if the total
so you can compute the typical quarterly index of the four quarterly means do not equal 4 by
by averaging the yearly values in each using formula 18-3
quarters column
yො = 𝑎 + 𝑏𝑡
yො = 8.11043 + .0898t
yො = 8.11043 + .0898(25) = 10.35743
𝑡 = 𝑎 + 𝑆𝑝𝑒𝑛𝑑𝑖𝑛𝑔 𝑜𝑛 𝐴𝑑𝑣𝑒𝑟𝑡𝑖𝑠𝑖𝑛𝑔𝑡 + 𝑒𝑡
Sale
Autocorrelation
▪ Notice there are “runs” of residuals above and below the 0 line.
▪ If we computed the correlation between successive residuals,
it is likely the correlation would be strong.
Autocorrelation
▪ If the residuals are correlated, problems occur when we try to
conduct tests of hypotheses about the regression coefficients.
▪ Also, a confidence interval or a prediction interval, where the
multiple standard error of estimate is used, may not yield the
correct results.
The Durbin-Watson Statistic
The Durbin-Watson statistic is used to test for autocorrelation