In: Statistics and Probability
The Consumer Reports Restaurant Customer Satisfaction Survey is based upon 148,599 visits to full‐service restaurant chains. Assume the available data on the Portal labelled Restaurant are representative of the results reported. The variable type indicates whether the restaurant is an Italian restaurant or a seafood/steakhouse. Price indicates the average amount paid per person for dinner and drinks, minus the tip. Score reflects diners’ overall satisfaction, with higher values indicating greater overall satisfaction. A score of 80 can be interpreted as very satisfied
a. develop estimated regression equation to show how overall customer satisfaction is related to average meal price
b. at 0.05 significance level, test whether estimated regression equation indicates a significant relationship between satisfaction and meal price
c. develop a dummy variable for type of restaurant and develop estimated regression equation to show overall customer satisfaction in relation to meal price and type of restaurant
d. is type of restaurant significant in overall satisfaction?
e. predict the score for a steakhouse that has average meal price of $20. how much would the score change if it was an Italian restaurant. calculate confidence interval and prediction interval for the predicted scores
f. Redo the last question but with average meal price of 27.
Sol:
> score <- c(77,79,85,84,81,77,86,75,83,71,81,76,81,83,81,81,80,78,82,79,76)
> price <- c(16,24,26,18,17,18,23,17,28,15,17,17,19,22,16,19,20,18,18,12,16)
(a)
> lm(score ~ price)
Call:
lm(formula = score ~ price)
Coefficients:
(Intercept) price
69.2760 0.5586
satisfaction score = 69.2760 + 0.5586 * price
(b)
> summary(lm(score ~ price))
Call:
lm(formula = score ~ price)
Residuals:
Min 1Q Median 3Q Max
-6.655 -2.213 1.111 2.228 4.669
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 69.2760 3.4005 20.373 2.28e-14
price 0.5586 0.1769 3.158 0.00518
(Intercept) ***
price **
---
Signif. codes:
0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 3.026 on 19 degrees of freedom
Multiple R-squared: 0.3442, Adjusted R-squared: 0.3097
F-statistic: 9.971 on 1 and 19 DF, p-value: 0.005182
The p-value to test the null hypothesis that there is no relationship between overall satisfaction and average meal price = 0.005182
Level of significance = 0.05
which is higher than p-value
So,we reject the null hypothesis at 0.05 level of significance
Hence, we conclude that there is a significant relationship between overall satisfaction and average meal price
(c)
> type <- c(1,0,0,1,1,0,1,0,1,0,1,0,0,1,0,1,0,0,1,1,1)
type is a dummy variable for the type of the restaurant -> 1 = italian, 0 = seafood/steakhouse
(d)
> lm(score ~ price + type)
Call:
lm(formula = score ~ price + type)
Coefficients:
(Intercept) price type
67.4049 0.5734 3.0382
score = 67.4049 + 0.5734 * price + 3.0382 * Indicator (type = Italian)
(e)
> summary(lm(score ~ price + type))
Call:
lm(formula = score ~ price + type)
Residuals:
Min 1Q Median 3Q Max
-5.0063 -2.1531 0.2734 1.6758 4.4203
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 67.4049 3.0535 22.07 1.74e-14 ***
price 0.5734 0.1546 3.71 0.0016 **
type 3.0382 1.1552 2.63 0.0170 *
---
Signif. codes:
0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 2.642 on 18 degrees of freedom
Multiple R-squared: 0.5262, Adjusted R-squared: 0.4736
F-statistic: 9.997 on 2 and 18 DF, p-value: 0.001202
The p-value to test the significance of factor - type of restaurant in overall customer satisfaction = 0.0170
which is less than 0.05 and is staistically significant
hence, the type of restaurant is a significant factor in overall customer satisfaction
(f)
price = 20
type = 0 (since type = seafood/steakhouse)
estimated customer satisfaction score
= 67.4049 + 0.5734 * price + 3.0382 * Indicator (type = Italian)
= 67.4049 + 0.5734 * 20 + 3.0382 * 0
= 78.8729