Price Elasticity of Coke and Pepsi

PricePromoData<-read.csv("PricePromoData.csv")
m_coke=lm(log(PricePromoData$oz_X)~log(PricePromoData$pX))
m_pepsi=lm(log(PricePromoData$oz_Y)~log(PricePromoData$pY))                     
summary(m_coke)
## 
## Call:
## lm(formula = log(PricePromoData$oz_X) ~ log(PricePromoData$pX))
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -0.6564 -0.2395 -0.0788  0.1190  1.2732 
## 
## Coefficients:
##                        Estimate Std. Error t value Pr(>|t|)    
## (Intercept)            -16.5304     0.3840  -43.05   <2e-16 ***
## log(PricePromoData$pX)  -6.9446     0.1074  -64.63   <2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.3671 on 726 degrees of freedom
## Multiple R-squared:  0.8519, Adjusted R-squared:  0.8517 
## F-statistic:  4177 on 1 and 726 DF,  p-value: < 2.2e-16
summary(m_pepsi)
## 
## Call:
## lm(formula = log(PricePromoData$oz_Y) ~ log(PricePromoData$pY))
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -2.9059 -0.6063  0.0550  0.6057  3.4900 
## 
## Coefficients:
##                        Estimate Std. Error t value Pr(>|t|)    
## (Intercept)            -15.5981     0.8990  -17.35   <2e-16 ***
## log(PricePromoData$pY)  -6.6942     0.2519  -26.57   <2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.9671 on 726 degrees of freedom
## Multiple R-squared:  0.4931, Adjusted R-squared:  0.4924 
## F-statistic: 706.1 on 1 and 726 DF,  p-value: < 2.2e-16

Price elasticity is always negative

Following are the price elasticities of:

coke = -6.9446

pepsi = -6.6942

Thus we can conclude that coke is more price elastic than pepsi.

Cross Price Elasticity

m_cross_xy=lm(log(PricePromoData$oz_X)~log(PricePromoData$pY))
summary(m_cross_xy)
## 
## Call:
## lm(formula = log(PricePromoData$oz_X) ~ log(PricePromoData$pY))
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -1.3777 -0.5510 -0.4059 -0.1456  2.5414 
## 
## Coefficients:
##                        Estimate Std. Error t value Pr(>|t|)    
## (Intercept)              9.4395     0.8857  10.658   <2e-16 ***
## log(PricePromoData$pY)   0.3268     0.2482   1.317    0.188    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.9528 on 726 degrees of freedom
## Multiple R-squared:  0.002383,   Adjusted R-squared:  0.001008 
## F-statistic: 1.734 on 1 and 726 DF,  p-value: 0.1883
m_cross_yx=lm(log(PricePromoData$oz_Y)~log(PricePromoData$pX))
summary(m_cross_yx)
## 
## Call:
## lm(formula = log(PricePromoData$oz_Y) ~ log(PricePromoData$pX))
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -3.3541 -0.9954 -0.0906  0.9914  3.6652 
## 
## Coefficients:
##                        Estimate Std. Error t value Pr(>|t|)    
## (Intercept)             11.1712     1.4169   7.884 1.16e-14 ***
## log(PricePromoData$pX)   0.8120     0.3965   2.048   0.0409 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.354 on 726 degrees of freedom
## Multiple R-squared:  0.005745,   Adjusted R-squared:  0.004376 
## F-statistic: 4.195 on 1 and 726 DF,  p-value: 0.0409

For 1 unit of % increase in Price of Pepsi, the demand of Coke increases by 0.3268

For 1 unit of % increase in Price of Coke, the demand of Pepsi increases by 0.8120

Therefore, cross elasticity of coke is more than the cross elasticity of pepsi.

The effect of offering a deal on price elasticity

We do not subset the data as there would be no relation between deal and no deal samples

m_coke_deal=lm(log(PricePromoData$oz_X)~log(PricePromoData$pX)+PricePromoData$deal_X+log(PricePromoData$pX)*PricePromoData$deal_X)
summary(m_coke_deal)
## 
## Call:
## lm(formula = log(PricePromoData$oz_X) ~ log(PricePromoData$pX) + 
##     PricePromoData$deal_X + log(PricePromoData$pX) * PricePromoData$deal_X)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.47804 -0.11484 -0.01953  0.06748  1.28798 
## 
## Coefficients:
##                                                 Estimate Std. Error
## (Intercept)                                      -2.4229     0.5048
## log(PricePromoData$pX)                           -2.9133     0.1435
## PricePromoData$deal_XYes                         -3.9397     1.3448
## log(PricePromoData$pX):PricePromoData$deal_XYes  -1.4255     0.3588
##                                                 t value Pr(>|t|)    
## (Intercept)                                      -4.800 1.93e-06 ***
## log(PricePromoData$pX)                          -20.302  < 2e-16 ***
## PricePromoData$deal_XYes                         -2.930   0.0035 ** 
## log(PricePromoData$pX):PricePromoData$deal_XYes  -3.973 7.80e-05 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.2288 on 724 degrees of freedom
## Multiple R-squared:  0.9426, Adjusted R-squared:  0.9424 
## F-statistic:  3966 on 3 and 724 DF,  p-value: < 2.2e-16

The elasticity of coke when a deal is not offered is -2.9133

The elasticity of coke when a deal is offered is -4.3388

Thus demand is affected more by price when a deal is offered by coke

m_pepsi_deal=lm(log(PricePromoData$oz_Y)~log(PricePromoData$pY)+PricePromoData$deal_Y+log(PricePromoData$pY)*PricePromoData$deal_Y)
summary(m_pepsi_deal)
## 
## Call:
## lm(formula = log(PricePromoData$oz_Y) ~ log(PricePromoData$pY) + 
##     PricePromoData$deal_Y + log(PricePromoData$pY) * PricePromoData$deal_Y)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -2.83238 -0.61046  0.02982  0.60163  3.06752 
## 
## Coefficients:
##                                                 Estimate Std. Error
## (Intercept)                                      -3.5422     1.7345
## log(PricePromoData$pY)                           -3.2352     0.4947
## PricePromoData$deal_YYes                         -7.0003     6.7669
## log(PricePromoData$pY):PricePromoData$deal_YYes  -2.2084     1.7845
##                                                 t value Pr(>|t|)    
## (Intercept)                                      -2.042   0.0415 *  
## log(PricePromoData$pY)                           -6.539 1.17e-10 ***
## PricePromoData$deal_YYes                         -1.034   0.3013    
## log(PricePromoData$pY):PricePromoData$deal_YYes  -1.238   0.2163    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.927 on 724 degrees of freedom
## Multiple R-squared:  0.5355, Adjusted R-squared:  0.5335 
## F-statistic: 278.2 on 3 and 724 DF,  p-value: < 2.2e-16

The elasticity of pepsi when a deal is not offered is -3.2352

The elasticity of pepsi when a deal is offered is -5.4436

Thus demand is affected more by price when a deal is offered by pepsi

To conclude, pepsi offering a deal affects the price more than coke offering a deal