Você está na página 1de 49

Time ISC Forecast Error Abs Error % Error MAPE minimized usng Solver

1 235 235.00
2 320 235.00 ME MAE
3 115 236.51 5.10 39.37
4 355 234.35
5 190 236.50
6 320 235.67
7 275 237.17
8 205 237.84
9 295 237.26
10 240 238.29
11 355 238.32
12 175 240.39
13 285 239.23
14 200 240.04
15 290 239.33
16 220 240.23
17 400 239.87
18 275 242.72
19 185 243.30
20 370 242.2597
21 255 244.53 10.47 10.47 4.10%
22 285 244.72 40.28 40.28 14.13%
23 250 245.44 4.56 4.56 1.83%
24 300 245.52 54.48 54.48 18.16%
25 225 246.49 -21.49 21.49 9.55%
26 285 246.10 38.90 38.90 13.65%
27 250 246.80 3.20 3.20 1.28%
28 225 246.85 -21.85 21.85 9.71%
29 125 246.46 -121.46 121.46 97.17%
30 295 244.30 50.70 50.70 17.19%
31 250 245.21 4.79 4.79 1.92%
32 355 245.29 109.71 109.71 30.90%
33 280 247.24 32.76 32.76 11.70%
34 370 247.83 122.17 122.17 33.02%
35 250 250.00 0.00 0.00 0.00%
36 290 250.00 40.00 40.00 13.79%
37 225 250.71 -25.71 25.71 11.43%
38 270 250.25 19.75 19.75 7.31%
39 180 250.61 -70.61 70.61 39.23%
40 270 249.35 20.65 20.65 7.65%
41 240 249.72 -9.72 9.72 4.05%
42 275 249.54 25.46 25.46 9.26%
43 225 250.00 -25.00 25.00 11.11%
44 285 249.55 35.45 35.45 12.44%
45 250 250.18 -0.18 0.18 0.07%
46 310 250.18 59.82 59.82 19.30%
47 220 251.24 -31.24 31.24 14.20%
48 320 250.69 69.31 69.31 21.66%
49 215 251.92 -36.92 36.92 17.17%
50 260 251.26 8.74 8.74 3.36%
51 190 251.42 -61.42 61.42 32.33%
52 295 250.33 44.67 44.67 15.14%
53 275 251.12 23.88 23.88 8.68%
54 205 251.55 -46.55 46.55 22.71%
55 265 250.72 14.28 14.28 5.39%
56 245 250.97 -5.97 5.97 2.44%
57 170 250.87 -80.87 80.87 47.57%
58 175 249.43 -74.43 74.43 42.53%
59 270 248.10 21.90 21.90 8.11%
60 225 248.49 -23.49 23.49 10.44%
61 340 248.07 91.93 91.93 27.04%
62 190 249.71 -59.71 59.71 31.43%
63 250 248.65 1.35 1.35 0.54%
64 300 248.67 51.33 51.33 17.11%
65 195 249.59 -54.59 54.59 27.99%
Alpha 0.017795

MAPE 66 248.6138
16.80% 67 233.3745
68 233.3745
ISC
235
320
115
355 C
190 450
320 400
275 350
205 300
295 250
240 200
355 150
175 100
285 50
200
0
290
220
400
275
185
370 In practise you will always find small trends, but you would
255 In the above case it is about 2% percent variation.
285
250
300
225
285
250
225
125
295
250
355
280
370
250
290
225
270
180
270
240
275
225
285
250
310
220
320
215
260
190
295
275
205
265
245
170
175
270
225
340
190
250
300
195
Chart Title

ISC

