This analysis will focus on exploring the relationship between percentage of sales (sales), product quality (quality), and price flexibility (Price Flex). THe objective is to identify the how much of an impact each predictor has in afecting sales.
Sales will be our dependant variable. Quality and Price Flex will be our independent variables.
"Price Flex"= hbat$x17 #price flexibility - perceived willingness to negotiate price
"Sales" = hbat$x22 #percentage of sales - percentage of client's purchases from Hbat
"Quality"= hbat$x6 #perceived level of quality
"Data"= data.frame(`Price Flex`, Sales, Quality)
The distribution for Sales seems slightly positively skewed while Quality is slithly negatively skewed.
The Kurtosis (>3) and skewness (between -.5 and .5) for each variable falls between the safe parameters. We can assume the requirement of normal distribution is satisfied for both predictors.
## [1] "Price - Skewness"
## [1] 0.313148
## [1] "Price - Kurtosis"
## [1] -0.8781288
## [1] "Quality - Skewness"
## [1] -0.2372157
## [1] "Quality - Kurtosis"
## [1] -1.172543
We’ve created a lienar regression model that tests how much of the variation in Sales can be explained by price flexibility. The following plot shows somewhat if a weak linear relationship between both variables.
The model results confirm that our model does a poor job at explaining the variation of Sales. The P value is above our risk tolerance level (.05). Thus, we reject the Nully hypothesis that price flexibility is a good predictor of sales. Let’s look at the model diagnostics to identify if any assumptions were violated.
##
## Call:
## lm(formula = Sales ~ `Price Flex`, data = Data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -20.8178 -6.7268 0.0728 6.9818 18.7053
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 55.9572 3.5263 15.869 <2e-16 ***
## `Price Flex` 0.5299 0.7403 0.716 0.476
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 8.883 on 98 degrees of freedom
## Multiple R-squared: 0.005201, Adjusted R-squared: -0.00495
## F-statistic: 0.5124 on 1 and 98 DF, p-value: 0.4758
The residuals vs fitted plot clearly shows a cone shape, meaning that there is Unequal variance across our rsiduals. This is an indicator that there is homoscedasticity in our data set. To satisfy the regression assumptions and be able to trust the results, the residuals should have a constant variance.
By incorporating Quality to our model, we can see that the results of the model didn’t improve. On the contrary, the P value increased and is passed our risk tolerance of .05, thus, we reject the Null hypothesis of sales variance explained by price and product quality.
##
## Call:
## lm(formula = Sales ~ `Price Flex` + Quality, data = Data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -16.2012 -4.0734 -0.3145 3.8108 13.5370
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.0536 6.0929 0.501 0.617
## `Price Flex` 3.4225 0.6139 5.575 2.22e-07 ***
## Quality 5.0664 0.5302 9.556 1.22e-15 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 6.408 on 97 degrees of freedom
## Multiple R-squared: 0.4876, Adjusted R-squared: 0.477
## F-statistic: 46.15 on 2 and 97 DF, p-value: 8.265e-15
After remvoing price flexibility and testing only product quality, our model improved significantly. The P value is under our designated risk tolerance. For every increase in a single unit of x (product quality) the sales percentage ordered by HBAT clients increases by 3.6%. However, our R^2 tells us that only 31% of the variation in sales are explained by product quality.
##
## Call:
## lm(formula = Sales ~ Quality, data = Data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -17.8725 -5.5943 0.8339 5.8447 17.1795
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 30.2167 4.1830 7.224 1.10e-10 ***
## Quality 3.6086 0.5273 6.843 6.75e-10 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 7.326 on 98 degrees of freedom
## Multiple R-squared: 0.3234, Adjusted R-squared: 0.3164
## F-statistic: 46.83 on 1 and 98 DF, p-value: 6.754e-10
The plot also confirms a linear relationship between product quality and sales.
Our results tell us that Hbat’s customer base cares more about product quality than price flexibility when it comes to increase orders from HBAT’s products. Product Quality only explained about 1/3 of the variation in Sales.