James has been operating a sandwich stand in the lobby of his office building during the lunch hour for the past two years.He has been tracking sandwich demand over the two years and he has carefully recorded the number of each type of sandwich demanded, the number he brought with him to sell, and his prices for each type of sandwich.
James provided his data set for analysis.
The file sales.csv contains the demand and availability by date for each of the three sandwiches that James sells.
summary(historical_data[,c("date_dt")])
## Min. 1st Qu. Median
## "2014-03-03 00:00:00" "2014-04-16 06:00:00" "2014-05-31 12:00:00"
## Mean 3rd Qu. Max.
## "2014-05-31 12:02:18" "2014-07-15 18:00:00" "2014-08-29 00:00:00"
stat.desc(historical_data[,c("demand.ham","demand.turkey","demand.veggie","available.ham","available.turkey","available.veggie")])
## demand.ham demand.turkey demand.veggie available.ham
## nbr.val 130.0000000 130.0000000 130.0000000 130.0000000
## nbr.null 0.0000000 0.0000000 0.0000000 0.0000000
## nbr.na 0.0000000 0.0000000 0.0000000 0.0000000
## min 6.0000000 13.0000000 4.0000000 14.0000000
## max 25.0000000 37.0000000 24.0000000 18.0000000
## range 19.0000000 24.0000000 20.0000000 4.0000000
## sum 2073.0000000 2867.0000000 1698.0000000 2050.0000000
## median 16.0000000 21.0000000 13.0000000 15.0000000
## mean 15.9461538 22.0538462 13.0615385 15.7692308
## SE.mean 0.3398255 0.4335803 0.3141949 0.1588339
## CI.mean.0.95 0.6723532 0.8578491 0.6216422 0.3142567
## var 15.0125820 24.4389386 12.8333930 3.2796661
## std.dev 3.8746073 4.9435755 3.5823725 1.8109848
## coef.var 0.2429807 0.2241593 0.2742688 0.1148429
## available.turkey available.veggie
## nbr.val 130.0000000 130.0000000
## nbr.null 0.0000000 0.0000000
## nbr.na 0.0000000 0.0000000
## min 14.0000000 8.0000000
## max 20.0000000 11.0000000
## range 6.0000000 3.0000000
## sum 2240.0000000 1230.0000000
## median 18.0000000 10.0000000
## mean 17.2307692 9.4615385
## SE.mean 0.2346132 0.1070858
## CI.mean.0.95 0.4641879 0.2118718
## var 7.1556351 1.4907573
## std.dev 2.6750019 1.2209657
## coef.var 0.1552456 0.1290452
As we can see from the data above, mean-demands for each sandwich type are 15.94(Ham), 22.05(Turkey) and 13.06(Veggie). The best selling sandwich is Turkey
This file contains cost and sale prices according to sandwich type:
(pricing)
## type price cost
## 1 Ham 6.5 3.5
## 2 Turkey 6.5 4.0
## 3 Veggie 5.0 2.5
From the plot below we can see that the productions of Turkey and Veggie sandwiches are below the demand.
Before we proceed any further, we want to know if there are any seasonal statistically significant variations. We want to prove the significance of any of the following variations by sandwich type:
We conducted an analysis of variance of the demand in order to accept or reject each of our hypothesis.
The results are as follows:
summary(aov(demand ~ sandwich:month+sandwich:day_of_week+sandwich:month:day_of_week
,data=historical_pivoted
)
)
## Df Sum Sq Mean Sq F value Pr(>F)
## sandwich:month 17 5648 332.2 18.743 <2e-16 ***
## sandwich:day_of_week 12 226 18.8 1.063 0.391
## sandwich:month:day_of_week 60 1034 17.2 0.972 0.538
## Residuals 300 5318 17.7
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
As we can see in the results above, the only statistically significant variation(normally p<0.05) in the distribution of the demand is the month.
The chart below illustrate the actual fluctuations of the demand by sandwich type and month:
Based on these findings, we will recommend monthly sandwich produtions to James.
James often produces less sandwiches than the actual demand, particularly turkey and veggie sandwiches. We also, found that there exists variation in the demand from month to month. Therefore, adjusting his supply levels according to this will help him maximize his profit.
We recommend that James be adjusting his production levels like the following table:
## month Ham Turkey Veggie
## 1 Mar 15 21 15
## 2 Apr 15 20 13
## 3 May 16 23 13
## 4 Jun 16 21 13
## 5 Jul 16 22 13
## 6 Aug 16 22 13
The table below shows James’ current profit and expected profit based on the recommended production levels.
## sandwich profit_current profit_expected increase
## 1 Ham 4837 4967 2.7%
## 2 Turkey 5106 5586 9.4%
## 3 Veggie 2885 3350 16.1%
## 4 TOTAL 12828 13903 8.4%
The expected profit was calculated by applying the recommended production levels to the provided historical data. As we can see, James’ profit would have increased by 8.4%.
This recommendation is based on the data that James collected from Mar.2013 to Aug.2013. As we analysed above, the main reason that James could not maximize his profit was on supply deficiency of Turkey and Veggie sandwiches. Therefore, if he adjust the supply like we recommended, he would make more money, about $180 monthly