mall trends, but you would take a call depending on the magnitude
percent variation.
Time ISC Forecast Error Abs Error % Error Data below time period 21, is my test data
1 235.00
2 320.00 235.00
3 115.00 320.00
4 355.00 115.00
5 190.00 355.00
6 320.00 190.00
7 275.00 320.00
8 205.00 275.00
9 295.00 205.00
10 240.00 295.00
11 355.00 240.00
12 175.00 355.00
13 285.00 175.00
14 200.00 285.00
15 290.00 200.00
16 220.00 290.00
17 400.00 220.00
18 275.00 400.00
19 185.00 275.00
20 370.00 185.00
21 255.00 370.00 -115.00 115.00 45.10%
22 285.00 255.00 30.00 30.00 10.53%
23 250.00 285.00 -35.00 35.00 14.00%
24 300.00 250.00 50.00 50.00 16.67%
25 225.00 300.00 -75.00 75.00 33.33%
26 285.00 225.00 60.00 60.00 21.05%
27 250.00 285.00 -35.00 35.00 14.00%
28 225.00 250.00 -25.00 25.00 11.11%
29 125.00 225.00 -100.00 100.00 80.00%
30 295.00 125.00 170.00 170.00 57.63%
31 250.00 295.00 -45.00 45.00 18.00%
32 355.00 250.00 105.00 105.00 29.58%
33 280.00 355.00 -75.00 75.00 26.79%
34 370.00 280.00 90.00 90.00 24.32%
35 250.00 370.00 -120.00 120.00 48.00%
36 290.00 250.00 40.00 40.00 13.79%
37 225.00 290.00 -65.00 65.00 28.89%
38 270.00 225.00 45.00 45.00 16.67%
39 180.00 270.00 -90.00 90.00 50.00%
40 270.00 180.00 90.00 90.00 33.33%
41 240.00 270.00 -30.00 30.00 12.50%
42 275.00 240.00 35.00 35.00 12.73%
43 225.00 275.00 -50.00 50.00 22.22%
44 285.00 225.00 60.00 60.00 21.05%
45 250.00 285.00 -35.00 35.00 14.00%
46 310.00 250.00 60.00 60.00 19.35%
47 220.00 310.00 -90.00 90.00 40.91%
48 320.00 220.00 100.00 100.00 31.25%
49 215.00 320.00 -105.00 105.00 48.84%
50 260.00 215.00 45.00 45.00 17.31%
51 190.00 260.00 -70.00 70.00 36.84%
52 295.00 190.00 105.00 105.00 35.59%
53 275.00 295.00 -20.00 20.00 7.27%
54 205.00 275.00 -70.00 70.00 34.15%
55 265.00 205.00 60.00 60.00 22.64%
56 245.00 265.00 -20.00 20.00 8.16%
57 170.00 245.00 -75.00 75.00 44.12%
58 175.00 170.00 5.00 5.00 2.86%
59 270.00 175.00 95.00 95.00 35.19%
60 225.00 270.00 -45.00 45.00 20.00%
61 340.00 225.00 115.00 115.00 33.82%
62 190.00 340.00 -150.00 150.00 78.95%
63 250.00 190.00 60.00 60.00 24.00%
64 300.00 250.00 50.00 50.00 16.67%
65 195.00 300.00 -105.00 105.00 53.85%
od 21, is my test data Forecast
Time ME MAE MAPE LL UL
66 195.00 -3.89 69.22 28.60% 139.2279 250.7721
67 195.00
68 195.00

we use 195 for the coming months, as there is no seasonality and trend

We need to check if MAPE is acceptable or not as per business perspective


calculate error in forecast as per MAP

ME should be much smaller than MAE

if ME for eg in the case is -68 , then I am consistenly over forecasting (actual - forecasting)

