Time Series Analysis
This (not surprisingly) concerns the analysis of data collected over time ... weekly values, monthly values, quarterly values, yearly values, etc. Usually the intent is to discern whether there is some pattern in the values collected to date, with the intention of short term forecasting (to use as the basis of business decisions). We will write yt = response of interest at time t (we usually think of these as equally spaced in clock time). Standard analyses of business time series involve:
1) smoothing/trend assessment
2) assessment of/accounting for seasonality
3) assessment of/exploiting "serial correlation"
These are usually/most eﬀectively done on a scale where the "local" variation in yt is approximately constant.
Smoothing Time Series
There are various fairly simple smoothing/averaging methods. Two are "ordinary moving averages" and "exponentially weighted moving averages."
Ordinary Moving Averages For a "span" of k periods,
e yt = moving average through time t yt + yt−1 + yt−2 + · · · + yt−k−1 = k Where seasonal eﬀects are expected, it is standard to use
k = number of periods per cycle
Exponentially Weighted Moving Averages These weight observations less heavily as one moves back in time from the current period. They are typically computed "recursively" as e yt = exponentially weighted moving average at time t e = wyt + (1 − w) yt−1
e (yt−1 is the EWMA from the previous period and the current EWMA is a compromise between the previous EWMA and the current observation.) e One must start this recursion somewhere and it’s common to take y1 = y1. Notice that w = 1 does no smoothing, while w = 0 smooths so much that the EWMA never changes (i.e. all the values are equal to the ﬁrst).
Exercise/Example Table 13.1 (page 13-5) of the text gives quarterly retail sales for JC Penney, 1996-2001 (in millions of dollars). "By hand" 1) using k = 4 ﬁnd ordinary moving averages for periods 5 through 8, then 2) using (e.g.) w = .3, ﬁnd the exponentially weighted moving average values for those periods.
t 1 2 3 4 5 6 7 8
yt Span k = 4 MA w = .3 EWMA 4452 4452 4507 4469 = .3(4507) + .7(4452) 5537 Ã ! 4789 = .3(5537) + .7(4469) 4452 + 4507 8157 5663 = 1 5799 = .3(8157) + .7(4789) 4 +5537 + 8157 6481 6420 7208 9509
A plot of both the original time series and the k = 4 MA values for the JC Penney data is in Figure 13.13, page 13-28 of the text. Here is a JMP "Overlay Plot" version of this picture and an indication of how you can get JMP to make the MA’s.
Figure 1: JC Penney Sales and k = 4 MA Series
Figure 2: JMP "Column Formula" for JC Penney MA’s Computation of EWMAs in JMP doesn’t appear to be simple. Figure 13.15 on page 13-32 of the text (that uses a diﬀerent data set) shows the eﬀect of changing w on how much smoothing is done. The most jagged plot is the (red) raw data plot (w = 1.0). The (purple) w = .5 EWMA plot is smoother. The (black) w = .1 plot is smoothest. Here is a plot of 3 EWMA series for the JC Penney sales data.
Figure 3: EWMAs for JC Penney Sales Data
There are other more sophisticated smoothing methods available in statistical software. JMP provides "splines."
JMP Cubic Spline Smoothers These are available using the "Fit Y by X" procedure in JMP. They have a "stiﬀness knob" that lets one adjust how much "wiggling" the smoothed curve can do. Here are several splines ﬁt to the JC Penney sales data. The "stiﬀness knob" is the parameter "λ."
Figure 4: Splines Fit to the JC Penney Data
JMP will store the smoothed values obtained from these spline smoothers (just as it will store predicted values from regressions) in the original data table, if one clicks on the appropriate red triangle and chooses that option. Typically one wants to "smooth" a time series in order to make forecasts/projections into the future. The MA, EWMA, and spline smoothers don’t really provide e forecasts beyond projecting a current value yt to the next period,...
Please join StudyMode to read the full document