You are on page 1of 9

14.5.

6 Time Series Analysis and Forecasting with Minitab


Unfortunately Minitab does not combine a moving average trend with seasonal
decomposition. We shall therefore look at its default method of combining a linear
trend with seasonal decomposition and compare its output with s reproduction of the
analysis previous worked by hand.

In this worksheet we will just analyse seasonal data. Exponential smoothing and curve
fitting can be carried out uite easily in Minitab by following the instructions in the
!elp menu.
"he uarterly sales# $%&#&&&s'# of a departmental store have been monitored for the past
five years with the following information being produced( $"utorial uestion )*.)'
Total quarterly sales (!"!!!s#
$ear %uarter 1 %uarter & %uarter ' %uarter 4
&!!1 +, -, -. /-
&!!& -& /) -0 /,
&!!' -* /* -0 /0
&!!4 -* /+ /& .1
&!!5 -1 /- /& .-

-./.) Enter the data( "ype all the sales figures in chronological order in one column
heading it 2ales.
-./.* 3lot a 2euence graph of 2ales to see if an additive model seems appropriate.
Graph / Time Series Plot / Simple / Series 245E2 6 Time scale / Calendar / Quarter
Year / Start values / Quarter 1 Year 2001
S
a
l
e
s
Year
Quarter
2005 2004 2003 2002 2001
Q3 Q1 Q3 Q1 Q3 Q1 Q3 Q1 Q3 Q1
75
70
65
60
55
50
Time Series Plot of Sales
)
-./.1 4ssuming the data to be seasonal# carry out the seasonal decomposition using an
additive model(
Stat / Time Series / Decomposition / Variable 245E2 / Seasonal lenth ! / "dditive
#odel / Trend plus seasonal / Store Trend$ %its and &esiduals. Graphs / Do not
displa' plots / Generate (orecasts 4 / Startin (rom origin &!
Time Series Decomposition for Sales
Additive Model
Data Sales
Length 20
NMissing 0
Fitted Trend Equation
Yt = 56.3933 + 0.391118*t
Seasonal Indices
Perio !ne"
1 #8.82813
2 1.92188
3 #1.1$063
$ 8.0$688
Forecasts
Perio %ore&ast
21 55.''86
22 66.919'
23 6$.2$8$
2$ '3.82'0
2ave this data as %uarterly sales
-./.+ 3lot a 2euence graph of 2ales with "rend to see if an additive model seems
appropriate.
Graph / Time Series Plot ( Multi)le 245E2 and "7E89
I ndex
D
a
t
a
20 18 16 14 12 10 8 6 4 2
75
70
65
60
55
50
Variable
Sales
TREN1
Time Series Plot of Sales, TREN1
*
"he trend produced is a straight line. With this particular data that looks reasonable.
3lot the sales and fitted values on the same graph to check the model fit.
I ndex
D
a
t
a
20 18 16 14 12 10 8 6 4 2
75
70
65
60
55
50
Variable
Sales
FI TS1
Time Series Plot of Sales, FI TS1
-./.- *esidual analysis(
7emember that the residuals should( $a' be small# $b' have a mean of &# $c' have a
standard deviation which is much smaller than that of sales# $d' be normally
distributed and $e' be random timewise. "he residuals have been saved as 7E2I).
$a'# $b'# $c' 3roduce descriptive statistics of 2ales and 7E2I).
Descriptive Statistics: Sales, RESI1
(aria)le N N* Mean S* Mean StDe+ Mini,-, .1 Meian .3 Ma"i,-,
Sales 20 0 60.50 1.66 '.$0 $8.00 5$.00 60.00 65.00 '5.00
/*S!1 20 0 $.2'$*#15 0.2'$ 1.22' #2.68$ #0.916 #0.0$$9 0.550 2.'3'
$d' :or 7E2I) produce a boxplot and a histogram with a normal plot.
R
E
S
I
1
3
2
1
0
-1
-2
-3
Boxplot of RESI 1
RESI 1
F
r
e
q

e
n
c
!
3 2 1 0 -1 -2 -3
9
8
7
6
5
4
3
2
1
0
Mea 4!263256E-15
St"e# 1!227
N 20
"isto#ram of RESI 1
N$r%al
1
;arry out the <=2 hypothesis test for normality(
Stat / )asic Statistics / *ormalit' Test / +olmoorov,Smirnov

RESI 1
P
e
r
c
e
n
t
3 2 1 0 -1 -2 -3
99
95
90
80
70
60
50
40
30
20
10
5
1
Mea
'0!150
4!263256E-15
St"e# 1!227
N 20
(S 0!120
)-Value
Pro$a$ilit! Plot of RESI 1
N$r%al
$e' 3roduce a time series plot of the errors.
Stat / Time Series / Decomposition / Seasonal lenth ! / "dditive #odel / Trend plus
seasonal 2elect 245E2. and storing Trend$ %its and &esiduals. Graphs / &esidual
plots / %our in one
Residal
P
e
r
c
e
n
t
3!0 1!5 0!0 -1!5 -3!0
99
90
50
10
1
Fitted %ale
R
e
s
i
d

a
l
70 65 60 55 50
3!0
1!5
0!0
-1!5
-3!0
Residal
F
r
e
q

e
n
c
!
3 2 1 0 -1 -2 -3
8
6
4
2
0
&$servation &rder
R
e
s
i
d

a
l
20 18 16 14 12 10 8 6 4 2
3!0
1!5
0!0
-1!5
-3!0
Normal Pro$a$ilit ! Plot of t 'e Residals Residals %erss t 'e Fit t ed %ales
"ist o#ram of t 'e Residals Residals %erss t 'e &rder of t 'e Dat a
Residal Plots for Sales
9o these look to be a good set of residuals>
+
+e are now going to build u) a mo,ing trend )lus seasonal -actor model.
-././ Using Minitab to produce the moving average(
Stat / Time Series / #ovin "verae / Variable 245E2 / #" lenth 4 / Centre the
movin averaes / Store #ovin averaes-
$?ou may need to plot a separate seuence graph of sales and moving average as the
4@ line seems displaced on the default production.'
Moving Average
Length $
0i,e Sales M1 Prei&t *rror
1 $8 * * *
2 58 * * *
3 5' 5'.250 * *
$ 65 5'.8'5 * *
5 50 58.500 * *
6 61 59.125 5'.250 3.'50
' 59 59.'50 5'.8'5 1.125
8 68 60.125 58.500 9.500
9 52 60.250 59.125 #'.125
10 62 60.3'5 59.'50 2.250
11 59 60.500 60.125 #1.125
12 69 60.'50 60.250 8.'50
13 52 61.125 60.3'5 #8.3'5
1$ 6$ 61.'50 60.500 3.500
15 60 62.3'5 60.'50 #0.'50
16 '3 62.625 61.125 11.8'5
1' 53 62.'50 61.'50 #8.'50
18 65 63.000 62.3'5 2.625
19 60 * 62.625 #2.625
20 '5 * 62.'50 12.250
I ndex
S
a
l
e
s
20 18 16 14 12 10 8 6 4 2
75
70
65
60
55
50
M$#i* +#era*e
,e*t- 4
+..ura./ Measures
M+)E 8!9528
M+" 5!6250
MS" 46!9073
Variable
+.tual
Fits
(ovin# )vera#e Plot for Sales
Moving average line appears to be misplaced# so plot lines on a seuence graph.
-
I ndex
D
a
t
a
20 18 16 14 12 10 8 6 4 2
75
70
65
60
55
50
Variable
Sales
+VER1
Time Series Plot of Sales, )%ER1
-./.. !ead the next column Seasonal and type in the appropriate seasonal factors as
produced by the deseasonal composition in "ask 1. "hese were A,.,1# B).0*# =).)+
and B,.&- for uarters ) to + respectively.
;alculate the F.TT/0 values as 4@E7) B 2E42C845
Calc / Calculator / Store result in variable Fitted / ./pression 4@E7) B
2E42C845
-./., 3lot a 2euence graph of 2ales and :itted values to see if this model is better.
Graph / Time Series Plot ( #ultiple 245E2 and :I""E9
9oes this model look a closer fit> It probably does but we need to compare the
residuals.
I ndex
D
a
t
a
20 18 16 14 12 10 8 6 4 2
75
70
65
60
55
50
Variable
Sales
Fitte0
Time Series Plot of Sales, Fitted
/
-./.0 ;alculate the residuals from this model as 7E2I* D 245E2 = :I""E9
-./.)& 1om)are residuals(
$a'# $b'# $c' 3roduce descriptive statistics of 2ales and 7E2I)# 7E2I*.
Descriptive Statistics: Sales, RESI1, RESI*
(aria)le N N* Mean S* Mean StDe+ Mini,-, .1 Meian .3 Ma"i,-,
Sales 20 0 60.50 1.66 '.$0 $8.00 5$.00 60.00 65.00 '5.00
/*S!1 20 0 $.2'$*#15 0.2'$ 1.22' #2.68$ #0.916 #0.0$$9 0.550 2.'3'
/*S!2 16 $ 0.05$' 0.209 0.835 #1.235 #0.3$$ 0.01'5 0.3'5 2.325
$d' :or both sets of errors produce boxplots and histograms with a normal plots.
Graphs / )o/plots / #ultiple Ys / Simple
D
a
t
a
RESI2 RESI1
3
2
1
0
-1
-2
-3
Boxplot of RESI 1, RESI *
Graphs / 0istoram / 1ith (it and roups
Dat a
F
r
e
q

e
n
c
!
3 2 1 0 -1 -2 -3
8
7
6
5
4
3
2
1
0
Mea St"e# N
4!263256E-15 1!227 20
0!05469 0!8353 16
Variable
RESI 1
RESI 3
N$r%al
"isto#ram of RESI 1, RESI *
.
;arry out the <=2 hypothesis test for normality(
Stat / )asic Statistics / *ormalit'Test / +olmoorov,Smirnov
RESI 1
P
e
r
c
e
n
t
3 2 1 0 -1 -2 -3
99
95
90
80
70
60
50
40
30
20
10
5
1
Mea
'0!150
4!263256E-15
St"e# 1!227
N 20
(S 0!120
)-Value
Pro$a$ilit! Plot of RESI 1
N$r%al
RESI *
P
e
r
c
e
n
t
2 1 0 -1 -2
99
95
90
80
70
60
50
40
30
20
10
5
1
Mea
0!234
0!05469
St"e# 0!8353
N 16
+" 0!455
)-Value
Pro$a$ilit! Plot of RESI *
N$r%al
$e' 3roduce a time series plots of both sets of errors.
Graph / Time Series Plot 7E2I) 7E2I*
,
Which set look preferable> "he set from the moving average model is better.
-./.))4ssuming that the trend from the moving average model# 4@E7)# is increasing by &.1
per uarter# what would be your forecasts for the four uarters of *&&/> ;ompare with
those produced in "ask -./.1.
"ime "rend 2easonal :orecast
), /1.& B).0*
)0 /1.1 =).)+
*& /1./ B,.&-
*) /1.0 =,.,1 --.&. 551 !!!
** /+.* B).0* //.)* 661 !!!
*1 /+.- =).)+ /1.1/ 6'4 !!!
*+ /+., B,.&- .*.,- 2&3 !!!
Index
D
a
t
a
20 18 16 14 12 10 8 6 4 2
2!5
2!0
1!5
1!0
0!5
0!0
-0!5
-1!0
Variable
RESI1
RESI2
Time Series Plot of RESI1, RESI*
0

You might also like