suppose you plot abs% error against tiem nad it is having a trend...
(check notebook)
forecasting)
Time ISC Forecast Error Abs Err Abs % Error
1 235
2 320 66 248.3333 ME MAE
3 115 67 248.3333 -2.37037 48.59259
4 355 223.3333 68 248.3333
5 190 263.3333
6 320 220
7 275 288.3333
8 205 261.6667
9 295 266.6667
10 240 258.3333
11 355 246.6667 Same value used for all these thr
12 175 296.6667
13 285 256.6667
14 200 271.6667
15 290 220
16 220 258.3333
17 400 236.6667 400
18 275 303.3333
19 185 298.3333 350
20 370 286.6667
21 255 276.6667 -21.66667 21.66667 0.08496732 300
22 285 270 15 15 0.05263158 250
23 250 303.3333 -53.33333 53.33333 0.21333333
24 300 263.3333 36.66667 36.66667 0.12222222 200
25 225 278.3333 -53.33333 53.33333 0.23703704
26 285 258.3333 26.66667 26.66667 0.09356725 150
27 250 270 -20 20 0.08 100
28 225 253.3333 -28.33333 28.33333 0.12592593
29 125 253.3333 -128.3333 128.3333 1.02666667 50
30 295 200 95 95 0.3220339
31 250 215 35 35 0.14 0
32 355 223.3333 131.6667 131.6667 0.37089202 2 2 2 2 2 2 2 2 2 3 3 3 3 3
33 280 300 -20 20 0.07142857 1 2 3 4 5 6 7 8 9 0 1 2 3 4
34 370 295 75 75 0.2027027
35 250 335 -85 85 0.34
36 290 300 -10 10 0.03448276
37 225 303.3333 -78.33333 78.33333 0.34814815
38 270 255 15 15 0.05555556
39 180 261.6667 -81.66667 81.66667 0.4537037
40 270 225 45 45 0.16666667
41 240 240 0 0 0
42 275 230 45 45 0.16363636
43 225 261.6667 -36.66667 36.66667 0.16296296
44 285 246.6667 38.33333 38.33333 0.13450292
45 250 261.6667 -11.66667 11.66667 0.04666667
46 310 253.3333 56.66667 56.66667 0.1827957
47 220 281.6667 -61.66667 61.66667 0.28030303
48 320 260 60 60 0.1875
49 215 283.3333 -68.33333 68.33333 0.31782946
50 260 251.6667 8.333333 8.333333 0.03205128
51 190 265 -75 75 0.39473684
52 295 221.6667 73.33333 73.33333 0.24858757
53 275 248.3333 26.66667 26.66667 0.0969697
54 205 253.3333 -48.33333 48.33333 0.23577236
55 265 258.3333 6.666667 6.666667 0.02515723
56 245 248.3333 -3.333333 3.333333 0.01360544
57 170 238.3333 -68.33333 68.33333 0.40196078
58 175 226.6667 -51.66667 51.66667 0.2952381
59 270 196.6667 73.33333 73.33333 0.27160494
60 225 205 20 20 0.08888889
61 340 223.3333 116.6667 116.6667 0.34313725
62 190 278.3333 -88.33333 88.33333 0.46491228
63 250 251.6667 -1.666667 1.666667 0.00666667
64 300 260 40 40 0.13333333
65 195 246.6667 -51.66667 51.66667 0.26495726
MAPE Whatever model we choose, should be better than NF1
0.207461 When you are month in 67, you do not know the actual value of 66, so best estimate is past values

Same value used for all these three months, because past is best prediction

Actual

2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 5 5 6 6 6 6 6 6
2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
imate is past values

Actual

