Analysis of the weekly Sales data over 100000 rolls of Absorbent paper Towels (in units of 10000 rolls), the data is in the book of forcasting and time series (Bowerman and O’Conell). Method of the Time Series Analysis: Autoregressive Integrated Moving Averages (ARIMA).

Towels Data

## Registered S3 method overwritten by 'quantmod':
##   method            from
##   as.zoo.data.frame zoo
## -- Attaching packages --------------------------------------- tidyverse 1.3.2 --
## v ggplot2 3.3.6     v purrr   0.3.4
## v tibble  3.1.8     v dplyr   1.0.9
## v tidyr   1.1.4     v stringr 1.4.0
## v readr   2.1.2     v forcats 0.5.1
## -- Conflicts ------------------------------------------ tidyverse_conflicts() --
## x dplyr::filter() masks stats::filter()
## x dplyr::lag()    masks stats::lag()
## Time Series:
## Start = 1 
## End = 120 
## Frequency = 1 
##        towel_data
##   [1,]    15.0000
##   [2,]    14.4064
##   [3,]    14.9383
##   [4,]    16.0374
##   [5,]    15.6320
##   [6,]    14.3975
##   [7,]    13.8959
##   [8,]    14.0765
##   [9,]    16.3750
##  [10,]    16.5342
##  [11,]    16.3839
##  [12,]    17.1006
##  [13,]    17.7876
##  [14,]    17.7354
##  [15,]    17.0010
##  [16,]    17.7485
##  [17,]    18.1888
##  [18,]    18.5997
##  [19,]    17.5859
##  [20,]    15.7389
##  [21,]    13.6971
##  [22,]    15.0059
##  [23,]    16.2574
##  [24,]    14.3506
##  [25,]    11.9515
##  [26,]    12.0328
##  [27,]    11.2142
##  [28,]    11.7023
##  [29,]    12.5905
##  [30,]    12.1991
##  [31,]    10.7752
##  [32,]    10.1129
##  [33,]     9.9330
##  [34,]    11.7435
##  [35,]    12.2590
##  [36,]    12.5009
##  [37,]    11.5378
##  [38,]     9.6649
##  [39,]    10.1043
##  [40,]    10.3452
##  [41,]     9.2835
##  [42,]     7.7219
##  [43,]     6.8300
##  [44,]     8.2046
##  [45,]     8.5289
##  [46,]     8.8733
##  [47,]     8.7948
##  [48,]     8.1577
##  [49,]     7.9128
##  [50,]     8.7978
##  [51,]     9.0775
##  [52,]     9.3234
##  [53,]    10.4739
##  [54,]    10.6943
##  [55,]     9.8367
##  [56,]     8.1803
##  [57,]     7.2509
##  [58,]     5.0814
##  [59,]     1.8313
##  [60,]    -0.9127
##  [61,]    -1.3173
##  [62,]    -0.6021
##  [63,]     0.1400
##  [64,]     1.4030
##  [65,]     1.9280
##  [66,]     3.5626
##  [67,]     1.9615
##  [68,]     4.8463
##  [69,]     6.5454
##  [70,]     8.0141
##  [71,]     7.9746
##  [72,]     8.4959
##  [73,]     8.4539
##  [74,]     8.7114
##  [75,]     7.3780
##  [76,]     8.1905
##  [77,]     9.9720
##  [78,]     9.6930
##  [79,]     9.4506
##  [80,]    11.2088
##  [81,]    11.4986
##  [82,]    13.2778
##  [83,]    13.5910
##  [84,]    13.4297
##  [85,]    13.3125
##  [86,]    12.7445
##  [87,]    11.7979
##  [88,]    11.7319
##  [89,]    11.6523
##  [90,]    11.3718
##  [91,]    10.5502
##  [92,]    11.4741
##  [93,]    11.5568
##  [94,]    11.7986
##  [95,]    11.8867
##  [96,]    11.2951
##  [97,]    12.7847
##  [98,]    13.9435
##  [99,]    13.6859
## [100,]    14.1136
## [101,]    13.8949
## [102,]    14.2853
## [103,]    16.3867
## [104,]    17.0884
## [105,]    15.8861
## [106,]    14.8227
## [107,]    15.9479
## [108,]    15.0982
## [109,]    13.8770
## [110,]    14.2746
## [111,]    15.1682
## [112,]    15.3818
## [113,]    14.1863
## [114,]    13.9996
## [115,]    15.2463
## [116,]    17.0179
## [117,]    17.2929
## [118,]    16.6366
## [119,]    15.3410
## [120,]    15.6453

The ACF, PACF and the time series plots of the original data is presented.

ACF, PACF and tsplots of the original data.

All the above plots show that the time series is not stationary. To make it stationary, a differencing operation is conducted.

Differencing

Base on the plots of the ACF, PACF and tsdplots, the series stablized and shows stationary after differencing.

After differencing, based on the plots and and the accruacy measures, the best suggested model is MA(1).

## 
## Call:
## arima(x = tow, order = c(0, 1, 1))
## 
## Coefficients:
##          ma1
##       0.3518
## s.e.  0.0800
## 
## sigma^2 estimated as 1.071:  log likelihood = -172.99,  aic = 349.98

The fitted model is used the prediction of towel sales for 5 weeks ahead.

## $pred
## Time Series:
## Start = 121 
## End = 125 
## Frequency = 1 
## [1] 15.88729 15.88729 15.88729 15.88729 15.88729
## 
## $se
## Time Series:
## Start = 121 
## End = 125 
## Frequency = 1 
## [1] 1.034776 1.739986 2.232564 2.634603 2.982938

Plots of 95% prediction intervals