Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
`
Forecasting Analytics Project – Yogurt sales Ravinderpal S Wasu – 71710004
Siddharth Gupta - 71710106
1
Forecasting Analytics Project – Yogurt sales Ravinderpal S Wasu – 71710004
Siddharth Gupta - 71710106
1. Project Proposal
Data Set: The data set for the project has sale of various brands, products, flavors and volume of yogurts on a
weekly basis with customer demographics such as occupation, gender, age, Education, etc. Data file
yogurt.csv. This file captures 52 weeks of sales data.
Forecasting goal: The goal of the project is to identify the variable that have significant impact on the total
sales in Dollars or in Units of Yogurt Brands and forecast the sales for the next 12 weeks. The team wise
allocation would be to work on different brand as below:
a) Member 1: Yoplait Original
b) Member 2: Dannon Light N Fit
Forecast horizon: Forecast Horizon would be for a period of 3 months (12 weeks). Total number of units to be
sold for each brand in the next 3 months would be computed
Needed data granularity: Transaction level granularity will be considered at weekly level as the sales data is
provided for the weekly sales for the various brands of Yogurt with all the independent variables given in the
data
Charts:
The charts below showcase the presence of both seasonality and noise in the data
2
Forecasting Analytics Project – Yogurt sales Ravinderpal S Wasu – 71710004
Siddharth Gupta - 71710106
Steps taken so far: We have performed data sanitization on the date format of the week starting and week ending date.
The date was provided in 2 formats MDY and DMY. The data for dates has been sanitized to DMY format across the week
start and week end date
3
Forecasting Analytics Project – Yogurt sales Ravinderpal S Wasu – 71710004
Siddharth Gupta - 71710106
Series 3: Relating the impact of demographic variables and sales. Forecasting the sales for Yoplait Original
yogurt
Sales analysis and impact due to demographic varaibles
Forecasting for yogurt of Brand Name Yoplait Original
Forecast Horizon would be for a period of 3 months (12 weeks)
Sales dimension used = Weekly
Measurement of interest = Sales in Units per week
Series 4: Relating the impact of demographic variables and sales. Forecasting the sales for Dannon Light N
Fit yogurt
Sales analysis and impact due to demographic varaibles
Forecasting for yogurt of Brand Name Dannon Light N Fit
Forecast Horizon would be for a period of 3 months (12 weeks)
Sales dimension used = Weekly
Measurement of interest = Sales in Units per week
4
Forecasting Analytics Project – Yogurt sales Ravinderpal S Wasu – 71710004
Siddharth Gupta - 71710106
Forecasting use Naïve method, for forecasting for 12 weeks, we get the below forecast plot
6
Forecasting Analytics Project – Yogurt sales Ravinderpal S Wasu – 71710004
Siddharth Gupta - 71710106
4. Series 1 - Analyzing best method for sales forecast using XLMiner for Yoplait
Original Yogurt
As seen in the data in YogurtYoplaitOriginalWeekly.xlsx – with Week number and Sum of sales in that week
7
Forecasting Analytics Project – Yogurt sales Ravinderpal S Wasu – 71710004
Siddharth Gupta - 71710106
Result - MASmoothingOutput:
8
Forecasting Analytics Project – Yogurt sales Ravinderpal S Wasu – 71710004
Siddharth Gupta - 71710106
500
400
Forecast
300
Actual
200
100
0
1362 1364 1366 1368 1370 1372 1374
Week
9
Forecasting Analytics Project – Yogurt sales Ravinderpal S Wasu – 71710004
Siddharth Gupta - 71710106
10
Forecasting Analytics Project – Yogurt sales Ravinderpal S Wasu – 71710004
Siddharth Gupta - 71710106
Parameters/Options
Optimization Selected Yes
Alpha (Level) 0.080446791
Forecast Yes
#Forecasts 12
Forecast
Week Actual Forecast Error LCI UCI
1362 374.82 471.5858 -96.7658 90.90023 852.2714
1363 417.07 471.5858 -54.5158 89.67038 853.5013
1364 289.02 471.5858 -182.566 88.44447 854.7272
1365 203.54 471.5858 -268.046 87.22248 855.9492
1366 675.51 471.5858 203.9242 86.00436 857.1673
1367 399.83 471.5858 -71.7558 84.79007 858.3816
1368 253.91 471.5858 -217.676 83.57959 859.5921
1369 224.13 471.5858 -247.456 82.37287 860.7988
1370 348.21 471.5858 -123.376 81.16987 862.0018
1371 233.45 471.5858 -238.136 79.97058 863.2011
1372 362.98 471.5858 -108.606 78.77494 864.3967
1373 446.26 471.5858 -25.3258 77.58294 865.5887
11
Forecasting Analytics Project – Yogurt sales Ravinderpal S Wasu – 71710004
Siddharth Gupta - 71710106
500
400
Forecast
300
Actual
200
100
0
1362 1364 1366 1368 1370 1372 1374
Week
With Optimize option, we get lower MAPE value compared to α = 0.2 , so selecting the MAPE and
forecast value for the Optimize option
Updating Comparison table as below:
Sr. No. Method MAPE Forecast value Comments
1 Moving Average 51.92012068 463.585 As MA method does not consider
(12) Trend and Seasonality, the
Forecasted value is constant
2 Simple 54.25440777 471.5858 As Simple Exponential Smoothing
Exponential method does not consider Trend
Smoothing and Seasonality, the Forecasted
method value is constant
3 Holt’s Exponential To be calculated
Smoothing
method
4 Holt-Winter’s To be calculated
Exponential
Smoothing
method
So comparing between Moving Average (12) and Simple Exponential Smoothing method, the MAPE
value for Moving Average (12) is lower. So between these 2 methods, Moving Average (12) should be
used for forecasting
12
Forecasting Analytics Project – Yogurt sales Ravinderpal S Wasu – 71710004
Siddharth Gupta - 71710106
Forecast
Week Actual Forecast Error LCI UCI
1362 374.82 510.8642 -136.044 108.5701 913.1583
1363 417.07 521.7081 -104.638 108.9104 934.5058
1364 289.02 532.552 -243.532 106.7089 958.3951
1365 203.54 543.3959 -339.856 101.8609 984.9308
1366 675.51 554.2397 121.2703 94.3206 1014.159
1367 399.83 565.0836 -165.254 84.09393 1046.073
1368 253.91 575.9275 -322.017 71.22871 1080.626
1369 224.13 586.7714 -362.641 55.80409 1117.739
1370 348.21 597.6152 -249.405 37.92017 1157.31
1371 233.45 608.4591 -375.009 17.68915 1199.229
1372 362.98 619.303 -256.323 -4.77175 1243.378
1373 446.26 630.1469 -183.887 -29.3456 1289.639
13
Forecasting Analytics Project – Yogurt sales Ravinderpal S Wasu – 71710004
Siddharth Gupta - 71710106
Parameters/Options
Optimization Selected Yes
Alpha (Level) 0.000427259
Beta (Trend) 0.165318766
Forecast Yes
#Forecasts 12
Forecast
Week Actual Forecast Error LCI UCI
1362 374.82 464.1509 -89.3309 103.3341 824.9678
1363 417.07 465.2321 -48.1621 104.4152 826.049
1364 289.02 466.3132 -177.293 105.4963 827.1302
1365 203.54 467.3944 -263.854 106.5774 828.2114
1366 675.51 468.4755 207.0345 107.6584 829.2926
1367 399.83 469.5567 -69.7267 108.7394 830.3739
1368 253.91 470.6378 -216.728 109.8205 831.4551
1369 224.13 471.7189 -247.589 110.9015 832.5364
1370 348.21 472.8001 -124.59 111.9824 833.6178
1371 233.45 473.8812 -240.431 113.0634 834.6991
1372 362.98 474.9624 -111.982 114.1443 835.7805
1373 446.26 476.0435 -29.7835 115.2252 836.8619
14
Forecasting Analytics Project – Yogurt sales Ravinderpal S Wasu – 71710004
Siddharth Gupta - 71710106
500
400
Forecast
300
Actual
200
100
0
1362 1364 1366 1368 1370 1372 1374
Week
With Optimize option, we get lower MAPE value compared to default α = 0.2, and β =0.15. So selecting
the MAPE and forecast value for the Optimize option
Updating Comparison table as below:
Sr. No. Method MAPE Forecast value Comments
1 Moving Average 51.92012068 463.585 As MA method does not consider
(12) Trend and Seasonality, the
Forecasted value is constant
2 Simple 54.25440777 471.5858 As Simple Exponential Smoothing
Exponential method does not consider Trend
Smoothing and Seasonality, the Forecasted
method value is constant
3 Holt’s Exponential 53.88019428 As per table This contains trend, so values are
Smoothing above different
method
4 Holt-Winter’s To be calculated
Exponential
Smoothing
method
So comparing between Moving Average (12), Simple Exponential Smoothing method and Holt’s
Exponential Smoothing method, the MAPE value for Moving Average (12) is lower. So between these 3
methods, Moving Average (12) should be used for forecasting
15
Forecasting Analytics Project – Yogurt sales Ravinderpal S Wasu – 71710004
Siddharth Gupta - 71710106
Forecast
Week Actual Forecast Error LCI UCI
1362 374.82 675.2614 -300.441 337.1091 1013.414
1363 417.07 679.9169 -262.847 332.9357 1026.898
1364 289.02 581.6758 -292.656 223.7292 939.6225
1365 203.54 496.5624 -293.022 125.4258 867.699
1366 675.51 820.6514 -145.141 434.0618 1207.241
1367 399.83 649.2614 -249.431 244.9607 1053.562
1368 253.91 880.9151 -627.005 456.6855 1305.145
1369 224.13 670.988 -446.858 224.6782 1117.298
1370 348.21 554.3247 -206.115 83.86739 1024.782
1371 233.45 627.8292 -394.379 131.2516 1124.407
16
Forecasting Analytics Project – Yogurt sales Ravinderpal S Wasu – 71710004
Siddharth Gupta - 71710106
Parameters/Options
Optimize Weights Yes
Alpha (Level) 0.004119999
Beta (Trend) 0.218482009
Gamma (Seasonality) 0.000579852
Season length 12
Number of seasons 3
Forecast Yes
#Forecasts 12
Forecast
Week Actual Forecast Error LCI UCI
1362 374.82 607.7332 -232.913 286.6127 928.8537
1363 417.07 591.2569 -174.187 270.1323 912.3814
1364 289.02 434.1308 -145.111 113.0007 755.261
1365 203.54 297.4931 -93.9531 -23.6445 618.6307
1366 675.51 706.934 -31.424 385.7868 1028.081
1367 399.83 453.6008 -53.7708 132.4417 774.7599
1368 253.91 738.5362 -484.626 417.3625 1059.71
1369 224.13 434.4607 -210.331 113.2696 755.6518
1370 348.21 251.3772 96.83283 -69.8345 572.5889
1371 233.45 319.2015 -85.7515 -2.03417 640.4372
1372 362.98 313.0383 49.94171 -8.22501 634.3016
1373 446.26 400.9167 45.34331 79.62184 722.2115
17
Forecasting Analytics Project – Yogurt sales Ravinderpal S Wasu – 71710004
Siddharth Gupta - 71710106
500
400
Forecast
300
Actual
200
100
0
1362 1364 1366 1368 1370 1372 1374
Week
With Optimize option, we get lower MAPE value compared to default α = 0.2, β =0.15 and γ = 0.05.
So selecting the MAPE and forecast values for the Optimize option
So comparing between all 4 methods, the MAPE value for Holt-Winter’s Exponential Smoothing
method is lower. So between these 4 methods, Holt-Winter’s Exponential Smoothing method should be
used for forecasting
18
Forecasting Analytics Project – Yogurt sales Ravinderpal S Wasu – 71710004
Siddharth Gupta - 71710106
5. Series 1 - Forecasting sales for Yoplait Original Yogurt using the Holt-Winters
Additive Smoothing method
In the excel YogurtYoplaitOriginalWeeklyHoltWintersMethod.xlsx
From the DataYoplaitOriginal data sheet, forecasted Holt-Winters Additive Exponential Smoothing method
using the Optimize option
Parameters/Options
Optimize Weights Yes
Alpha (Level) 0.004119999
Beta (Trend) 0.218482009
Gamma (Seasonality) 0.000579852
Season length 12
Number of seasons 4
Forecast Yes
#Forecasts 12
19
Forecasting Analytics Project – Yogurt sales Ravinderpal S Wasu – 71710004
Siddharth Gupta - 71710106
Forecast
Week Forecast LCI UCI
1 508.8952 214.7787 803.0117
2 510.0666 215.9464 804.1868
3 359.1524 65.02709 653.2777
4 235.9405 -58.1917 530.0726
5 670.8017 376.6607 964.9426
6 406.1308 111.9789 700.2826
7 560.45 266.2848 854.6152
8 336.9101 42.72896 631.0913
9 237.279 -56.921 531.479
10 343.7202 49.49821 637.9421
11 338.4913 44.24401 632.7385
12 475.5468 181.2707 769.823
600
400 Forecast
200 Actual
0
1322 1342 1362 1382
Week
20
Forecasting Analytics Project – Yogurt sales Ravinderpal S Wasu – 71710004
Siddharth Gupta - 71710106
Now we can take these values and add to the Fitted Model table
And then plot the Yoplait Original Sales forecast for next 12 weeks
Series1 Series2
Conclusion
With the forecasted sales, retailer can now stock as per forecasted demand.
In Week 1377 and 1382, sales are forecasted to go down. Manufacture, dealers and retailers can
negotiate and provide deals to customers in those weeks to boost the sales
21
Forecasting Analytics Project – Yogurt sales Ravinderpal S Wasu – 71710004
Siddharth Gupta - 71710106
Forecasting use Naïve method, for forecasting for 12 weeks, we get the below forecast plot
> accuracy(NaiveModelYogurtDannonLightNFit)
ME RMSE MAE MPE MAPE MASE ACF1
Training set -4.784314 301.7058 225.1765 -19.99211 49.89761 NaN -0.5002944
22
Forecasting Analytics Project – Yogurt sales Ravinderpal S Wasu – 71710004
Siddharth Gupta - 71710106
23
Forecasting Analytics Project – Yogurt sales Ravinderpal S Wasu – 71710004
Siddharth Gupta - 71710106
7. Series 2 - Analyzing best method for sales forecast using XLMiner for Dannon
Light N Fit
As seen in the data in Yogurt DannonLightNFitWeekly.xlsx – with Week number and Sum of sales in that week
24
Forecasting Analytics Project – Yogurt sales Ravinderpal S Wasu – 71710004
Siddharth Gupta - 71710106
Forecast
Week Actual Forecast Error LCI UCI
1362 646 341 305 -140.054 822.0536
1363 387 341 46 -143.014 825.014
1364 505 341 164 -145.956 827.9563
1365 360 341 19 -148.881 830.881
1366 374 341 33 -151.788 833.7884
1367 328 341 -13 -154.679 836.6786
1368 417 341 76 -157.552 839.5522
1369 324 341 -17 -160.409 842.4092
1370 476 341 135 -163.25 845.2501
1371 279 341 -62 -166.075 848.075
1372 416 341 75 -168.884 850.8843
1373 117 341 -224 -171.678 853.6782
25
Forecasting Analytics Project – Yogurt sales Ravinderpal S Wasu – 71710004
Siddharth Gupta - 71710106
400
300 Forecast
200 Actual
100
0
1362 1364 1366 1368 1370 1372 1374
Week
Forecast
Week Actual Forecast Error LCI UCI
1362 646 266.5 379.5 -287.682 820.6818
1363 387 266.5 120.5 -304.738 837.7375
1364 505 266.5 238.5 -321.299 854.2986
1365 360 266.5 93.5 -337.406 870.4056
1366 374 266.5 107.5 -353.094 886.0941
1367 328 266.5 61.5 -368.395 901.395
1368 417 266.5 150.5 -383.336 916.3358
1369 324 266.5 57.5 -397.941 930.9406
1370 476 266.5 209.5 -412.231 945.2313
1371 279 266.5 12.5 -426.227 959.2273
1372 416 266.5 149.5 -439.946 972.946
1373 117 266.5 -149.5 -453.403 986.4033
26
Forecasting Analytics Project – Yogurt sales Ravinderpal S Wasu – 71710004
Siddharth Gupta - 71710106
With MA(2), we get higher MAPE value compared to MA(3) , so selecting the MAPE and forecast
value for MA(3)
27
Forecasting Analytics Project – Yogurt sales Ravinderpal S Wasu – 71710004
Siddharth Gupta - 71710106
Forecast
28
Forecasting Analytics Project – Yogurt sales Ravinderpal S Wasu – 71710004
Siddharth Gupta - 71710106
600
400
Forecast
200
Actual
0
1362 1367 1372 1377
Week
for α = 0.2
With Optimize option checked, result - ExponentialOutput1:
Here α = 0.188299203466903
Parameters/Options
Optimization Selected Yes
Alpha (Level) 0.188299203
Forecast Yes
#Forecasts 12
Forecast
Week Actual Forecast Error LCI UCI
1362 646 406.5437 239.4563 -58.7239 871.8114
1363 387 406.5437 -19.5437 -66.9005 879.9879
1364 505 406.5437 98.45626 -74.9382 888.0257
1365 360 406.5437 -46.5437 -82.8439 895.9314
1366 374 406.5437 -32.5437 -90.6239 903.7114
1367 328 406.5437 -78.5437 -98.2841 911.3716
1368 417 406.5437 10.45626 -105.83 918.9172
1369 324 406.5437 -82.5437 -113.266 926.3533
1370 476 406.5437 69.45626 -120.597 933.6845
1371 279 406.5437 -127.544 -127.828 940.9152
1372 416 406.5437 9.456257 -134.962 948.0493
1373 117 406.5437 -289.544 -142.003 955.0906
29
Forecasting Analytics Project – Yogurt sales Ravinderpal S Wasu – 71710004
Siddharth Gupta - 71710106
With Optimize option, we get higher MAPE value compared to default α = 0.2 , so selecting the MAPE
and forecast value for default α = 0.2
Updating Comparison table as below:
Sr. No. Method MAPE Forecast value Comments
1 Moving Average 32.7648028 341 As MA method does not
(3) consider Trend and Seasonality,
the Forecasted value is constant
2 Simple 36.3984 401.2221 As Simple Exponential Smoothing
Exponential method does not consider Trend
Smoothing and Seasonality, the Forecasted
method value is constant
3 Holt’s Exponential To be calculated
Smoothing
method
4 Holt-Winter’s To be calculated
Exponential
Smoothing
method
So comparing between Moving Average (3) and Simple Exponential Smoothing method, the MAPE
value for Moving Average (3) is lower. So between these 2 methods, Moving Average (3) should be
used for forecasting
30
Forecasting Analytics Project – Yogurt sales Ravinderpal S Wasu – 71710004
Siddharth Gupta - 71710106
Forecast
Week Actual Forecast Error LCI UCI
1362 646 322.6335 323.3665 -127.591 772.8583
1363 387 302.6909 84.30906 -159.289 764.6708
1364 505 282.7484 222.2516 -193.831 759.3279
1365 360 262.8058 97.19418 -231.335 756.9468
1366 374 242.8633 131.1367 -271.852 757.5788
1367 328 222.9207 105.0793 -315.376 761.2172
1368 417 202.9781 214.0219 -361.852 767.8085
1369 324 183.0356 140.9644 -411.193 777.2641
1370 476 163.093 312.907 -463.286 789.4721
1371 279 143.1505 135.8495 -518.006 804.3068
1372 416 123.2079 292.7921 -575.221 821.6371
1373 117 103.2653 13.73467 -634.801 841.332
31
Forecasting Analytics Project – Yogurt sales Ravinderpal S Wasu – 71710004
Siddharth Gupta - 71710106
400
300 Forecast
200 Actual
100
0
1362 1364 1366 1368 1370 1372 1374
Week
Parameters/Options
Optimization Selected Yes
Alpha (Level) 0.029419843
Beta (Trend) 0.951048311
Forecast Yes
#Forecasts 12
32
Forecasting Analytics Project – Yogurt sales Ravinderpal S Wasu – 71710004
Siddharth Gupta - 71710106
Forecast
Week Actual Forecast Error LCI UCI
1362 646 324.9298 321.0702 -95.1601 745.0198
1363 387 298.2125 88.78747 -122.569 718.994
1364 505 271.4952 233.5048 -150.812 693.8025
1365 360 244.7779 115.2221 -180.206 669.7617
1366 374 218.0606 155.9394 -211.051 647.172
1367 328 191.3433 136.6567 -243.623 626.3099
1368 417 164.6259 252.3741 -278.167 607.4188
1369 324 137.9086 186.0914 -314.885 590.7018
1370 476 111.1913 364.8087 -353.933 576.3157
1371 279 84.474 194.526 -395.421 564.3687
1372 416 57.75668 358.2433 -439.408 554.9212
1373 117 31.03937 85.96063 -485.911 547.9902
With Optimize option, we get higher MAPE value compared to default α = 0.2, and β =0.15. So
selecting the MAPE and forecasting value for default α = 0.2, and β =0.15
Updating Comparison table as below:
Sr. No. Method MAPE Forecast value Comments
1 Moving Average 32.7648028 341 As MA method does not
(3) consider Trend and Seasonality,
the Forecasted value is constant
2 Simple 36.3984 401.2221 As Simple Exponential Smoothing
Exponential method does not consider Trend
Smoothing and Seasonality, the Forecasted
method value is constant
3 Holt’s Exponential 41.777677 As per table This contains trend, so values are
Smoothing above different
method
4 Holt-Winter’s To be calculated
Exponential
Smoothing
method
So comparing between Moving Average (3), Simple Exponential Smoothing method and Holt’s
Exponential Smoothing method, the MAPE value for Moving Average (3) is lower. So between these 3
methods, Moving Average (3) should be used for forecasting
33
Forecasting Analytics Project – Yogurt sales Ravinderpal S Wasu – 71710004
Siddharth Gupta - 71710106
Forecast
Week Actual Forecast Error LCI UCI
1362 646 188.6535 457.3465 -289.544 666.8507
1363 387 254.1425 132.8575 -236.54 744.825
1364 505 386.5457 118.4543 -119.644 892.735
1365 360 121.4286 238.5714 -410.231 653.0884
1366 374 186.9176 187.0824 -366.326 740.1609
1367 328 319.3208 8.679233 -258.685 897.3265
1368 417 54.20374 362.7963 -551.693 660.1005
1369 324 119.6927 204.3073 -517.136 756.5213
1370 476 252.0959 223.9041 -418.592 922.7834
1371 279 -13.0212 292.0212 -720.365 694.3228
1372 416 52.46777 363.5322 -694.194 799.1295
1373 117 184.871 -67.871 -603.633 973.3745
34
Forecasting Analytics Project – Yogurt sales Ravinderpal S Wasu – 71710004
Siddharth Gupta - 71710106
Forecast
Week Actual Forecast Error LCI UCI
1362 646 304.0214 341.9786 -143.616 751.6588
1363 387 208.0473 178.9527 -240.554 656.649
1364 505 372.2381 132.7619 -78.5031 822.9794
1365 360 232.8673 127.1327 -236.084 701.8184
1366 374 136.8932 237.1068 -337.675 611.4613
1367 328 301.0841 26.91595 -181.441 783.6089
1368 417 161.7132 255.2868 -331.42 654.8459
1369 324 65.73914 258.2609 -440.899 572.3774
1370 476 229.93 246.07 -293.287 753.1472
1371 279 90.55912 188.4409 -452.414 633.5325
1372 416 -5.41495 421.4149 -571.359 560.529
1373 117 158.7759 -41.7759 -433.332 750.8841
35
Forecasting Analytics Project – Yogurt sales Ravinderpal S Wasu – 71710004
Siddharth Gupta - 71710106
400
300 Forecast
200 Actual
100
0
1362 1364 1366 1368 1370 1372 1374
-100
Week
With Optimize option, we get lower MAPE value compared to default α = 0.2, β =0.15 and γ = 0.05.
So selecting the MAPE and forecast values for the Optimize option
So comparing between all 4 methods, the MAPE value for Moving Average (3). So between these 4
methods, Moving Average (3) method should be used for forecasting
36
Forecasting Analytics Project – Yogurt sales Ravinderpal S Wasu – 71710004
Siddharth Gupta - 71710106
8. Series 2 - Forecasting sales for Dannon Light N Fit using Moving Average
Smoothing method
In the excel YogurtDannonLightNFitWeeklyMovingAverageMethod.xlsx
From the YogurtDannonLightNFitWeekly data sheet, forecasted Moving Average (3) Smoothing method
using interval = 3 and Forecast values = 12
37
Forecasting Analytics Project – Yogurt sales Ravinderpal S Wasu – 71710004
Siddharth Gupta - 71710106
Forecast
Week Forecast LCI UCI
1 270.6667 -171.922 713.2555
2 270.6667 -174.646 715.9791
3 270.6667 -177.353 718.6862
4 270.6667 -180.044 721.3771
5 270.6667 -182.719 724.0519
6 270.6667 -185.378 726.7111
7 270.6667 -188.022 729.3548
8 270.6667 -190.65 731.9835
9 270.6667 -193.264 734.5972
10 270.6667 -195.863 737.1962
11 270.6667 -198.448 739.7809
12 270.6667 -201.018 742.3514 Forecasted value for 12 weeks = 271 units
1000
500 Forecast
Actual
0
1322 1342 1362 1382
Week
Now we can take these values and add to the Fitted Model table
And then plot the Dannon Light N Fit Original Sales forecast for next 12 weeks
Forecast
Week Forecast LCI UCI
1 266.5 -238.639 771.639
2 266.5 -254.185 787.1854
3 266.5 -269.281 802.2809
4 266.5 -283.963 816.9625
5 266.5 -298.263 831.2626
6 266.5 -312.209 845.2095
7 266.5 -325.828 858.828
8 266.5 -339.14 872.1404
9 266.5 -352.166 885.1664
10 266.5 -364.924 897.9238
11 266.5 -377.428 910.4285
12 266.5 -389.695 922.6949
39
Forecasting Analytics Project – Yogurt sales Ravinderpal S Wasu – 71710004
Siddharth Gupta - 71710106
1000
800
600 Forecast
400
Actual
200
0
1322 1342 1362 1382
Week
Now we can take these values and add to the Fitted Model table
Fitted Model
Week Actual Forecast Residuals
1322 361 * *
1323 459 * *
1324 514 410 104
1325 1281 486.5 794.5
And then plot the Dannon Light N Fit Original Sales forecast for next 12 weeks
40
Forecasting Analytics Project – Yogurt sales Ravinderpal S Wasu – 71710004
Siddharth Gupta - 71710106
Comparing the Forecasts from MA(3) and MA(2), the plot of the MA(2) looks better
Conclusion
With the forecasted sales, retailer can now stock as per forecasted demand.
As sales are forecasted to go down. Manufacture, dealers and retailers can negotiate and provide
deals to customers in those weeks to boost the sales
41
Forecasting Analytics Project – Yogurt sales Ravinderpal S Wasu – 71710004
Siddharth Gupta - 71710106
9. Series 3 – Multi variable regression and forecasting sales for Yoplait Original
In R, ran the Linear regression model to fetch the significant variables having impact on sales.
Result:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 1.242e+00 7.349e-01 1.690 0.091018 .
WEEK 6.209e-05 5.320e-04 0.117 0.907103
Combined_Pre_Tax_Income_of_HH -1.472e-02 3.882e-03 -3.791 0.000151 ***
Family_Size 7.104e-02 9.050e-03 7.849 4.38e-15 ***
HH_RACE1 4.292e-01 4.584e-01 0.936 0.349189
HH_RACE3 -4.229e-01 4.696e-01 -0.901 0.367824
Type_of_Residential_Possession 9.816e-02 2.770e-02 3.544 0.000396 ***
HH_AGE -1.046e-01 2.526e-02 -4.140 3.48e-05 ***
HH_EDU 9.483e-03 1.131e-02 0.838 0.401825
HH_OCC 2.226e-02 1.358e-02 1.639 0.101196
Age_Group_Applied_to_Male_HH -1.410e-02 1.242e-02 -1.135 0.256582
Education_Level_Reached_by_Male_ -6.353e-03 7.042e-03 -0.902 0.366998
Occupation_Code_of_Male_HH -1.521e-02 2.992e-03 -5.083 3.75e-07 ***
Male_Working_Hour_Code 7.768e-03 1.196e-02 0.649 0.516050
MALE_SMOKE0 -4.153e-02 3.666e-02 -1.133 0.257344
MALE_SMOKE1 -9.631e-02 4.366e-02 -2.206 0.027410 *
Age_Group_Applied_to_Female_HH 9.673e-02 2.498e-02 3.872 0.000108 ***
Education_Level_Reached_by_Femal 1.307e-02 1.280e-02 1.022 0.306939
Occupation_Code_of_Female_HH -1.751e-02 1.373e-02 -1.276 0.202094
Female_Working_Hour_Code -6.877e-03 8.459e-03 -0.813 0.416238
FEM_SMOKE0 1.217e-01 5.713e-02 2.131 0.033095 *
FEM_SMOKE1 2.392e-01 6.079e-02 3.935 8.35e-05 ***
Number_of_Dogs -2.194e-03 1.269e-02 -0.173 0.862722
Number_of_Cats -1.130e-02 8.668e-03 -1.304 0.192251
Children_Group_Code 1.218e-02 4.447e-03 2.738 0.006189 **
Marital_Status 5.219e-06 1.514e-02 0.000 0.999725
Number_of_TVs_Used_by_HH0 -7.617e-01 6.724e-01 -1.133 0.257316
Number_of_TVs_Used_by_HH1 -1.013e-01 4.909e-01 -0.206 0.836582
Number_of_TVs_Used_by_HH2 -9.145e-02 4.915e-01 -0.186 0.852397
Number_of_TVs_Used_by_HH3 5.161e-02 4.916e-01 0.105 0.916379
Number_of_TVs_Used_by_HH4 -1.008e-01 4.919e-01 -0.205 0.837571
Number_of_TVs_Used_by_HH5 -1.856e-03 4.928e-01 -0.004 0.996995
Number_of_TVs_Used_by_HH6 -2.961e-01 4.998e-01 -0.592 0.553629
Number_of_TVs_Used_by_HH7 9.750e-02 5.117e-01 0.191 0.848888
Number_of_TVs_Used_by_HH8 -3.333e-01 5.212e-01 -0.639 0.522574
Number_of_TVs_Used_by_HH9 3.037e-02 5.203e-01 0.058 0.953453
Number_of_TVs_Hooked_to_Cable0 -2.590e-02 1.455e-01 -0.178 0.858697
Number_of_TVs_Hooked_to_Cable1 -3.636e-01 1.209e-01 -3.006 0.002646 **
Number_of_TVs_Hooked_to_Cable2 -4.889e-01 1.206e-01 -4.054 5.05e-05 ***
Number_of_TVs_Hooked_to_Cable3 -5.443e-01 1.219e-01 -4.466 7.99e-06 ***
Number_of_TVs_Hooked_to_Cable4 -3.294e-01 1.239e-01 -2.658 0.007872 **
Number_of_TVs_Hooked_to_Cable5 -4.016e-01 1.287e-01 -3.121 0.001804 **
Number_of_TVs_Hooked_to_Cable6 -5.710e-01 1.611e-01 -3.544 0.000394 ***
Number_of_TVs_Hooked_to_Cable7 -5.549e-01 1.916e-01 -2.896 0.003788 **
Number_of_TVs_Hooked_to_Cable8 -8.570e-01 2.636e-01 -3.252 0.001149 **
Number_of_TVs_Hooked_to_Cable9 6.187e-01 2.260e-01 2.737 0.006201 **
HH_Head_Race__RACE2_1 -7.862e-02 5.227e-02 -1.504 0.132539
HH_Head_Race__RACE2_2 3.852e-02 1.650e-01 0.233 0.815478
HH_Head_Race__RACE2_4 4.871e-01 2.318e-01 2.102 0.035601 *
HH_Head_Race__RACE2_5 4.246e-01 3.259e-01 1.303 0.192637
HH_Head_Race__RACE2_6 4.944e-01 2.838e-01 1.742 0.081532 .
HH_Head_Race__RACE2_7 9.950e-01 1.160e+00 0.858 0.391174
HH_Head_Race__RACE2_97 5.509e-01 8.279e-02 6.654 2.92e-11 ***
HH_Head_Race__RACE3_ -1.111e-01 5.002e-02 -2.221 0.026395 *
Microwave_Owned_by_HH1 2.214e-01 5.469e-02 4.048 5.19e-05 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
42
Forecasting Analytics Project – Yogurt sales Ravinderpal S Wasu – 71710004
Siddharth Gupta - 71710106
Added the details of the highlighted significant variables in the dataset and created a file
RegressedYogurtYoplaitOriginalWeekly.xlsx
WeeklySales
1500
1000
500
0
1 2 3 4 5 6 7 8 9 10111213141516171819202122232425262728293031323334353637383940414243444546474849505152
With this file ran the regression in XLMiner with two models, viz:
i) Linear trend model without seasonality
ii) Linear trend model with seasonality
Total sum
of
squared Average
errors RMS Error Error
1953599 403.4847 -270.834409
43
Forecasting Analytics Project – Yogurt sales Ravinderpal S Wasu – 71710004
Siddharth Gupta - 71710106
Here, partitioned the data and predicted as below, using 11 of the dummy variables:
Total sum
of
squared Average
errors RMS Error Error
1775586 384.6629 -285.495092
Using this model as the RMSE is lower than that of the previous model
From sheet : MLR_TrainingScore Select the Residual data XL Miner ARIMA Autocorrelations and
obtained the plot for 12 lags
ACF Values
Lags ACF
0 1
1 0.034467
2 -0.05984
3 0.023636
4 -0.07873
5 0.013349
6 -0.16661
7 -0.00208
8 -0.03389
9 -0.17223
10 -0.05932
11 0.100266
12 -0.22013
44
Forecasting Analytics Project – Yogurt sales Ravinderpal S Wasu – 71710004
Siddharth Gupta - 71710106
Here we see that none of the lags are touching / crossing the UCI or LCI bounds. Hence, they are not significant.
Run the ARIMA 2 model for getting the error residuals and forecast errors
Variance Covariance
AR1 AR2
AR1 0.024391031 -2.18136E-05
AR2 -2.18136E-05 0.031978531
Forecast
t Forecast
Forecast 1 -22.11990254
Forecast 2 -8.756511639
Forecast 3 1.143969898
Forecast 4 0.610250969
Forecast 5 -0.053789241
Forecast 6 -0.041643665
Forecast 7 0.00208707
Forecast 8 0.002787714
Forecast 9 -4.09728E-05
Forecast 10 -0.000183245
Forecast 11 -3.58304E-06
Forecast 12 1.18309E-05
45
Forecasting Analytics Project – Yogurt sales Ravinderpal S Wasu – 71710004
Siddharth Gupta - 71710106
Now going to Arima_Residuals sheet and run ACF again to see autocorrelation in the error of errors
ACF Values
Lags ACF
0 1
1 0.002085
2 -0.00908
3 0.024959
4 -0.09544
5 0.023361
6 -0.17147
7 -0.00136
8 -0.04014
9 -0.16264
10 -0.07922
11 0.104474
12 -0.21135
0 0 UCI
0 1 2 3 4 5 6 7 8 9 10 11 12
-0.5 -0.2 LCI
-1 -0.4
Lags
46
Forecasting Analytics Project – Yogurt sales Ravinderpal S Wasu – 71710004
Siddharth Gupta - 71710106
To forecast, create the new data sheet (ToForecast), where we will add next 12 months as input predictors and
12 dummy variables.
From Data sheet, select data range, predictor inputs as output, as shown below.
Then select the ToForecast sheet where we have the details of new forecast dates
47
Forecasting Analytics Project – Yogurt sales Ravinderpal S Wasu – 71710004
Siddharth Gupta - 71710106
Take these predicted values to the MLR_TrainingScore1 sheet and add it below the predicted and actual values
of the previous week and plot the chart to see the fitness and accuracy of the prediction
Predicted Actual
Value Value
48
Forecasting Analytics Project – Yogurt sales Ravinderpal S Wasu – 71710004
Siddharth Gupta - 71710106
10. Series 4 – Multi variable regression and Forecasting sales for Dannon Light N
Fit
Created file RegressedDannonLightNFitWeeklyLinearTrendWithSeasonality.xlsx
WeeklySales
1400
1200
1000
800
600
400
200
0
1 2 3 4 5 6 7 8 9 10111213141516171819202122232425262728293031323334353637383940414243444546474849505152
Here, partitioned the data and predicted as below, using 2 of the dummy variables:
Total sum
of
squared Average
errors RMS Error Error
1783587 385.5285 -98.38443029
49
Forecasting Analytics Project – Yogurt sales Ravinderpal S Wasu – 71710004
Siddharth Gupta - 71710106
From sheet : MLR_TrainingScore Select the Residual data XL Miner ARIMA Autocorrelations and
obtained the plot for 3 lags
ACF Values
Lags ACF
0 1
1 -0.09284
2 -0.14291
3 0.031829
Here we see that none of the lags are touching / crossing the UCI or LCI bounds. Hence, they are not significant.
Create new ARIMA Input sheet with MLR_TrainingScore residuals and t.
Enter the t column and the residual columns as data
Run the ARIMA 2 model for getting the error residuals and forecast errors
Variance Covariance
AR1 AR2
AR1 6.20892E-08 -4.435E-08
AR2 -4.435E-08 0.0060754
Forecast
t Forecast
Forecast 1 61.63513988
Forecast 2 1.681279347
Forecast 3 -10.95854597
Forecast 4 0.994078303
Forecast 5 1.796470608
Forecast 6 -0.3846412
Forecast 7 -0.268454377
Forecast 8 0.098698317
Forecast 9 0.035273032
Forecast 10 -0.021376468
Forecast 11 -0.003646677
Forecast 12 0.004160639
50
Forecasting Analytics Project – Yogurt sales Ravinderpal S Wasu – 71710004
Siddharth Gupta - 71710106
Now going to Arima_Residuals sheet and run ACF again to see autocorrelation in the error of errors
ACF Values
Lags ACF
0 1
1 0.002634
2 0.003671
3 0.01504
0 0 UCI
-0.5 0 1 2 3 -0.2
LCI
-1 -0.4
Lags
51
Forecasting Analytics Project – Yogurt sales Ravinderpal S Wasu – 71710004
Siddharth Gupta - 71710106
To forecast, create the new data sheet (ToForecast), where we will add next 12 months as input predictors and
12 dummy variables.
From Data sheet, select data range, predictor inputs as output, as shown below.
Then select the ToForecast sheet where we have the details of new forecast dates
Take these predicted values to the MLR_TrainingScore1 sheet and add it below the predicted and actual values
of the previous week and plot the chart to see the fitness and accuracy of the prediction
52
Forecasting Analytics Project – Yogurt sales Ravinderpal S Wasu – 71710004
Siddharth Gupta - 71710106
Predicted Actual
Value Value
53