6
5
Time ISC Forecast Error Abs Err Abs % Error
1 235
2 320 66 235.8333 ME MAE
3 115 67 235.8333 -5.537037 40.51852
4 355 68 235.8333
5 190
6 320
7 275
8 205
9 295
10 240
11 355 Same value used for all these thr
12 175
13 285 256.6667
14 200 260.8333
15 290 250.8333
16 220 265.4167
17 400 254.1667 400
18 275 271.6667
19 185 267.9167 350
20 370 260.4167
21 255 274.1667 -19.16667 19.16667 0.0751634 300
22 285 270.8333 14.16667 14.16667 0.0497076 250
23 250 274.5833 -24.58333 24.58333 0.09833333
24 300 265.8333 34.16667 34.16667 0.11388889 200
25 225 276.25 -51.25 51.25 0.22777778
26 285 271.25 13.75 13.75 0.04824561 150
27 250 278.3333 -28.33333 28.33333 0.11333333 100
28 225 275 -50 50 0.22222222
29 125 275.4167 -150.4167 150.4167 1.20333333 50
30 295 252.5 42.5 42.5 0.1440678
31 250 254.1667 -4.166667 4.166667 0.01666667 0
32 355 259.5833 95.41667 95.41667 0.26877934 2 2 2 2 2 2 2 2 2 3 3 3 3 3
33 280 258.3333 21.66667 21.66667 0.07738095 1 2 3 4 5 6 7 8 9 0 1 2 3 4
34 370 260.4167 109.5833 109.5833 0.29617117
35 250 267.5 -17.5 17.5 0.07
36 290 267.5 22.5 22.5 0.07758621
37 225 266.6667 -41.66667 41.66667 0.18518519
38 270 266.6667 3.333333 3.333333 0.01234568
39 180 265.4167 -85.41667 85.41667 0.47453704
40 270 259.5833 10.41667 10.41667 0.03858025
41 240 263.3333 -23.33333 23.33333 0.09722222
42 275 272.9167 2.083333 2.083333 0.00757576
43 225 271.25 -46.25 46.25 0.20555556
44 285 269.1667 15.83333 15.83333 0.05555556
45 250 263.3333 -13.33333 13.33333 0.05333333
46 310 260.8333 49.16667 49.16667 0.15860215
47 220 255.8333 -35.83333 35.83333 0.16287879
48 320 253.3333 66.66667 66.66667 0.20833333
49 215 255.8333 -40.83333 40.83333 0.18992248
50 260 255 5 5 0.01923077
51 190 254.1667 -64.16667 64.16667 0.3377193
52 295 255 40 40 0.13559322
53 275 257.0833 17.91667 17.91667 0.06515152
54 205 260 -55 55 0.26829268
55 265 254.1667 10.83333 10.83333 0.0408805
56 245 257.5 -12.5 12.5 0.05102041
57 170 254.1667 -84.16667 84.16667 0.49509804
58 175 247.5 -72.5 72.5 0.41428571
59 270 236.25 33.75 33.75 0.125
60 225 240.4167 -15.41667 15.41667 0.06851852
61 340 232.5 107.5 107.5 0.31617647
62 190 242.9167 -52.91667 52.91667 0.27850877
63 250 237.0833 12.91667 12.91667 0.05166667
64 300 242.0833 57.91667 57.91667 0.19305556
65 195 242.5 -47.5 47.5 0.24358974
MAPE Whatever model we choose, should be better than NF1
0.179024 When you are month in 67, you do not know the actual value of 66, so best estimate is past values

Same value used for all these three months, because past is best prediction

Actual

2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 5 5 6 6 6 6 6 6
2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
imate is past values

Actual

6
5
No

4
Description

Use "Yields Data"


Plot Yield Vs Time using Excel Graph
Fit Trend Line .. Linear / Power / etc.
Conclusion?
Use Regression for better precision
Find out R for Time Lag 1

Use "Quarterly Data"


