---
title: Menu Pricing for a New Italian Restaurant in New York City (IDMRAD version with regression analysis and technical appendix)

# to produce blinded version set to 1
blinded: 0 # don't remove - this will hide the title and authorship

authors: 
- name: Brian W. Junker
  thanks: brian@stat.cmu.edu
  affiliation: Department of Statistics & Data Science, Carnegie Mellon University
  
keywords: 
- Zagat
- Sheather (2009)
- Italian Food
- Food, Service, Decor

abstract: |
  We address the question of how to set menu prices for a new high-end Italian restaurant in New York City. We examine data on Italian restaurants in Manhattan collected by @zagat2001, using exploratory data analyses presented by @sheather2009. From exploratory data analysis, it appears that the average price of dinner is highly influenced by customer ratings of Food and Service, and somewhat less by Decor. However, these rating variables are highly correlated, and a regression analysis shows that Service matters much less after accounting for Food and Decor. The effect of location (east or west of Fifth Avenue) is more ambiguous. The maximal rating on each category is 24 or 25 out of 30, so there is room for a restaurant even more highly rated on all these dimensions.  The restuaurant would be competitively priced if the average dinner price was in the \$60--\$80 or so range, although it should be noted that no restaurants currently have prices above \$65.

bibliography: mybib.bib
output:
  bookdown::pdf_book:
    keep_tex: yes
    toc: no
    base_format: rticles::asa_article
---

```{r include = F, message = F, warning = F}
# packages to create this document (not needed to be included, 
# but you need to have them)
library(bookdown)
library(rticles)
```


```{r echo = F, message = F, warning = F}
library(tidyverse)
nyc <- read.csv("nyc.csv")
```


