1. The plastics data set consists of the monthly sales (in thousands) of product A for a plastics manufacturer for five years.
  1. Plot the time series of sales of product A. Can you identify seasonal fluctuations and or a trend-cycle?

## [1] 12

From the plots done, I can see some seasonality as well as an overall upward trend in the plastics time series data.

  1. Use a classical multiplicative decomposition to calculate the trend-cycle and seasonal indices.

  1. Do the results support the graphical interpretation from part a? The trend window definitely shows an upward trend, and the seasonal window shows seasonality. I saw the trend clearly in the when I plotted the time-series previously.

  2. Compute and plot the seasonally adjusted data.

  1. Change one observation to be an outlier(e.g., add 500 to one observation), and recompute the seasonally adjusted data. What is the effect of the outlier?
##    Jan  Feb  Mar  Apr  May  Jun  Jul  Aug  Sep  Oct  Nov  Dec
## 1  742  697  776  898 1030 1107 1165 1216 1208 1131  971  783
## 2  741  700  774  932 1099 1223 1290 1349 1341 1296 1066  901
## 3  896  793  885 1055 1204 2326 1303 1436 1473 1453 1170 1023
## 4  951  861  938 1109 1274 1422 1486 1555 1604 1600 1403 1209
## 5 1030 1032 1126 1285 1468 1637 1611 1608 1528 1420 1119 1013

I randomly chose to add 1000 to the 30th entry of the plastics time series. Let’s take a look at what that does to the seasonally adjusted plot.

There is a clear spike where the outlier was placed. The smooth upward trend now has more variation at the outlier.

  1. Does it make a difference if the outlier is near the end rather than in the middle of the series?
##    Jan  Feb  Mar  Apr  May  Jun  Jul  Aug  Sep  Oct  Nov  Dec
## 1  742  697  776  898 2030 1107 1165 1216 1208 1131  971  783
## 2  741  700  774  932 1099 1223 1290 1349 1341 1296 1066  901
## 3  896  793  885 1055 1204 1326 1303 1436 1473 1453 1170 1023
## 4  951  861  938 1109 1274 1422 1486 1555 1604 1600 1403 1209
## 5 1030 1032 1126 1285 1468 1637 1611 1608 1528 1420 1119 1013
##    Jan  Feb  Mar  Apr  May  Jun  Jul  Aug  Sep  Oct  Nov  Dec
## 1  742  697  776  898 1030 1107 1165 1216 1208 1131  971  783
## 2  741  700  774  932 1099 1223 1290 1349 1341 1296 1066  901
## 3  896  793  885 1055 1204 1326 1303 1436 1473 1453 1170 1023
## 4  951  861  938 1109 1274 1422 1486 1555 1604 1600 1403 1209
## 5 1030 1032 1126 1285 1468 1637 2611 1608 1528 1420 1119 1013

The length of plastics is 60. I’ll add outliers to the 5th and 55th observation.

It seems that when the outlier is at the beginning or end, it seems to have a less severe impact on the overall trend.

  1. Recall your retail time series data. Decompose the series using X11. Does it reveal any outliers, or unusual features that you have not noticed previously?

I did not notice anything that was not previously noted.