Create variable from Year & Quarter, say a running number
Create Lable using Year and Quarter
Plot Sale vs Time
What do you conclude?
Fit a trend line -- linear
What do you conclude?
Plot for each year separately as a different series. What do you conclude?
Use XLMiner --> Time Series --> ACF with 8 lags. What do you observe?
Calculate R using Excel --> Data Analysis --> Correlation Some error with ACF Plot
Us "EggNogSales"
Create Table with sales having 12 time lags
Calculate R for each time lag
What do you conclude?
Draw ACF plot using XLMiner
What do you conclude?
Choose "Evaluation Parameters"
For given data, find out all the parameters, i.e. ME, MAD, MSE, MPE, MAPE)
0.649626
0.310828
0.79725
0.861351
0.490703
0.577492
0.560483
0.036027
0.3023
0.479182
0.890661
0.984101
0.229601
0.038939
0.801456
0.546895
0.953228
0.179252
0.365172
0.138621
0.117279
0.540894
0.092301
0.888684
0.59234
0.556117
0.955356
0.362547
0.394577
0.299262
0.116115
0.672587
0.523869
0.900921
0.992311
0.17368
0.808782
0.193963
0.68602
0.731941
0.994388
0.091154
0.797921
0.930751
0.207254
0.167148
0.922973
0.782563
0.678773
0.25505
0.634966
0.226291
0.916335
0.134597
0.091942
0.593033
0.161169
0.841986
0.980165
0.688303
0.781399
0.165029
0.341064
0.828362
0.81035
0.84644
0.884963
0.766553
0.379051
0.456697
0.850393
0.257337
0.308028
0.919447
0.650657
0.579979
0.767689
0.076824
0.3611
0.762941
0.929782
0.761654
0.152253
0.401134
0.470353
0.312353
0.013669
0.059172
0.774494
0.711332
0.509606
0.819111
0.670952
0.715025
0.327434
0.662639
0.413102
0.447186
0.728515
0.970219
0.006709
0.294711
0.679467
0.772616
0.618893
0.098972
0.865575
0.275567
0.584652
0.282683
0.176907
0.867727
0.868411
0.93828
0.917631
0.456392
0.319974
0.173523
0.191355
0.647291
0.585765
0.749368
0.55396
0.291313
0.004565
0.404305
0.301408
0.497946
0.036791
0.315
0.362879
0.394549
0.86961
0.300014
0.916966
0.656114
0.229763
0.580998
0.575277
0.246145
0.628215
0.795277
0.638409
0.199379
0.193462
0.302214
0.906757
0.807812
0.527213
0.47559
0.791819
0.814435
0.499926
0.00053
0.702752
0.55784
0.863427
0.716053
0.053588
0.014534
0.712232
0.362336
0.294552
0.588078
0.707972
0.119174
0.931385
0.332022
0.933119
0.40955
0.948532
0.931167
0.435161
0.503352
0.474817
0.738389
0.013329
0.009071
0.238485
0.695086
0.623278
0.178078
0.116755
0.868196
0.416266
0.427484
0.654635
0.562193
0.309326
0.438824
0.031552
0.663289
0.731365
0.925082
0.845674
0.464623
0.219231
0.294101
0.702702
0.356095
0.924042
0.650041
0.511689
0.850402
0.986909
0.130016
0.209015
0.963064
0.758211
0.241258
0.687904
0.012202
0.065019
0.00674
0.099133
0.090933
0.399858
0.097917
0.059388
0.55379
0.034889
0.862806
0.324637
0.363867
0.416253
0.343697
0.1809
0.283573
0.533458
0.651797
0.837084
0.199375
0.408768
0.032507
0.052917
0.534565
0.04575
0.062833
0.356197
0.335537
0.463761
0.61376
0.423376
0.580635
0.043942
0.093006
0.070294
0.205072
0.282007
0.736063
143
152
161
139
137
174
142
141
300
162
180
164 250
171
206 200
193
207
218 150
229
225 100
204
227
50
223
242
239 0
266 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1
Column A

10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
Year Average Yield (in %)
1 14.03
2 10.69
3 8.63
4 9.58
5 7.48
6 5.98
7 5.82
8 6.69
9 8.12 Average Yi
10 7.51 16
11 5.42 14
12 3.45
13 3.02 12
14 4.29 10
15 5.51
16 5.02 8
17 5.07 6
4
2
0
1 2 3 4 5 6 7 8 9 10 1112 1314 15
Average Yield (in %)

7 8 9 10 1112 1314 1516 17


SUMMARY OUTPUT

Regression Statistics
Multiple R 0.8078
R Square 0.652541
Adjusted R 0.629377
Standard E 1.697166
Observatio 17

ANOVA
df SS MS F Significance F
Regression 1 81.14167 81.14167 28.17056 8.8E-005
Residual 15 43.20557 2.880372
Total 16 124.3472

Coefficients
Standard Error t Stat P-value Lower 95%Upper 95%
Intercept 10.85537 0.860972 12.60828 2.2E-009 9.02025 12.69049
Year -0.445956 0.084022 -5.307594 8.8E-005 -0.625045 -0.266867

RESIDUAL OUTPUT

