Sei sulla pagina 1di 54

Indian School of Business Ravinderpal Wasu – 71710004

Siddharth Gupta - 71710106


CBA - B8
Forecasting Analytics

Project – Yogurt Sales


Forecasting

October 1st, 2017

`
Forecasting Analytics Project – Yogurt sales Ravinderpal S Wasu – 71710004
Siddharth Gupta - 71710106

1. Project Proposal ............................................................................................................................................... 2


2. Creating Dataset (csv file) using R .................................................................................................................. 4
3. Series 1 - Naïve forecasting using R for Yoplait Original Yogurt .................................................................. 5
4. Series 1 - Analyzing best method for sales forecast using XLMiner for Yoplait Original Yogurt ................. 7
a) Moving average method, with W = 12 ........................................................................................................ 8
b) Simple Exponential Smoothing method .................................................................................................... 10
c) Holt’s Exponential Smoothing method ...................................................................................................... 13
d) Holt-Winter’s Exponential Smoothing method ......................................................................................... 16
5. Series 1 - Forecasting sales for Yoplait Original Yogurt using the Holt-Winters Additive Smoothing
method................................................................................................................................................................... 19
Conclusion ......................................................................................................................................................... 21
6. Series 2 - Naïve forecasting using R for DANNON LIGHT N FIT Yogurt ................................................. 22
7. Series 2 - Analyzing best method for sales forecast using XLMiner for Dannon Light N Fit ...................... 24
a) Moving Average method, with W = 3 ....................................................................................................... 25
b) Simple Exponential Smoothing method .................................................................................................... 28
c) Holt’s Exponential Smoothing method ...................................................................................................... 31
d) Holt-Winter’s Exponential Smoothing method ......................................................................................... 34
8. Series 2 - Forecasting sales for Dannon Light N Fit using Moving Average Smoothing method ................ 37
Conclusion ......................................................................................................................................................... 41
9. Series 3 – Multi variable regression and forecasting sales for Yoplait Original ........................................... 42
i) Linear trend model without seasonality ..................................................................................................... 43
ii) Linear trend model without seasonality ..................................................................................................... 44
10. Series 4 – Multi variable regression and Forecasting sales for Dannon Light N Fit ..................................... 49
i) Linear trend model with seasonality .......................................................................................................... 49

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

Forecasts is used for:


a) Production and Inventory Management: The forecast can be used for production and inventory
planning to make sure that the demands are met without any significant amount of surplus or deficit in
production and inventory. The right amount of production and inventory in the supply chain will help to
minimize the inventory holding cost.
b) Pricing and Discounts: The forecast for demand in next 3 months can be used to pricing and discounts
on the basis ups and down in the demand of the Yogurt

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

2. Creating Dataset (csv file) using R


Using R, created the csv file with required data, in the required format.
R code  FA_Project_RavinderpalWasu_71710004_Siddharth_71710106.R

Created 2 csv files:


i) YogurtYoplaitOriginalWeekly.csv – with Week number and Sum of sales in Dollars in that week.
Converted to excel - YogurtYoplaitOriginalWeekly.xlsx
ii) YogurtDannonLightNFitWeekly.csv – with Week number and Sum of sales in Units in that week.
Converted to excel - YogurtDannonLightNFitWeekly.xlsx

Series 1: Yoplait Original yogurt


 Sales forecasting for yogurt for 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 Dollars per week

Series 2: Dannon Light N Fit


 Sales forecasting for yogurt for 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

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

3. Series 1 - Naïve forecasting using R for Yoplait Original Yogurt


Using R, created the Naïve forecasting
R code  FA_Project_RavinderpalWasu_71710004_Siddharth_71710106.R
Time series plot for Yoplait Original Yogurt

Forecasting use Naïve method, for forecasting for 12 weeks, we get the below forecast plot

Accuracy metrics are as below


> accuracy(NaiveModelYogurtYoplaitOriginal)
ME RMSE MAE MPE MAPE MASE ACF1
Training set 1.993137 241.9324 185.5108 -11.70624 41.09112 NaN -0.3893212
5
Forecasting Analytics Project – Yogurt sales Ravinderpal S Wasu – 71710004
Siddharth Gupta - 71710106

Plot for Actual sales v/s Predicted sales is as below

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

Yoplait Original Weekly Sales in $


900
800
700
600
500
400
300
200
100
0
1 2 3 4 5 6 7 8 9 10111213141516171819202122232425262728293031323334353637383940414243444546474849505152

From the above plot, we see the following components:


 Level
 Linear Trend - Downward
 Seasonality, every 12 weeks, with lots of volatility.
 Noise
On basis of the above observations, we should adopt a data driven approach for forecasting to produce
optimal results.
Though, Holt-Winter’s Exponential Smoothing method choice seems to be the better approach, in order to
verify the best approach, we will try various approaches as below:
a) Moving average method, with W = 12 to predict for 12 weeks
b) Simple Exponential Smoothing method
c) Holt’s Exponential Smoothing method
d) Holt-Winter’s Exponential Smoothing method

7
Forecasting Analytics Project – Yogurt sales Ravinderpal S Wasu – 71710004
Siddharth Gupta - 71710106

a) Moving average method, with W = 12


Created excel  YogurtYoplaitOriginalWeeklyMovingAverageMethod.xlsx
Partitioned the data as below. From the Data_PartitionTS, ran the MA(12) as below.

Result - MASmoothingOutput:

Validation Error Measures

Mean Absolute Percentage Error (MAPE) 51.92012068


Mean Absolute Deviation (MAD) 146.5116667
Mean Square Error (MSE) 27926.12087
Tracking Signal Error (TSE) -9.107056321
Cumulative Forecast Error (CFE) -1334.29
Mean Forecast Error (MFE) -111.1908333
Forecast

Week Actual Forecast Error LCI UCI


1362 374.82 463.585 -88.765 96.76887 830.4011
1363 417.07 463.585 -46.515 96.76003 830.41
1364 289.02 463.585 -174.565 96.75118 830.4188
1365 203.54 463.585 -260.045 96.74234 830.4277
1366 675.51 463.585 211.925 96.73349 830.4365
1367 399.83 463.585 -63.755 96.72465 830.4454
1368 253.91 463.585 -209.675 96.71581 830.4542
1369 224.13 463.585 -239.455 96.70696 830.463
1370 348.21 463.585 -115.375 96.69812 830.4719
1371 233.45 463.585 -230.135 96.68928 830.4807
1372 362.98 463.585 -100.605 96.68043 830.4896
1373 446.26 463.585 -17.325 96.67159 830.4984

8
Forecasting Analytics Project – Yogurt sales Ravinderpal S Wasu – 71710004
Siddharth Gupta - 71710106

Time Plot of Actual Vs Forecast


(Validation Data)
800
700
600
WeeklySales

500
400
Forecast
300
Actual
200
100
0
1362 1364 1366 1368 1370 1372 1374
Week

Creating a Comparison table as below:


Sr. No. Method MAPE Forecast value Comments
1 Moving Average 51.92012068 463.585 As MA method
(12) does not consider
Trend and
Seasonality, the
Forecasted value is
constant
2 Simple Exponential To be calculated
Smoothing method
3 Holt’s Exponential To be calculated
Smoothing method
4 Holt-Winter’s To be calculated
Exponential
Smoothing method

9
Forecasting Analytics Project – Yogurt sales Ravinderpal S Wasu – 71710004
Siddharth Gupta - 71710106

b) Simple Exponential Smoothing method


Created excel  YogurtYoplaitOriginalWeeklySimpleExponentialSmoothingMethod.xlsx
Partitioned the data as below. From the Data_PartitionTS, ran Simple Exponential Smoothing method as
below, using α = 0.2 (default) and then using the Optimize option

For α = 0.2 (default), result - ExponentialOutput:

Validation Error Measures


Mean Absolute Percentage Error (MAPE) 68.04785476
Mean Absolute Deviation (MAD) 192.5768834
Mean Square Error (MSE) 43274.67852
Tracking Signal Error (TSE) -10.37315116
Cumulative Forecast Error (CFE) -1997.629121
Mean Forecast Error (MFE) -166.4690934
Forecast
Week Actual Forecast Error LCI UCI
1362 374.82 518.8633 -144.043 129.8505 907.876
1363 417.07 518.8633 -101.793 122.1466 915.58
1364 289.02 518.8633 -229.843 114.5894 923.1371
1365 203.54 518.8633 -315.323 107.1709 930.5556
1366 675.51 518.8633 156.6467 99.88373 937.8428
1367 399.83 518.8633 -119.033 92.72117 945.0054
1368 253.91 518.8633 -264.953 85.67702 952.0495
1369 224.13 518.8633 -294.733 78.7456 958.9809
1370 348.21 518.8633 -170.653 71.92166 965.8049
1371 233.45 518.8633 -285.413 65.20036 972.5262
1372 362.98 518.8633 -155.883 58.57719 979.1493
1373 446.26 518.8633 -72.6033 52.04799 985.6785

10
Forecasting Analytics Project – Yogurt sales Ravinderpal S Wasu – 71710004
Siddharth Gupta - 71710106

With Optimize option checked, result - ExponentialOutput1:


Here α = 0.08044

Parameters/Options
Optimization Selected Yes
Alpha (Level) 0.080446791
Forecast Yes
#Forecasts 12

Validation Error Measures


Mean Absolute Percentage Error (MAPE) 54.25440777
Mean Absolute Deviation (MAD) 153.1790286
Mean Square Error (MSE) 29769.3731
Tracking Signal Error (TSE) -9.337440151
Cumulative Forecast Error (CFE) -1430.300012
Mean Forecast Error (MFE) -119.1916677

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

Time Plot of Actual Vs Forecast


(Validation Data)
800
700
600
WeeklySales

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

c) Holt’s Exponential Smoothing method


Created excel  YogurtYoplaitOriginalWeeklyHoltsMethod.xlsx
Partitioned the data as below. From the Data_PartitionTS, ran Double Exponential Smoothing method as
below, using α = 0.2 (default) and β = 0.15 (default) and then using the Optimize option

For α = 0.2 (default), and β = 0.15 (default) result - DoubleExponentialOutput:

Validation Error Measures


Mean Absolute Percentage Error (MAPE) 83.71752322
Mean Absolute Deviation (MAD) 238.3230917
Mean Square Error (MSE) 65319.74271
Tracking Signal Error (TSE) -10.98230365
Cumulative Forecast Error (CFE) -2617.33656
Mean Forecast Error (MFE) -218.11138

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

With Optimize option checked, result - DoubleExponentialOutput1:


Here α = 0.000427259 and β = 0.165318

Parameters/Options
Optimization Selected Yes
Alpha (Level) 0.000427259
Beta (Trend) 0.165318766
Forecast Yes
#Forecasts 12

Validation Error Measures


Mean Absolute Percentage Error (MAPE) 53.88019428
Mean Absolute Deviation (MAD) 152.208812
Mean Square Error (MSE) 29508.74288
Tracking Signal Error (TSE) -9.279599199
Cumulative Forecast Error (CFE) -1412.43677
Mean Forecast Error (MFE) -117.7030642

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

Time Plot of Actual Vs Forecast


(Validation Data)
800
700
600
WeeklySales

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

d) Holt-Winter’s Exponential Smoothing method


Created excel  YogurtYoplaitOriginalWeeklyHoltWintersMethod.xlsx
Partitioned the data as below. From the Data_PartitionTS, ran Holt-Winters Additive Exponential
Smoothing method as below, using α = 0.2 (default), β = 0.15 (default) and γ = 0.05 (default). Later used
the Optimize option

For α = 0.2 (default), β = 0.15 (default) and γ = 0.05 result - HoltWinterAddOutput:

Validation Error Measures


Mean Absolute Percentage Error (MAPE) 107.1630353
Mean Absolute Deviation (MAD) 314.661828
Mean Square Error (MSE) 113392.12
Tracking Signal Error (TSE) -12
Cumulative Forecast Error (CFE) -3775.941936
Mean Forecast Error (MFE) -314.661828

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

1372 362.98 639.0745 -276.095 114.5023 1163.647


1373 446.26 728.2112 -281.951 173.8682 1282.554

With Optimize option checked, result – HoltWinterAddOutput1:


Here α = 0. 004119999, β = 0. 218482009 and γ = 0.000579852

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

Validation Error Measures


Mean Absolute Percentage Error (MAPE) 49.29510058
Mean Absolute Deviation (MAD) 142.0154136
Mean Square Error (MSE) 34894.53023
Tracking Signal Error (TSE) -9.294408416
Cumulative Forecast Error (CFE) -1319.949255
Mean Forecast Error (MFE) -109.9957712

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

Time Plot of Actual Vs Forecast


(Validation Data)
800
700
600
WeeklySales

500
400
Forecast
300
Actual
200
100
0
1362 1364 1366 1368 1370 1372 1374
Week

This plot looks much better than all previous plots

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

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 49.29510058 As per table This contains trend and
Exponential above seasonality, so values are different
Smoothing
method

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

With Optimize option checked, result - HoltWinterAddOutput2:


Here α = 0. 004119999, β = 0. 218482009 and γ = 0.000579852

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

Here we are getting MAPE = 29.20272

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

Here the plot of Actual vs Forecast is as below.

Time Plot of Actual Vs Forecast


(Training Data)
1000
800
WeeklySales

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

Yoplait Original Sales forecast for next 12 weeks


1000
900
800
700
600
500
400
300
200
100
0
1 3 5 7 9 111315171921232527293133353739414345474951535557596163

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

6. Series 2 - Naïve forecasting using R for DANNON LIGHT N FIT Yogurt


Using R, created the Naïve forecasting
R code  FA_Project_RavinderpalWasu_71710004_Siddharth_71710106.R
Time series plot for Dannon Light N Fit Yogurt

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

Plot for Actual sales v/s Predicted sales is as below

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

Dannon Light N Fit Weekly Sales in Units


1400
1200
1000
800
600
400
200
0
1 2 3 4 5 6 7 8 9 10111213141516171819202122232425262728293031323334353637383940414243444546474849505152

WeeklySales Linear (WeeklySales)

From the above plot, we see the following components:


 Level
 Linear Trend - Downward
 Seasonality, every 3 weeks, with lots of volatility.
 Noise
On basis of the above observations, we should adopt a data driven approach for forecasting to produce
optimal results.
Though, Holt-Winter’s Exponential Smoothing method choice seems to be the better approach, in order to
verify the best approach, we will try various approaches as below:
a) Moving average method, with W = 3 and to predict for 12 weeks
b) Simple Exponential Smoothing method
c) Holt’s Exponential Smoothing method
d) Holt-Winter’s Exponential Smoothing method

24
Forecasting Analytics Project – Yogurt sales Ravinderpal S Wasu – 71710004
Siddharth Gupta - 71710106

a) Moving Average method, with W = 3


Created excel  YogurtDannonLightNFitWeeklyMovingAverageMethod.xlsx
Partitioned the data as below. From the Data_PartitionTS, ran the MA(3) and MA(2) as below.

Result for MA (3) - MASmoothingOutput:

Validation Error Measures


Mean Absolute Percentage Error (MAPE) 32.76480285
Mean Absolute Deviation (MAD) 97.41666667
Mean Square Error (MSE) 17299.25
Tracking Signal Error (TSE) 5.512403764
Cumulative Forecast Error (CFE) 537
Mean Forecast Error (MFE) 44.75

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

Time Plot of Actual Vs Forecast


(Validation Data)
700
600
500
WeeklySales

400
300 Forecast

200 Actual

100
0
1362 1364 1366 1368 1370 1372 1374
Week

Result for MA (2) – MASmoothingOutput1:


Validation Error Measures
Mean Absolute Percentage Error (MAPE) 39.71854597
Mean Absolute Deviation (MAD) 144.1666667
Mean Square Error (MSE) 29517.25
Tracking Signal Error (TSE) 9.926011561
Cumulative Forecast Error (CFE) 1431
Mean Forecast Error (MFE) 119.25

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)

Creating a Comparison table as below:


Sr. No. Method MAPE Forecast value Comments
1 Moving Average 32.7648028 341 As MA method
(3) does not consider
Trend and
Seasonality, the
Forecasted value is
constant
2 Simple Exponential To be calculated
Smoothing method
3 Holt’s Exponential To be calculated
Smoothing method
4 Holt-Winter’s To be calculated
Exponential
Smoothing method

27
Forecasting Analytics Project – Yogurt sales Ravinderpal S Wasu – 71710004
Siddharth Gupta - 71710106

b) Simple Exponential Smoothing method


Created excel  YogurDannonLightNFitWeeklySimpleExponentialSmoothingMethod.xlsx
Partitioned the data as below. From the Data_PartitionTS, ran Simple Exponential Smoothing method as
below, using α = 0.2 (default) and then using the Optimize option

For α = 0.2 (default), result - ExponentialOutput:

Validation Error Measures

Mean Absolute Percentage Error (MAPE) 36.39843009


Mean Absolute Deviation (MAD) 91.12035261
Mean Square Error (MSE) 15536.07386
Tracking Signal Error (TSE) -2.037584165
Cumulative Forecast Error (CFE) -185.6653876
Mean Forecast Error (MFE) -15.47211563

Forecast

Week Actual Forecast Error LCI UCI


1362 646 401.2221 244.7779 -64.1755 866.6197
1363 387 401.2221 -14.2221 -73.3922 875.8364
1364 505 401.2221 103.7779 -82.4333 884.8775
1365 360 401.2221 -41.2221 -91.3084 893.7526
1366 374 401.2221 -27.2221 -100.026 902.4707
1367 328 401.2221 -73.2221 -108.595 911.0396
1368 417 401.2221 15.77788 -117.023 919.467
1369 324 401.2221 -77.2221 -125.315 927.7594
1370 476 401.2221 74.77788 -133.479 935.9232
1371 279 401.2221 -122.222 -141.52 943.9643
1372 416 401.2221 14.77788 -149.444 951.888
1373 117 401.2221 -284.222 -157.255 959.6992

28
Forecasting Analytics Project – Yogurt sales Ravinderpal S Wasu – 71710004
Siddharth Gupta - 71710106

Time Plot of Actual Vs Forecast


(Validation Data)
800
WeeklySales

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

Validation Error Measures


Mean Absolute Percentage Error (MAPE) 37.1022614
Mean Absolute Deviation (MAD) 92.00729055
Mean Square Error (MSE) 15729.06726
Tracking Signal Error (TSE) -2.712012475
Cumulative Forecast Error (CFE) -249.5249198
Mean Forecast Error (MFE) -20.79374332

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

c) Holt’s Exponential Smoothing method


Created excel  YogurtDannonLightNFitWeeklyMovingAverageMethod.xlsx
Partitioned the data as below. From the Data_PartitionTS, ran Double Exponential Smoothing method as
below, using α = 0.2 (default) and β = 0.15 (default) and then using the Optimize option

For α = 0.2 (default), and β = 0.15 (default) result - DoubleExponentialOutput:


Validation Error Measures
Mean Absolute Percentage Error (MAPE) 41.77767775
Mean Absolute Deviation (MAD) 172.800583
Mean Square Error (MSE) 38892.74765
Tracking Signal Error (TSE) 12
Cumulative Forecast Error (CFE) 2073.606996
Mean Forecast Error (MFE) 172.800583

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

Time Plot of Actual Vs Forecast


(Validation Data)
700
600
500
WeeklySales

400
300 Forecast

200 Actual

100
0
1362 1364 1366 1368 1370 1372 1374
Week

For α = 0.2 (default), and β = 0.15 (default)

With Optimize option checked, result - DoubleExponentialOutput1:


Here α = 0.029419843 and β = 0.951048311

Parameters/Options
Optimization Selected Yes
Alpha (Level) 0.029419843
Beta (Trend) 0.951048311
Forecast Yes
#Forecasts 12

Validation Error Measures


Mean Absolute Percentage Error (MAPE) 54.84616491
Mean Absolute Deviation (MAD) 207.7653951
Mean Square Error (MSE) 52228.16288
Tracking Signal Error (TSE) 12
Cumulative Forecast Error (CFE) 2493.184741
Mean Forecast Error (MFE) 207.7653951

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

d) Holt-Winter’s Exponential Smoothing method


Created excel  YogurtDannonLightNFitWeeklyHoltWintersMethod.xlsx
Partitioned the data as below. From the Data_PartitionTS, ran Holt-Winters Additive Exponential
Smoothing method as below, using α = 0.2 (default), β = 0.15 (default) and γ = 0.05 (default). Later used
the Optimize option

For α = 0.2 (default), β = 0.15 (default) and γ = 0.05 result - HoltWinterAddOutput:


Validation Error Measures
Mean Absolute Percentage Error (MAPE) 57.89025617
Mean Absolute Deviation (MAD) 221.451955
Mean Square Error (MSE) 64864.49948
Tracking Signal Error (TSE) 11.38703662
Cumulative Forecast Error (CFE) 2521.681522
Mean Forecast Error (MFE) 210.1401268

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

With Optimize option checked, result – HoltWinterAddOutput1:


Here α = 0.03335673, β = 0.96887112 and γ = 0.158787805
Parameters/Options
Optimize Weights Yes
Alpha (Level) 0.033356731
Beta (Trend) 0.96887112
Gamma (Seasonality) 0.158787805
Season length 3
Number of seasons 13
Forecast Yes
#Forecasts 12

Validation Error Measures


Mean Absolute Percentage Error (MAPE) 52.46342293
Mean Absolute Deviation (MAD) 204.6748333
Mean Square Error (MSE) 53914.34992
Tracking Signal Error (TSE) 11.59178289
Cumulative Forecast Error (CFE) 2372.54623
Mean Forecast Error (MFE) 197.7121859

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

Time Plot of Actual Vs Forecast


(Validation Data)
700
600
500
WeeklySales

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

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 52.4634229 As per table This contains trend and
Exponential above seasonality, so values are different
Smoothing
method

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

For above, result = MASmoothingOutput2:

Training Error Measures


Mean Absolute Percentage Error (MAPE) 41.21507
Mean Absolute Deviation (MAD) 170.3061
Mean Square Error (MSE) 53869.13
Tracking Signal Error (TSE) -2.65992
Cumulative Forecast Error (CFE) -453
Mean Forecast Error (MFE) -9.2449 However, here the MAPE for the forecasting is higher.

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

Here the plot of Actual vs Forecast is as below.

Time Plot of Actual Vs Forecast


(Training Data)
1500
WeeklySales

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

Dannon Light N Fit Yogurt sales forecast for 12 weeks, in Units


1400
1200
1000
800
600
400
200
0
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61

Actual 361 459 514 Forecast * * *

From this plot, it does not seem a very good fit.


38
Forecasting Analytics Project – Yogurt sales Ravinderpal S Wasu – 71710004
Siddharth Gupta - 71710106

Adjusted the forecast to MA(2) to verify.


In the excel  YogurtDannonLightNFitWeeklyMovingAverageMethod.xlsx
From the YogurtDannonLightNFitWeekly data sheet, forecasted Moving Average (2) Smoothing
method using interval = 2 and Forecast values = 12

For above, result = MASmoothingOutput3:

Training Error Measures


Mean Absolute Percentage Error (MAPE) 46.28831
Mean Absolute Deviation (MAD) 197.29
Mean Square Error (MSE) 68985.03
Tracking Signal Error (TSE) -1.5941
Cumulative Forecast Error (CFE) -314.5
Mean Forecast Error (MFE) -6.29

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

Time Plot of Actual Vs Forecast


(Training Data)
1400
1200
WeeklySales

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

1372 416 377.5 38.5


1373 117 347.5 -230.5
1374 266.5
1375 266.5
1376 266.5
1377 266.5
1378 266.5
1379 266.5
1380 266.5
1381 266.5
1382 266.5
1383 266.5
1384 266.5
1385 266.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

Dannon Light N Fit Yogurt sales forecast for 12 weeks, in Units


1400
1200
1000
800
600
400
200
0
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61

Actual 361 459 Forecast * *

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

i) Linear trend model without seasonality


Created file RegressedYogurtYoplaitOriginalWeeklyLinearTrend.xlsx
Here, partitioned the data and predicted as below:

Result in sheet MLR_Output:


Validation Data Scoring - Summary Report

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

ii) Linear trend model without seasonality


Similarly, created file RegressedYogurtYoplaitOriginalWeeklyLinearTrendWithSeasonality.xlsx
Here considered seasonality = 12 weeks. Added 12 dummy variables for 12 weeks

Here, partitioned the data and predicted as below, using 11 of the dummy variables:

Result in shee t MLR_Output:


Validation Data Scoring - Summary Report

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.

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 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

ACF Plot for Residuals


0 5 10 15
1 0.4
0.5 0.2 ACF
ACF

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

Here too we see there are no significant autocorrelation ship left

Using this model to forecast


From Arima_Output sheet we see the forecast error corrections as below:
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

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

Select the data range and click ‘Match by Name’


This gives a new score sheet  MLR_NewScore1 with the forecasted data for the date range as per the
ToForecast sheet

Predicted 95% Confidence Intervals 95% Prediction Intervals


WEEK t
Value
Lower Upper Lower Upper
1374 394.2541667 80.48983 708.018499 -288.179 1076.687619 53
1375 497.4541667 183.6898 811.218499 -184.979 1179.887619 54
1376 603.2541667 289.4898 917.018499 -79.1793 1285.687619 55
1377 728.4541667 414.6898 1042.2185 46.02071 1410.887619 56
1378 777.9729167 419.2654 1136.68046 73.74393 1482.2019 57
1379 765.9729167 407.2654 1124.68046 61.74393 1470.2019 58
1380 566.4729167 207.7654 925.180457 -137.756 1270.7019 59
1381 409.7229167 51.01538 768.430457 -294.506 1113.9519 60
1382 982.9729167 624.2654 1341.68046 278.7439 1687.2019 61
1383 718.4729167 359.7654 1077.18046 14.24393 1422.7019 62
1384 844.2229167 485.5154 1202.93046 139.9939 1548.4519 63
1385 586.4729167 227.7654 945.180457 -117.756 1290.7019 64

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

Sales of Yoplait Original Yogurt , in units


1600
1400
1200
1000
800
600
400
200
0
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65

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 considered seasonality = 3 weeks. Added 3 dummy variables for 3 weeks


Similarly as above performed the Linear trend model with seasonality for Dannon Light N Fit brand

i) Linear trend model with seasonality

Here, partitioned the data and predicted as below, using 2 of the dummy variables:

Result in sheet MLR_Output:


Validation Data Scoring - Summary Report

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

ACF Plot for Residuals


0 1 2 3 4 5
1 0.4
0.5 0.2 ACF
ACF

0 0 UCI
-0.5 0 1 2 3 -0.2
LCI
-1 -0.4
Lags

Here too we see there are no significant autocorrelation ship left

Using this model to forecast


From Arima_Output sheet we see the forecast error corrections as below:
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

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

Select the data range and click ‘Match by Name’


This gives a new score sheet  MLR_NewScore1 with the forecasted data for the date range as per the
ToForecast sheet

Predicted 95% Confidence Intervals95% Prediction Intervals


WEEK t
Value
Lower Upper Lower Upper
1374 371.420833 151.709 591.1326 -106.45 849.2912 53
1375 270.220833 50.50902 489.9326 -207.65 748.0912 54
1376 201.420833 -18.291 421.1326 -276.45 679.2912 55
1377 419.020833 199.309 638.7326 -58.8496 896.8912 56
1378 357.739583 106.5565 608.9226 -135.393 850.8722 57
1379 253.739583 2.55653 504.9226 -239.393 746.8722 58
1380 272.989583 21.80653 524.1726 -220.143 766.1222 59
1381 295.239583 44.05653 546.4226 -197.893 788.3722 60
1382 312.239583 61.05653 563.4226 -180.893 805.3722 61
1383 396.989583 145.8065 648.1726 -96.143 890.1222 62
1384 248.989583 -2.19347 500.1726 -244.143 742.1222 63
1385 230.489583 -20.6935 481.6726 -262.643 723.6222 64

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

Sales of Dannon Light N Fit, in units


1400
1200
1000
800
600
400
200
0
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65

Predicted Actual
Value Value

53

Potrebbero piacerti anche