# Introduction {#s:intro} 
<!-- Note: the above ^{#s:intro} makes it so that we can reference it with just \@ref{s:intro}. -->

The restaurant market in any city is competitive and difficult to thrive in, and driven by customer perceptions as much as any other quality.  How should menu prices for a new restaurant be set? 

This question is especially critical in the highly competitive New York City market, where we have been asked to suggest prices for a new Italian restaurant's dinner menu that are consistent and competitive with other high-end Italian restaurants in Manhattan, in or north of the Flatiron district.  In particular, "The stated aims
of the restaurant are to provide the highest quality Italian food utilizing state-of-the-art décor while setting a new standard for high-quality service in Manhattan. The
creation and the initial operation of the restaurant will be the basis of a reality TV
show for the US and international markets (including Australia)" [@sheather2009, pp. 5--6].


In addition to answering the main question posed above, we will address the following questions:

- Which customer perception has the largest effect on pricing? 
- Should the restaurant be located east or west of Fifth Avenue, to maximize menu prices?
- Can we set a "price premium" (i.e., higher price) for "setting a new standard for high quality service in Manhattan" for Italian restaurants?
- Are there any restaurants that seem unusually high- or low-priced^[These are outliers, in common Statistical parlance.], given customer perceptions?


# Data {#s:data}

The data for this study come from several surveys that were conducted of Italian restaurants in or north of the Flatiron district in Manhattan in New York City. The reader should refer to @zagat2001 for definitions, eligibility, inclusion/exclusion criteria, and so forth, for these surveys.The data, and the entire problem as stated in Section \@ref(s:intro), are presented in Example 1.2.3, pp. 5--7, in @sheather2009. 

```{r fig-scatterplot-matrix, echo = F, fig.cap = "Scatterplot matrix of Price, Food, Décor, & Service ratings. From \\citet[][p. 7]{sheather2009}.", fig.pos="H"}
pairs(nyc[,-c(1:2,7)])
```

In all, 168 restaurants are represented in the data available to us, and the following variables were measured on each:

Table: Description of dataset of Restaurant datset.

|       |                                                                   |
| ----- | :--------------------------------------------------------------- |
| $Y$   |  Price $=$ the price (in \$US) of dinner (including one drink & tip)
| $x_1$ |  Food $=$ customer rating of the food (out of 30)
| $x_2$ |  Decor $=$ customer rating of the décor (out of 30)
| $x_3$ |  Service $=$ customer rating of the service (out of 30)
| $x_4$ |  East $=$ dummy variable $=$ 1 (0) if the restaurant is east (west) of Fifth Avenue

The data are available in the file `nyc.csv`, in the online supplement accompanying @sheather2009. 

In Figure \@ref(fig:fig-scatterplot-matrix) we show the relationships between all of the quantitative variables $x_1$ through $x_4$ in the data; each appears to be positively correlated with the response variable Price, and they are all positively correlated with each other. In Figure \@ref(fig:fig-boxplot) we show the relationship of Price to location (east or west of Fifth Avenue), showing relatively symmetric price distributions with no outliers and a weak relationship with location. More details from an exploratory data analysis (EDA) can be found in Appendix \@ref(appendix-1).

```{r fig-boxplot, fig.cap="Box plots of Price for two levels of the dummy variable East. From \\citet[][p. 7]{sheather2009}.", fig.height = 4, fig.width = 3, fig.pos="H", echo = F}
with(nyc,boxplot(Price ~ East, xlab="East (1 = East of Fifth Avenue)", col="white"))
```

# Methods {#s:methods}

Our analysis^[This is not the most complete possible analysis; however I hope that it is useful in demonstrating what an IDMRAD paper might look like.] consists of two parts. First, we relied on visual comparison of exploratory scatter plots and box plots 
<!-- \footnote{Obviously much more could be done, e.g. even a simple multiple regression analysis would be helpful here, since we could also examine how ratings work in combination to affect pricing. For illustrating the IMRAD paper however, this is enough. -->
(Figures \@ref(fig:fig-scatterplot-matrix) and \@ref(fig:fig-boxplot) in this report) provided by [@sheather2009, p. 7], using the R language and environment for statistical computing [@r2020]. In order to identify restaurants with unusual/outlying pricing, we have also examined the raw data in `nyc.csv`. This analysis can tell us about the individual effects of the variables, but not how they work in combination to affect pricing. Detailed R analyses can be found in Appendix \@ref(appendix-1) and Appendix \@ref(appendix-2).


Second, we considered two multiple regression models, also in R, predicting Price from each of the variables Food, Decor, Service, and East, since multiple regression can tell us about the effect of each individual predictor variable, after controlling for all the other predictor variables. We examined case-wise residual plots and a likelihood ratio test to select a good model, and we used that model to interpret the effects of the predictor variables and to estimate a competitive price for a "premium" restaurant. Details of these analyses in R can be found in Appendices \@ref(appendix-3), \@ref(appendix-4) and \@ref(appendix-5).}

Analyses were carried out in R and RStudio [@rstudio2020].


# Results {#s:results}

## Visual Comparison of Exploratory Plots {#ss:visual-EDA}

We can crudely estimate the slope of a (univariate) regression of Price on each rating variable, by dividing the plotting range of Price by the plotting range of each rating variable, estimated by eye from the scatterplots in Figure \@ref(fig:fig-scatterplot-matrix). The estimated slopes are 5.0 (Food), 2.67 (Décor), and 4.0 (Service). Thus, apparently, the Food rating has the biggest influence on Price (with a \$5 increase in price associated with each 1-point increase in rating), followed closely by Service, and somewhat more distantly by Décor. 

We can examine the influence of Service rating on Price more carefully by examining the scatter plot in the upper right in Figure \@ref(fig:fig-scatterplot-matrix). As noted in the previous paragraph, there appears to be a strong increasing relationship between Service rating and Price. Moreover, there is scope for creating a restaurant with higher Service ratings than any in the the Zagat survey: the highest Service rating appears to be 24 or so, out of 30. On the other hand, there is cause for concern about a higher price point for restaurants with excellent service: the two restaurants with the highest service ratings (about 24) do not have the highest average dinner prices: one is priced around \$54 with ten or so restaurants charging more for dinner, with lesser service ratings; and the other prices dinner quite modestly at under \$40. Indeed, restaurants with more modest service ratings of 18 and 20 are among the most costly in the survey. Based on this analysis, it does not seem worthwhile to rest higher Prices exclusively on high Service ratings.

Interestingly, the two restaurants with modest Service ratings and maximal dinner Prices also have quite modest Food ratings, as can be seen from top row of scatter plots in Figure \@ref(fig:fig-scatterplot-matrix). Examining the raw data^[We used the R command ` nyc[nyc$Price==max(nyc$Price),]`. See Appendix \@ref(appendix-2) for details] in R, we find is located East of Fifth, and the other West of Fifth, so location does not appear to be a direct influence. Instead, these restaurants seem to be getting a boost from relatively high Décor ratings.

Turning to the boxplots in Figure \@ref(fig:fig-boxplot), it appears that there is some influence of location (East of Fifth Avenue, vs West); the median price goes from about \$40 to about \$45, with a similar shift in the lower and upper quartiles of price. However, the interquartile range is about \$10 or so, and the entire range of prices for restaurants East of Fifth Avenue completely contains the range of prices for those West of Fifth. Since the typical effect of location is similar to the effect of a one-point increase in Food or Service rating---about \$5---it may not be worth it to choose a location East of Fifth, especially if the price of rent and other operating costs are substantially higher East of Fifth.

There do not appear to be any strong outliers in Price in this data set. The boxplots in Figure \@ref(fig:fig-boxplot) do not show any outliers by the usual 1.5$\times$IQR rule, and the scatterplots in the top row of Figure \@ref(fig:fig-scatterplot-matrix) generally confirm this. One restaurant seems to have a relatively high dinner Price, about \$54, with rather low Service and Food ratings (15 and 18, respectively). Examining the raw data^[We used the R command ` nyc[nyc$Service==15,]`, since there appear to be only five restaurants with this Service rating; from there it is easy to identify Nello from the R output\ldots{} See Appendix \@ref(appendix-2) for details.] in R, the restaurant appears to be Nello. From the raw data record
shown in Table \@ref(tab:tab-nello),

```{r tab-nello, echo = F}
nyc[nyc$Service==15,][1,] %>%
  knitr::kable(format = "latex", 
               caption = "Raw data record for the restaurant Nello.",
               booktabs = T, row.names = F) %>%
  kableExtra::kable_styling(latex_options = "HOLD_position")
```


## Regression Analysis {#ss:regression}

For regression analysis we considered the two multiple regression models
\begin{eqnarray}
    Y & = & \beta_0 + \beta_1 x_1 + \beta_2 x_2 + \beta_3 x_3 + \beta_4 x_4 + \varepsilon
(\#eq:main-effects)
\end{eqnarray}
and
\begin{eqnarray}
    Y & = & \beta_0 + \beta_1 x_1 + \beta_2 x_2 + \beta_3 x_3 + \beta_4 x_4 \nonumber \\
    & & + \beta_{12} x_1 x_2 + \beta_{13} x_1 x_3 + \beta_{14} x_1 x_4 \nonumber \\
    & & + \beta{23} x_2 x_3 + \beta_{24} x_2 x_4 + \beta_{34} x_3 x_4     
    + \varepsilon
(\#eq:interactions)
\end{eqnarray}

with $Y =$ Price, $x_1 =$ Food, $x_2 =$ Décor, $x_3 =$ Service, and $x_4 =$ East, as defined in Section \@ref(s:data). Casewise plots of residuals (Appendices \@ref(appendix-2) and \@ref(appendix-3)) did not reveal any substantial misfit, nor any worrying outliers or influential observations, for either model. A likelihood ratio test comparing model \@ref(eq:main-effects) with model \@ref(eq:interactions) does not strongly favor the model with interactions, and so for the remainder of the analysis we will use the main-effects-only model in equation \@ref(eq:main-effects).

```{r tab-fitted, echo = F}
library(latex2exp)
coef_summary <- coef(summary(lm.0 <- lm(Price ~ . , data=nyc[,-c(1,2)])))

coef_summary_df <- coef_summary %>% as.data.frame %>% rownames_to_column() %>%
  mutate(rowname =paste(paste0("$\\hat{\\beta}_",0:4, "$"),rowname)) %>%
  rename(` `="rowname") 

colnames(coef_summary_df)[5] <- "$P(T > |t|)$"

coef_summary_df %>%
  knitr::kable(format="latex", digits = 3,
               booktabs = T, row.names = F,caption = "Estimated coefficients for model \\ref{eq:main-effects}.",
               escape = FALSE) %>% # important for latex rendering
  kableExtra::kable_styling(latex_options = "HOLD_position")
```

Table \@ref(tab:tab-fitted) gives the estimated coefficients for model \@ref(eq:main-effects) along with standard errors and the usual $t$-test for testing whether each coefficient is significantly different from zero. We can see that Food and Decor each have a strong effect on price, worth about \$1.54 per rating point for Food, and \$1.91 per rating point for Decor. Service does not have much of a unique effect after accounting for other variables in the model. This could either be because Service is not really important in the model (which seems to contradict Figure \@ref(fig:fig-scatterplot-matrix), for example), or it could be that Service is highly correlated with other variables. For example in Figure \@ref(fig:fig-scatterplot-matrix) it can be seen in the bottom row, second plot, that as the Food quality goes up, so does the Service quality, so that once Food quality is accounted for, perhaps there is little more variation for Service quality to account for. This is an "ensemble" effect that could not be seen in the one-variable-at-a-time analyses in Section \@ref(ss:visual-EDA).

On the other hand, restaurant location, encoded by the variable East, has a significant but small effect on the mean price: it's worth about \$2 more in average price for a restaurant to be located East of Fifth Avenue. This seems different from the result using boxplots in Figure \@ref(fig:fig-boxplot). The difference is that boxplots compare the whole distribution, so differences have to be fairly widespread across the price distribution for us to see a difference, whereas the regression analysis focuses on mean price, adjusted for the other variables in the model^[Generally when you concentrate inference on the means, you get more dramatic results (because, roughly speaking, $SE_{mean} = SD_{population}/\sqrt{sample size}$).]. 

We can see from the exploratory analysis (Appendix \@ref(appendix-1)) that the maximum Food, Decor and Service ratings are all 24 or 25. To examine pricing for a ``Premium'' restaurant, we estimated the average price for two fictional restaurants (Appendix \@ref(appendix-5)):

- A restaurant located West of Fifth Avenuem with Food, Decor and Service ratings of 25 each: estimated price \$62.11 with a prediction interval of $(50.36, 73.87)$.
- A restaurant located East of Fifth Avenue with Food, Decor and Service ratings of 30 each: estimated price \$81.41 with a prediction interval of $(69.08, 93.74)$.


Thus it seems that a "Premium" restaurant could charge on average between about \$60 and \$80. It should be noted that the current highest average price is \$65, so such a restaurant might wish to charge in the lower part of this range, to stay competitive with other restaurants.

Finally, in examining the residual plots for model \@ref(eq:main-effects) more closely in Figure \@ref(fig:fig-resids) (see also Appendix \@ref(appendix-3)), we can see that Case 56 is the most extreme outlier (with a standardized residual of at least 3). Referring back to Table \@ref(tab:tab-nello), we see once again that this is the restaurant Nello, which we also identified from the visual EDA. (More generally, higher prices seem to be under-predicted by the model.)

```{r fig-resids, fig.cap = "Residuals (raw and standardized) from model (\\ref{eq:main-effects}).", fig.pos="H", fig.height=3, fig.width = 6, fig.align="center", echo = F}
lm.0 <- lm(Price ~ . , data=nyc[,-c(1,2)])
par(mfrow = c(1,2))
plot(lm.0, which = c(1,2), cex = .5)
```

# Discussion {#s:discussion}


The many Italian restaurants north of Flatiron in Manhattan surveyed by @zagat2001 exhibit a wide range of Price as well as Food, Décor and Service ratings. In ourone-variable-at-a-time exploratory analysis, we found that Food and Service ratings exert high and nearly identical influence on Price, with an increase of one rating point associated with about a \$4--\$5 increase in average dinner price, while Decor has an effect about half as large. When we examined the effects of all the variables together in a multivariate regression, we fould that Food and Décor had an effect of about \$1.54 and \$1.91 per rating point, respectively, whereas Service had a negligible effect after accounting for the other two variables; this may be because Service is so highly correlated with the other variables (Food, especially). Overall, location (east or west of Fifth Avenue) does not appear to move the price distribution very much (as seen in the boxplots in Figure \@ref(fig:fig-boxplot)), though there is a mean price increase of about \$2 for locating east of Fifth Avenue after controlling for the other variables (Table \@ref(tab:tab-fitted)). We did find one restaurant in both the exploratory analysis and the regression analysis---Nello---whose price seemed unusually high for its otherwise modest customer ratings, located east of Fifth Avenue. 

If, say, you are going to open several restaurants, you may care more about the fact that the mean price can be higher East of Fifth Avenue, since on average you can charge a bit more in all your restaurants, and perhaps make substantially more money from their combined income. On the other hand if you are considering opening just one restaurant, the boxplots may be more important: the price distributions for East vs West restaurants greatly overlap, so there's little reason, in terms of competitiveness or profits, to make a location East of Fifth Avenue a primary concern.

There is scope for establishing a restaurant with higher Service ratings than any others in the Zagat surveys; indeed, ratings on all three scales top out at about 24 or 25 out of 30. From our regression analysis we concluded that a restaurant with ratings in the 25--30 range might charge between roughly \$60 and \$80, although to stay competitive such a restaurant might want to stay close to the current high average price of \$65.

<!-- However, a high Service rating does not seem to be necessary nor sufficient to command a high dinner Price. -->

The visual exploration of EDA graphs allowed us to look at univariate and bivariate relationships, and as such could not readily consider the interaction of two or more variables influencing price. Although much can be learned from visual inspection like this, the multivariate regression analysis allowed us to look at the ensemble effect of all of the variables on price. Future analyses might expand on this approach.


<!-- In addition, since no statistical model was assumed, no measure of uncertainty could be obtained; thus it is difficult to tell which effects we have estimated and reasoned above are sufficiently larger than variation in the sample to be considered important for decision making. Future analyses should at least consider multivarate regression, which could in principle address these shortcomings. -->

Our study was also limited by the use of @zagat2001 data as reported by @sheather2009. It is not known how representative this data is of Italian restaurants generally in Manhattan; the Zagat data were collected to give Zagat readers useful information about individual restaurants they might be interested in, rather than to provide an unbiased characterization of Italian restaurants in the target area. In addition, the data is somewhat old; the population of Italian restaurants has undoubtedly changed in the past 17--18 years, and prices and ratings have undoubtedly changed as well.

In summary, keeping the caveats of the last two paragraphs in mind, there is scope to establish a restaurant providing ``the highest quality Italian food utilizing state-of-the-art décor while setting a new standard for high-quality service in Manhattan'' [@sheather2009, pp. 5--6]. Location (East or West of Fifth Avenue) does not seem to be a big price driver, on average; and there doesn't seem to be much hope of establishing a price premium for outstanding service alone. However, a restaurant with ratings in the 25--30 range on Food, Décor and Service could have an average dinner Price in the \$60--\$80 or so range, and be competitive within the set of restaurants surveyed by @zagat2001, for which the highest average dinner price was \$65. 


\pagebreak

# (APPENDIX) Appendix {-}
<!-- weirdly this header disappears completely - but it does start the numbering A, B, C,... -->

# Appendix 
<!-- The below just pastes the code from "menu pricing.rmd" into the end of this document -->
```{r, child = "menu pricing.rmd"}
```