Observation
Predicted Average Yield
Residuals
(in %)
1 10.40941 3.620588
2 9.963456 0.726544
3 9.5175 -0.8875
4 9.071544 0.508456
5 8.625588 -1.145588
6 8.179632 -2.199632
7 7.733676 -1.913676
8 7.287721 -0.597721
9 6.841765 1.278235
10 6.395809 1.114191
11 5.949853 -0.529853
12 5.503897 -2.053897
13 5.057941 -2.037941
14 4.611985 -0.321985
15 4.166029 1.343971
16 3.720074 1.299926
17 3.274118 1.795882
Lower 95.0%
Upper 95.0%
9.02025 12.69049
-0.625045 -0.266867
Year Quarter Time Sales Sales +1 Sales +2 Sales +3 Sales +4 Sales +5 Sales+6
1 Q1 1 473 599 854 1632 211 313 499
1 Q2 2 599 854 1632 211 313 499 1523
1 Q3 3 854 1632 211 313 499 1523 409
1 Q4 4 1632 211 313 499 1523 409 265
2 Q1 5 211 313 499 1523 409 265 571
2 Q2 6 313 499 1523 409 265 571 1432
2 Q3 7 499 1523 409 265 571 1432 524
2 Q4 8 1523 409 265 571 1432 524 673
3 Q1 9 409 265 571 1432 524 673 621
3 Q2 10 265 571 1432 524 673 621 1469
3 Q3 11 571 1432 524 673 621 1469 286
3 Q4 12 1432 524 673 621 1469 286 455
4 Q1 13 524 673 621 1469 286 455 460
4 Q2 14 673 621 1469 286 455 460 1680
4 Q3 15 621 1469 286 455 460 1680
4 Q4 16 1469 286 455 460 1680
5 Q1 17 286 455 460 1680
5 Q2 18 455 460 1680
5 Q3 19 460 1680
5 Q4 20 1680

Now we are assuming the initial sales plot had seasonality at 4 months interval, so I ccheck seasonality coefficient,
Chart Title
1800
1600
ck seasonality coefficient, 1400
1200
1000
Sa
800
600
400
200
0
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Sales

7 18 19 20
Sales Sales +1 Sales +2 Sales +3 Sales +4
Sales 1
Sales +1 -0.1662189139 1
Sales +2 -0.442871314 -0.1896785268 1
Sales +3 -0.3223090137 -0.4113643746 -0.264781 1
Sales +4 0.8959949957 -0.2798954596 -0.442608 -0.279683715 1
Sales +5 -0.1350405952 0.8986099094 -0.341731 -0.395863733 -0.149649688
Sales+6 -0.3619805564 -0.1829666883 0.917859 -0.413685744 -0.3479875815

1.2
Co-relation between sales and sales+4 is large
1
C0-relation coefficient we use is an approximate formula 0.8
0.6
Auto- Corelation factors
0.4
Auto-corelation factor 1 (ACF1) mean correlation between Sales & Sales +1
0.2
0
Sales Sales
-0.2
-0.4
-0.6
Sales +5 Sales+6

1
-0.2684111557 1

Sales
1.2
1
0.8
0.6
0.4
0.2
0
Sales Sales +1 Sales +2 Sales +3 Sales +4 Sales +5 Sales+6
-0.2
-0.4
-0.6
6
Year Quarter Sales (in$'000) Label Time
1984 1 251.8 1984-1 1
1984 2 273.1 1984-2 2
1984 3 249.1 1984-3 3
1984 4 147.6 1984-4 4
1985 1 221.2 1985-1 5
1985 2 260.2 1985-2 6
1985 3 259.5 1985-3 7
1985 4 139.3 1985-4 8
1986 1 245.5 1986-1 9
1986 2 298.8 1986-2 10
1986 3 287 1986-3 11
1986 4 140.5 1986-4 12
1987 1 322.6 1987-1 13
1987 2 393.5 1987-2 14
1987 3 404.3 1987-3 15
1987 4 168.8 1987-4 16

Sale (Cur Lag1


251.8 221.2 Column 1 Column 2
273.1 260.2 Column 1 1
249.1 259.5 Column 2 0.887371 1
147.6 139.3
221.2 245.5
260.2 298.8
259.5 287
139.3 140.5
245.5 322.6
298.8 393.5
287 404.3
140.5 168.8
Year Actual Forecast
1 1458 1402.0
2 1553 1441.2
3 1613 1519.5
4 1676 1585.0
5 1755 1648.7
6 1807 1723.1
7 1824 1781.8
8 1826 1811.3
9 1780 1821.6
10 1759 1792.5

Você também pode gostar