1 Aim

In the ever-evolving landscape of the culinary industry, opening a restaurant requires a nuanced understanding of various factors that contribute to its success. A prospective restaurateur, eager to navigate the complex realm of food service, has embarked on a comprehensive survey to unravel the critical elements that determine the triumph of a dining establishment.

This survey revolves around six key criteria, each meticulously selected to gauge and comprehend the multifaceted nature of the restaurant business. The restaurateur aims to delve into customer satisfaction with delivery services, strategically identify the most suitable areas for restaurant establishment based on delivery time, and ascertain the influence of location on the overall success of the venture.

To classify restaurants into distinct categories, the survey will focus on two pivotal aspects: customer satisfaction with the quality of food and the efficiency of delivery services. These aspects will help categorize establishments into the ‘Pro’ and ‘Ordinary’ classes, enabling the restaurateur to make informed decisions about the positioning and operational strategy of their future business.

Furthermore, the survey seeks to unravel the intricate relationship between order quantity and delivery time. Understanding the impact of order volume on the timely delivery of food is paramount for optimizing operational efficiency and ensuring customer satisfaction.

In addition to operational considerations, the survey will explore the nuanced preferences of diners concerning the choice of cuisine. The restaurateur recognizes the pivotal role that culinary offerings play in customer reception and aims to uncover how the selection of cuisine can influence the overall dining experience.

With these six criteria as the foundation, the survey endeavors to provide the restaurateur with a comprehensive understanding of the dynamic restaurant industry. Armed with valuable insights, the prospective business owner can make informed decisions regarding the class of their restaurant, the optimal location for establishment, and the strategic choices that will define their culinary venture. Through this survey, the restaurateur aims to embark on their entrepreneurial journey with a clear vision and a strategic roadmap for success in the competitive world of gastronomy.

2 Data Description

This is a data frame with 500 observations on 13 variables.

  • Description: An employee of a food delivery app (FoodX) recorded details of 500 orders to the restaurants that were placed in a day. He collected 13 variables.
  • Variables:
    1. OrderID: a numeric vector, unique identifier of orders
    2. Customer_Name: a nominal variable that describes the name of customers
    3. Order_Date: date and time of the order
    4. Quantity: a numeric vector, the number of items that the customer ordered
    5. Order_Amount: a numeric vector, the total bill amount (dollars)
    6. Payment_Mode: a factor with levels Cash on Delivery Debit Card Credit Card, the payment method used by customers
    7. Delivery_Time: a numeric vector, the taken time for food to be delivered to customers (minutes)
    8. Customer_Rating_Food: a factor with levels from 1 (Really bad) to 5 (Really Good), the quality of the food from a restaurant
    9. Customer_Rating_Delivery: a factor with levels from 1 (Really bad) to 5 (Really Good), the experience with delivery service
    10. Restaurant_Name: a nominal variable that describes the name of 20 different restaurants
    11. Cuisine: a nominal variable that describes the nationality of the cuisine, including “French”, “Chinese”, “North Indian”, “South Indian”, “African”, “Continental” , “Belgian”, “Arabian”
    12. Zone: a factor with levels A, B, C, and D, the geographical area that the restaurant locates
    13. Category: a factor with levels Ordinary and Pro, the rank of the restaurant

Data cleaning steps included joining 2 data sets, dropping some unnecessary columns, and standardizing variables’ names. The data sets have no missing values.

3 The Proportion of Customer Satisfaction with FoodX (delivery app)

Understanding the population proportion of satisfied customers is crucial for making decisions about which application to integrate into the restaurant’s services. In this case, the popular food delivery application FoodX has been identified as a potential option, boasting a notable rating of 70% for both delivery services and food quality. To validate the satisfaction level of customers, we conducted to estimate the population proportion of satisfied customers using this platform.

3.1 Method

3.1.1 The Hypothesis of Testing Proportion

We decided to perform the Hypothesis of Testing Proportion in order to estimate the population proportion of satisfied customers using this application. We created a new column that computes average the ratings of customers for both food quality and delivery services.

rating <- data %>%
  mutate(avr_rating = (Customer_Rating_Food + Customer_Rating_Delivery)/2) %>%
  select(avr_rating)

3.1.2 The satisfaction levels

We classify customer satisfaction based on 2 levels: Unsatisfied and Satisfied on a scale from 1 to 5, to simplify the variable to deal with:

  • Unsatisfied: Customers rated a 1, 1.5, 2, or 2.5.
  • Satisfied: Customers rated a 3, 3.5, 4, 4.5, or 5.

3.1.3 Frequency table and Data visualization

The customers’ satisfaction level can be expressed as a frequency table.

# Create a new column "Satisfaction level" to categorize the ratings into 2 types: Unsatisfied (scores from 1 to 2.5) and Satisfied (scores from 3 to 5)
rating$s_level <- cut(rating$avr_rating,
                     breaks = c(0, 2.5, 5.0),
                     labels= c("Unsatisfied", "Satisfied"),
                     include.lowest = TRUE)

# Create a frequency table
s_freq <- count(rating, s_level)

# Display the table
s_freq %>%
  kable("html") %>% 
  kable_styling(
    bootstrap_options = c("striped", "hover"),
    position = "center",
    font_size = 12,
    latex_options = c("scale_down")) %>%
  row_spec(0, bold = TRUE, color = "white", background = "#2A3F54")
s_level n
Unsatisfied 162
Satisfied 338

To illustrate the table, we decided to use pie chart.

# Preparing data for a pie chart
s_freq <- s_freq %>%
  mutate("percentage" = round(n/sum(n)*100, 1))

# Pie chart
ggplot(data= s_freq, mapping= aes(x='', y= n, fill=s_level)) +
  geom_bar(stat= 'identity', width= 1, color= 'white') +
  coord_polar('y') +
  labs(fill = "Satisfaction Level") +
  theme_void() +
  geom_text(aes(label = paste0(percentage, "%")),
            position = position_stack(vjust = 0.5),
            color= 'white')

3.2 Analysis

Step 1: Hypotheses Formulation

  • Null Hypothesis (\(H_0\)): The true proportion of satisfied customers for the FoodX application is equal to or greater than 70%.
  • Alternative Hypothesis (\(H_1\)): The true proportion of satisfied customers for the FoodX application is less than 70%.

In this case, we decided to use a one-sided test because our interest is specifically in determining if the satisfaction rate is less than 70%.

Step 2: Frequency Table and Significance level

  • The frequency table of customer satisfaction (categorized as satisfied and unsatisfied) is created above.
  • The significance level is chosen with the value of 0.01.

Step 3: Conduct Hypothesis of Testing Proportion

The one-sample proportions test is conducted to assess whether the actual proportion of satisfied customers deviates significantly from the claimed 70%, providing essential insights for deciding on the adoption of the FoodX application in the restaurant.

# One-sample test of Proportions
successes <- count(rating, s_level)$n[2]
total_trials <- length(rating$s_level)
STest <- prop.test(x = successes, n = total_trials, p=0.70, alternative = "less", conf.level = 0.99)
print(STest)
## 
##  1-sample proportions test with continuity correction
## 
## data:  successes out of total_trials, null probability 0.7
## X-squared = 1.2595, df = 1, p-value = 0.1309
## alternative hypothesis: true p is less than 0.7
## 99 percent confidence interval:
##  0.0000000 0.7235309
## sample estimates:
##     p 
## 0.676

We can see that the p-value is much greater than the significance level of 0.01. Therefore, there is not enough evidence to reject the null hypothesis. The 99% confidence interval includes the null hypothesis value of 0.70, indicating that the true proportion of satisfied customers could reasonably be 70%.

3.3 Conclusion

While the observed proportion of satisfied customers (67.6%) fell short of the claimed 70%, the statistical evidence was not strong enough to reject the Null Hypothesis. The restaurateur decided that FoodX’s reported satisfaction rate was within a reasonable range, and with confidence in their decision, we decided to use FoodX to serve dishes to potential customers.

4 Delivery Time Across Zones

In the bustling world of restaurant entrepreneurship, selecting the right location is crucial for success. To help the restaurateur make an informed decision, we focus the investigation on the delivery times in various zones, recognizing the impact of timely deliveries on customer satisfaction.

4.1 Method

The primary goal is to assess and compare delivery times across different zones to identify the most suitable location for the new restaurant. To achieve this, a statistical analysis is conducted using the R programming language. The analysis includes an analysis of variance (ANOVA) to determine if there are significant differences in delivery times among the zones.

4.2 Analysis

4.2.1 Data visualization

First, we craft a box plot, a visual representation of the distribution of delivery times across different zones:

# Reorder Zone in ascending order based on the median value of Delivery Time
bymedian <- with(data, reorder(Zone, Delivery_Time, median))
# Create a box plot
ggplot(data, aes(x = bymedian, y = Delivery_Time, fill = Zone)) +
  geom_boxplot() +
  labs(title = "Delivery Times by Zone",
       x = "Zone",
       y = "Delivery Time") +
  theme_minimal()

  • Quartile statistics including Q1, median, and Q3 for each zone, were calculated using the quantile and median functions in the dplyr package. This step aimed to provide a detailed understanding of the central tendency and variability within each zone.
# Calculate Q1, median, and Q3 for each zone
summary_stats <- data %>%
  group_by(Zone) %>%
  summarize(Q1 = quantile(Delivery_Time, 0.25),
            Median = median(Delivery_Time),
            Q3 = quantile(Delivery_Time, 0.75))

# For removing NA’s in the table
options(knitr.kable.NA = "")

# Print the calculated statistics
summary_stats %>%
  kable("html") %>% 
  kable_styling(
    bootstrap_options = c("striped", "hover"),
    position = "center",
    font_size = 12,
    latex_options = c("scale_down")) %>%
  row_spec(0, bold = TRUE, color = "white", background = "#2A3F54")
Zone Q1 Median Q3
Zone A 20.00 31 41.00
Zone B 22.00 28 40.00
Zone C 21.25 31 40.75
Zone D 20.00 30 42.00

The box plot visually depicts the distribution of delivery times across four distinct zones.

  • In Zone A, the interquartile range (IQR) spans from Q1 at 20.00 to Q3 at 41.00, showcasing a moderate spread of data points. The median at 31.00 indicates the central tendency, suggesting a balanced distribution.
  • Zone B exhibits a slightly narrower IQR, ranging from Q1 at 22.00 to Q3 at 40.00, with a median of 28. This implies a more concentrated cluster of delivery times, indicating relative stability.
  • Zone C mirrors Zone A with an IQR from Q1 at 21.25 to Q3 at 40.75 and a median of 31, presenting a similar distribution pattern.
  • In Zone D, the wider IQR from Q1 at 20.00 to Q3 at 42.00 signifies increased variability, with a median of 30 denoting the central tendency.

The box plot provides a succinct visualization of the variability and central tendencies within each zone, aiding in a quick comparison of the distribution patterns of delivery times.

4.2.2 ANOVA test

Our analysis kicks off with ANOVA, a statistical method for comparing means among different groups. In our case, we model delivery times as a function of the zone:

# Perform ANOVA analysis
anova_result <- aov(Delivery_Time ~ Zone, data = data)

# Tidy ANOVA results
tidy_anova <- tidy(anova_result)

# For removing NA’s in the table
options(knitr.kable.NA = "")

# Print the ANOVA table
tidy_anova %>%
  kable("html") %>%
  kable_styling(
    bootstrap_options = c("striped", "hover"),
    position = "center",
    font_size = 12,
    latex_options = c("scale_down")) %>%
  row_spec(0, bold = TRUE, color = "white", background = "#2A3F54")
term df sumsq meansq statistic p.value
Zone 3 49.32596 16.44199 0.1158169 0.9508255
Residuals 496 70414.79204 141.96531

P-value Examination

# Check the p-value from the ANOVA analysis
p_value <- summary(anova_result)[[1]][["Pr(>F)"]][[1]]

Evaluating the p-value from the ANOVA analysis (p-value = 0.9508255) provides insights into overall group differences in delivery times among different zones.

# Interpret the results based on the p-value
if (p_value < 0.05) {
  interpretation <- "There is a significant difference in delivery times among the zones."
} else {
  interpretation <- "There is no significant difference in delivery times among the zones."
}
interpretation
## [1] "There is no significant difference in delivery times among the zones."

This interpretation, based on a significance level of 0.05, guides restaurant owners in making informed decisions regarding the optimization of delivery services.

4.3 Conclusion

Our meticulous analysis of delivery times across zones has yielded valuable insights for selecting an optimal location for a new restaurant. Zones A and C stand out as favorable choices due to their consistent central tendencies and moderate variability, aligning well with the goal of providing reliable and timely deliveries. Zone B, with stable delivery times, remains a viable option, while Zone D, with wider variability, requires careful consideration.

The combined use of ANOVA and visualizations, such as the box plot, provides a nuanced understanding of differences in mean delivery times. The interpretation of the p-value underscores the statistical significance, guiding a well-informed decision.

In conclusion, the integrated analysis of quartile statistics and strategic considerations reveals that Zones A and C stand out as the most suitable areas for opening the restaurant. These zones offer a compelling combination of reliability and moderate variability, aligning seamlessly with the overarching objectives of the business. The findings provide valuable insights, empowering our restaurateur with the knowledge needed for a strategic and successful commencement of the restaurant venture.

5 Customer Sastifaction Across Zones

Ratings are considered one of the most important criteria of customers before booking in any given restaurant because it reflects hands-on experience of the service. This data set concerns two ratings: (1) Food and (2) Delivery Service, which will be analyzed further in this part.

Along with that, the restaurateur is also in search for a location (in Zone A, B, C or D) to run their business: whether they would receive better customer rating on delivery if the traffic is better in a specific zone, or whether customers will have a more relaxed judgment if they order food from a zone compared to others.

Instead of wondering yes or no, we set out with the Chi-square Test of Independence to answer these 2 questions:

  1. Food: How do zones (A, B, C, D) impact customer satisfaction on Food?
  2. Delivery Service: How do zones (A, B, C, D) impact customer satisfaction on Delivery Service?

5.1 Method

5.1.1 The Chi-square Test of Independence

The Chi-square Test of Independence, also known as the Chi-square Test of Association analyzes whether there is an association between categorical variables (i.e., whether they are independent or related).

We decided to perform a Chi-square Test of Independence to find out the correlation between the Restaurant Zone Locations and Customer Satisfaction for the fit of these criteria:

  • The two variables in each situation (Zones and Satisfaction for Food, Zones and Satisfaction for Delivery Service) are two categorical variables.
  • There are two or more categories for each variable: Satisfied/ Unsatisfied and Zone A/ Zone B/ Zone C/ Zone D.
  • There is no relationship between the subjects in each group, and they are not linked in any way such as pre or post-test observations.
  • The sample size is relatively large with expected frequencies per cell are all larger than 1, and at least 5 for the majority of the cells.

5.1.2 Ratings and Satisfaction

We deduct the level of satisfaction by categorizing the rating level of customers on the scale from 1 to 5, to simplify the variable to deal with:

  • Unsatisfied: Customers rated a 1 or 2.
  • Satisfied: Customers rated a 3, 4, or 5.

5.1.3 Contingency Table and Data Visualization

The Chi-square Test of Independence examines the data using a contingency table, an arrangement of values frequency according to the categorical variables.

For this part, we compiled two contingency tables based on the different variables in each question.

  1. Customer Food Rating
# Create a contingency table for Customer Food Rating
food_rating <- data %>% mutate('Food_Satisfaction'=case_when(
       Customer_Rating_Food %in% c(1, 2) ~ 'Unsatisfied',
       Customer_Rating_Food %in% c(3,4, 5) ~ 'Satisfied',
       TRUE ~ as.character(Customer_Rating_Food)))  

food_rating <- select(food_rating, 'Food_Satisfaction', Zone)

# Display the table
table(food_rating) %>%
  kable("html") %>% 
  kable_styling(
    bootstrap_options = c("striped", "hover"),
    position = "center",
    font_size = 12,
    latex_options = c("scale_down")) %>%
  row_spec(0, bold = TRUE, color = "white", background = "#2A3F54")
Zone A Zone B Zone C Zone D
Satisfied 45 93 64 151
Unsatisfied 24 39 22 62
# Mosaic plot for Customer Food Rating Across Zones
food_rating1 = table(food_rating$Food_Satisfaction, data$Zone)
food_rating1 <- t(food_rating1)
mosaicplot(
  food_rating1,
  color = c("#3D4578", "#F6A8A8"),
  xlab = "Zone",
  ylab = "Customer Food Satisfaction",
  main = "Customer Food Rating")

  1. Customer Delivery Rating
# Create a contingency table for Customer Food Rating
delivery_rating <- data %>%
  mutate(Delivery_Satisfaction = case_when(
    Customer_Rating_Delivery %in% c(1, 2) ~ 'Unsatisfied',
    Customer_Rating_Delivery %in% c(3, 4, 5) ~ 'Satisfied',
    TRUE ~ as.character(Customer_Rating_Delivery)))

delivery_rating <- select(delivery_rating, 'Delivery_Satisfaction', Zone)

# Display the table
table(delivery_rating) %>%
  kable("html") %>% 
  kable_styling(
    bootstrap_options = c("striped", "hover"),
    position = "center",
    font_size = 12,
    latex_options = c("scale_down")) %>%
  row_spec(0, bold = TRUE, color = "white", background = "#2A3F54")
Zone A Zone B Zone C Zone D
Satisfied 37 79 56 132
Unsatisfied 32 53 30 81
# Mosaic Plot for Delivery Service Rating Across Zones
delivery_rating1 = table(delivery_rating$Delivery_Satisfaction, data$Zone)
delivery_rating1 <- t(delivery_rating1)
mosaicplot(
  delivery_rating1,
  color = c("#3D4578", "#F6A8A8"),
  xlab = "Zone",
  ylab = "Customer Delivery Satisfaction",
  main = "Customer Delivery Rating")

5.2 Analysis

Step 1: Hypotheses Formulation

We formulate the hypotheses relating to our question in this part, which are the same for both questions related to Food and Delivery Service:

  • Null Hypothesis (\(H_0\)): There is no significant association between zones and customer satisfaction.
  • Alternative Hypothesis (\(H_1\)): There is a significant association between zones and customer satisfaction.

Step 2: Contingency Table and Significance Level

  • The contingency table of zones and customer satisfaction (categorized as satisfied/ unsatisfied) is created like above.
  • The significance level is chosen with the value of 0.05.

Step 3: Conduct Hypothesis Test

We then conduct the Chi-square test to assess the independence between zones and customer satisfaction.

  1. Food: How do zones (A, B, C, D) impact customer satisfaction on Food?
# Chi-square Test of Independence
food_chi <- chisq.test(table(food_rating))
food_chi
## 
##  Pearson's Chi-squared test
## 
## data:  table(food_rating)
## X-squared = 1.5774, df = 3, p-value = 0.6645

We see that the p-value is larger than our chosen significance level. Thus, we accept the null hypothesis.

  1. Delivery Service: How do zones (A, B, C, D) impact customer satisfaction on Delivery Service?
#Chi-square Test of Independence
deli_chi <- chisq.test(table(delivery_rating))
deli_chi
## 
##  Pearson's Chi-squared test
## 
## data:  table(delivery_rating)
## X-squared = 2.3363, df = 3, p-value = 0.5056

We see that the p-value is larger than our chosen significance level. Thus, we accept the null hypothesis.

Step 4: Interpretation

From the results of Chi-square Test of Independence and visualized plots, we find that there is no significant evidence to suggest that restaurant zones can impact Customer Rating on Food and Delivery Service.

5.3 Conclusion

Therefore, this F&B entrepreneur may not need to worry that the location of their restaurant will affect Customer Satisfaction with the Food and Delivery Services.

6 Cuisine: Customer’s Preference

The most important factors to consider before opening a restaurant with online delivery is probably what type of food we should serve. The taste of people varies, and the restaurateur is having difficulty in determining the menu to offer, to have the best customer enjoyment and turnover rate.

Therefore, for this wonder, the Chi-square Test of Independence is utilized again to answer “How much does choice of cuisine impact customer reception on Food?”

6.1 Method

6.1.1 The Chi-square Test of Independence

In this Chi-square Test of Independence, we like to examine the correlation between the Cuisine and Customer Reception for the fit of these criteria:

  • The two working variables (Cuisine and Customer Reception) are two categorical variables.

  • There are two or more categories for each variable:

    • Customer Reception: Well-received/ Adequate/ Displeasing
    • Cuisine: French/ Chinese/ North Indian/ South Indian/ African/ Continental/ Belgian/ Arabian
  • There is no relationship between the subjects in each group, and they are not linked in any way such as pre or post-test observations.

  • The sample size is relatively large with expected frequencies per cell are all larger than 1, and at least 5 for the majority of the cells.

6.1.2 Ratings and Reception

In this part, since we wanted a more precise analysis of how well does the customer receive the food order, the 3 levels of reception is deducted by categorizing customer ratings of Food quality:

  • Well-received: Customers rated a 4 or 5.
  • Adequate: Customers rated a 3.
  • Displeasing: Customers rated a 1 or 2.

6.1.3 Contingency Table and Data Visualization

The Chi-square Test of Independence examines the data using a contingency table, an arrangement of values frequency according to the categorical variables. For this question, we conduct a Contingency Table with the variables of Customer Reception and Cuisine.

# Create a contingency table for Cuisine Food Reception
cuisine_reception <- data %>%
  mutate(Cuisine_Reception = case_when(
    Customer_Rating_Food %in% c(1, 2) ~ 'Displeasing', Customer_Rating_Food %in% c(3) ~ 'Adequate',
    Customer_Rating_Food %in% c(4, 5) ~ 'Well-received',
    TRUE ~ as.character(Customer_Rating_Food)  # If none of the conditions are met, keep the original value
  ))

cuisine_reception <- select(cuisine_reception, 'Cuisine_Reception', Cuisine)

table(cuisine_reception) %>%
  kable("html") %>% 
  kable_styling(
    bootstrap_options = c("striped", "hover"),
    position = "center",
    font_size = 12,
    latex_options = c("scale_down")) %>%
  row_spec(0, bold = TRUE, color = "white", background = "#2A3F54")
African Arabian Belgian Chinese Continental French North Indian South Indian
Adequate 16 5 8 15 26 16 15 16
Displeasing 15 7 22 28 9 24 17 25
Well-received 30 13 26 38 20 31 49 29

We also decided to draw a stacked bar plot to visualize the association between the customer level of reception and the cuisine that the restaurants decided to serve.

# Count occurrences of each combination
reception_counts <- count(cuisine_reception, Cuisine, Cuisine_Reception)

# Create a stacked bar chart with different colors for each category
ggplot(reception_counts, aes(x = Cuisine, y = n, fill = Cuisine_Reception)) +
  geom_bar(stat = 'identity') +
  labs(title = 'Customer Reception on Cuisine',
       x = 'Cuisine',
       y = 'Count',
       fill = "Customer Reception") +
  scale_fill_manual(values = c("#3D4578", "#B8D8E1", "#F6A8A8")) +
  theme_test() +
  theme(axis.text.x = element_text(angle = 345, face = "bold"))

6.2 Analysis

Step 1: Hypotheses Formulation

We formulate the hypotheses relating to our research question, including:

  • Null Hypothesis (\(H_0\)): There is no significant association between choice of cuisine and customer level of reception on food.
  • Alternative Hypothesis (\(H_1\)): There is a significant association between the choice of cuisine and the customer’s level of reception on food.

Step 2: Contingency Table and Significance Level

  • The contingency table of Cuisine and Customer Reception (categorized as well-received/ adequate/ displeasing) is created like above.
  • The significance level is chosen with a value of 0.01.

Step 3: Conduct Hypothesis Test

We then conduct the Chi-square test to assess the independence between cuisine and customer reception on food.

#Chi-square Test of Independence
results <- chisq.test(table(cuisine_reception))
print(results)
## 
##  Pearson's Chi-squared test
## 
## data:  table(cuisine_reception)
## X-squared = 32.302, df = 14, p-value = 0.003629

We see that the p-value is smaller than our chosen significance level (0.0036287 < 0.01). Thus, we reject the null hypothesis and find that there is sufficient evidence to suggest an association between the choice of cuisine and customer reception on food.

Step 4: Further Analysis

From the results of the Chi-square Test of Independence, we decided to conduct further analysis by calculating the observed and expected values of the variables to see which cells contribute the most to the Chi-square statistic.

# Further analysis

## Extract observed and expected values
observed_values <- results$observed
expected_values <- results$expected

## Compare observed and expected values in each cell
comparison <- data.frame(
  Cuisine_Rating = rownames(observed_values),
  Cuisine = colnames(observed_values),
  Observed = as.vector(observed_values),
  Expected = as.vector(expected_values),
  Difference = as.vector(observed_values - expected_values))

## Print the comparison
comparison <- comparison %>% arrange(Cuisine_Rating)
comparison %>%
  kable("html") %>%
  kable_styling(
    bootstrap_options = c("striped", "hover"),
    position = "center",
    font_size = 12,
    latex_options = c("scale_down")) %>%
  row_spec(0, bold = TRUE, color = "white", background = "#2A3F54")
Cuisine_Rating Cuisine Observed Expected Difference
Adequate African 16 14.274 1.726
Adequate Chinese 5 5.850 -0.850
Adequate North Indian 8 13.104 -5.104
Adequate Arabian 15 18.954 -3.954
Adequate Continental 26 12.870 13.130
Adequate South Indian 16 16.614 -0.614
Adequate Belgian 15 18.954 -3.954
Adequate French 16 16.380 -0.380
Displeasing Arabian 15 17.934 -2.934
Displeasing Continental 7 7.350 -0.350
Displeasing South Indian 22 16.464 5.536
Displeasing Belgian 28 23.814 4.186
Displeasing French 9 16.170 -7.170
Displeasing African 24 20.874 3.126
Displeasing Chinese 17 23.814 -6.814
Displeasing North Indian 25 20.580 4.420
Well-received Belgian 30 28.792 1.208
Well-received French 13 11.800 1.200
Well-received African 26 26.432 -0.432
Well-received Chinese 38 38.232 -0.232
Well-received North Indian 20 25.960 -5.960
Well-received Arabian 31 33.512 -2.512
Well-received Continental 49 38.232 10.768
Well-received South Indian 29 33.040 -4.040

The most interesting patterns we can deduct from the table of differences between the observed and expected values are:

  1. Continental cuisine tends to have higher observed counts for both the Reception Level of Adequate (26 observed vs 12.870 expected) and Well-received (49 observed vs 38.232 expected).
  2. South Indian and North Indian cuisines tend to have higher observed counts for the Reception Level of Displeasing (22 observed vs 16.464 expected and 25 observed vs 20.580 expected, respectively).
  3. French cuisine tends to have lower observed counts for the Reception Level of Displeasing (9 observed vs 16.170 expected).

6.3 Conclusion

Following the Chi-square Test of Independence and the visualized stacked bar chart, we came to the conclusion that there is a significant association between the Choice of cuisine and Customer’s Reception Level upon it.

Although the restaurant’s menu can go beyond recorded data, depending also on the restaurant’s marketing, food quality, and cooks’ talents, the restaurateur could utilize the calculated outcomes based on further analysis.

According to that, upon choosing a cuisine to focus on, this F&B entrepreneur should consider these factors:

  1. Continental cuisine would be a safe option, for it would be delivered mainly to locals, who are already familiar with the taste of continental cuisine.
  2. If the restaurateur wants to get out of the geographical box, French cuisine will be the next best option since it has a low Displeasing Level of Reception.
  3. North and South Indian cuisine may not be the ideal taste for customers in the region, so if the restaurateur has more cuisine choices, it’s safe to avoid these food menus.

7 Restaurant rank: Pro and Ordinary

The restaurants are categorized into 2 classes: Pro and Ordinary. Restaurateur does not know in which class they should operate their business. Thus, to help them, we are interested in comparing the order amount and the delivery time of the 2 ranks to see if there are any valuable insights.

7.1 Order Amount

# Narrow down the data set to work with
order_t <- data %>%
  select(Category, Order_Amount)

# Box plot
ggplot(order_t, aes(x = Category, y = Order_Amount, fill= Category)) +
  geom_boxplot() +
  labs(title = "Boxplot of Order Amount by Category",
       x = "Category",
       y = "Order Amount") +
  theme_minimal()

The Quartile Statistics

# Calculate min, Q1, average, median, Q3, and max for each category
order_t_summary <- order_t %>%
  group_by(Category) %>%
  summarise(Min = min(Order_Amount),
            Q1 = quantile(Order_Amount, 0.25),
            Average_Amount = mean(Order_Amount),
            Median = median(Order_Amount),
            Q3 = quantile(Order_Amount, 0.75),
            Max = max(Order_Amount))

# Display the summary
order_t_summary %>%
  kable("html") %>% 
  kable_styling(
    bootstrap_options = c("striped", "hover"),
    position = "center",
    font_size = 12,
    latex_options = c("scale_down")) %>%
  row_spec(0, bold = TRUE, color = "white", background = "#2A3F54")
Category Min Q1 Average_Amount Median Q3 Max
Ordinary 6 377.0 592.8910 603 837.0 1198
Pro 3 404.5 607.5587 633 814.5 1193
# Difference in average order amount between the two categories
difference_in_mean <- abs(diff(order_t_summary$Average_Amount))

From the above table, we can calculate the difference in average order amount between the two categories, which is 14.6676935 dollars.

7.1.1 Welch’s t-test

We now want to test whether there is a significant difference between the average order amounts of Ordinary and Pro restaurants through Welch’s t-test.

  • Null Hypothesis (\(H_0\)): There is no significant difference between the average total bill amount of Ordinary restaurants and Pro restaurants.
  • Alternative Hypothesis (\(H_1\)): There is a significant difference between the average total bill amount of Ordinary restaurants and Pro restaurants.
# Welch's t-test for differences in Order Amounts across Pro and Ordinary restaurants
t_test_result <- t.test(mu = 0, conf.level=0.99, Order_Amount ~ Category, data = order_t)
print(t_test_result)
## 
##  Welch Two Sample t-test
## 
## data:  Order_Amount by Category
## t = -0.53894, df = 387.3, p-value = 0.5902
## alternative hypothesis: true difference in means between group Ordinary and group Pro is not equal to 0
## 99 percent confidence interval:
##  -85.11787  55.78249
## sample estimates:
## mean in group Ordinary      mean in group Pro 
##               592.8910               607.5587

Based on what we received from a Welch’s t-test, it is plausible for the total bill amount to be equal for the Pro and Ordinary rank restaurants because:

  • The p-value (0.5902367) is larger than the significant level of 0.01.
  • The t-value (-0.5389417) has a negative sign which indicates that the average total bill amount for Ordinary restaurants is slightly lower than that for Pro restaurants.
  • The 99% confidence interval for the difference in means is given as (-85.1178739, 55.7824869). This interval provides a range of plausible values for the true difference in means. Since it includes zero (0), it suggests that we cannot reject the null hypothesis of no difference.

7.1.2 Further analysis

So far, the testing hasn’t given us any insights. let’s take the number of orders of each restaurant class into account.

# Further analysis: The sample size of each Category
occur <- order_t %>%
  group_by(Category) %>% 
  count(Category)

# Display
occur %>%
  kable("html") %>% 
  kable_styling(
    bootstrap_options = c("striped", "hover"),
    position = "center",
    font_size = 12,
    latex_options = c("scale_down")) %>%
  row_spec(0, bold = TRUE, color = "white", background = "#2A3F54")
Category n
Ordinary 321
Pro 179

We can see that Ordinary restaurants receive almost 2 times as many orders as Pro restaurants receive in a day. A possible explanation for this is that people prefer to eat in person at Pro restaurants to experience more professional and quality customer service. Note that our restaurateur does not have enough capital to operate such a high-end restaurant. Thus we can conclude that the entrepreneur should open an Ordinary restaurant to reach more potential customers through a delivery app.

7.2 Delivery Time

How about the delivery time of the two restaurant classes?

# Narrow down the data set to work with
deli_t <- data %>%
  select(Category, Delivery_Time)

# Boxplot
ggplot(deli_t, aes(x = Category, y = Delivery_Time, fill= Category)) +
  geom_boxplot() +
  labs(title = "Boxplot of Delivery Time by Category",
       x = "Category",
       y = "Delivery Time") +
  theme_minimal()

The Quartile Statistics

# Calculate min, Q1, average, median, Q3, and max for each category
deli_t_summary <- deli_t %>%
  group_by(Category) %>%
  summarise(Min = min(Delivery_Time),
            Q1 = quantile(Delivery_Time, 0.25),
            Average_Deli = mean(Delivery_Time),
            Median = median(Delivery_Time),
            Q3 = quantile(Delivery_Time, 0.75),
            Max = max(Delivery_Time))

# Display the summary
deli_t_summary %>%
  kable("html") %>% 
  kable_styling(
    bootstrap_options = c("striped", "hover"),
    position = "center",
    font_size = 12,
    latex_options = c("scale_down")) %>%
  row_spec(0, bold = TRUE, color = "white", background = "#2A3F54")
Category Min Q1 Average_Deli Median Q3 Max
Ordinary 10 21.0 30.82866 30 41 50
Pro 10 20.5 30.02793 29 40 50
# Difference in average order amount between the two categories
difference_in_deli <- abs(diff(deli_t_summary$Average_Deli))

From the above table, we know that the difference in average delivery time between the two ranks is 0.8007275 minutes.

7.2.1 Welch’s T Test

Is this number significantly different? Or does it affect our decision? Let again use the Welch’s t-test to find out.

  • Null Hypothesis (\(H_0\)): There is no significant difference between the average delivery time of Ordinary restaurants and Pro restaurants.
  • Alternative Hypothesis (\(H_1\)): There is a significant difference between the average delivery time of Ordinary restaurants and Pro restaurants.
# Conduct a Welch's t-test for differences in Delivery Times across Ordinary and Pro restaurants
t_test_result <- t.test(mu= 0, conf.level=0.99, Delivery_Time ~ Category, data = deli_t)

# Print the t-test result
print(t_test_result)
## 
##  Welch Two Sample t-test
## 
## data:  Delivery_Time by Category
## t = 0.72263, df = 369.13, p-value = 0.4704
## alternative hypothesis: true difference in means between group Ordinary and group Pro is not equal to 0
## 99 percent confidence interval:
##  -2.068323  3.669778
## sample estimates:
## mean in group Ordinary      mean in group Pro 
##               30.82866               30.02793

Based on what we received from a Welch’s t-test, we do not have sufficient evidence to reject the null hypothesis because:

  • t-value = 0.7226275
  • p-value = 0.4703664 is higher than any common significance level
  • The 99% confidence interval for the difference in means is given as (-2.0683227, 3.6697776). This interval provides a range of plausible values for the true difference in means. Since it includes zero (0), it suggests that we cannot reject the null hypothesis of no difference.

Conclusion: There is no significant difference in delivery time between Pro and Ordinary restaurants.

7.3 Conclusion

When considering the rank of the restaurant in terms of bill amount and delivery time, the restaurateur can start in any restaurant class since there is no significant difference between them. However, an Ordinary restaurant is the most suitable choice as a restaurant that takes orders through a delivery app.

8 Relation between Order Amount and Delivery Time

Ensuring productivity and service quality is essential to developing a restaurant. To accomplish this goal, the restaurateur must understand how operational factors affect each other. In the following case, we want to see whether the delivery time and the order amount have any relation.

8.1 Objective

The main purpose is to see how the total order amount impacts the delivery time by implementing an analysis in RStudio. This consists of drawing a scatter plot and calculating the Pearson correlation coefficient to measure the strength of the association between these factors.

8.2 Method

8.2.1 Scatter plot

We use a scatter plot to visualize the relationship of the total order amount and the delivery time.

# Scatter plot
ggplot(data,
       mapping = aes(x = Delivery_Time,
                     y = Order_Amount,
                     color = Delivery_Time)) +
  geom_point() +
  labs(x = "Delivery Time Taken (minutes)",
       y = "Order Amount (dollars)",
       color = "Delivery Time (minutes)")

We can see that the correlation coefficient between these two variables is small and approximately 0, according to the plot.

8.2.2 The Pearson correlation coefficient

Nevertheless, we need to test whether the above assumption is valid.

res <- cor.test(data$Delivery_Time, data$Order_Amount, method = "pearson")
res
## 
##  Pearson's product-moment correlation
## 
## data:  data$Delivery_Time and data$Order_Amount
## t = -0.04973, df = 498, p-value = 0.9604
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.08990147  0.08547884
## sample estimates:
##          cor 
## -0.002228449

Based on the result, the correlation (-0.0022284) is negative and approximately equal to 0. We can conclude that there is little or no linear relationship between the two variables being considered. This could mean that the variables are unrelated or that any existing relationship is not linear.

8.3 Conclusion

The delivery time and order amount are not substantially influenced or have very little influence on each other. In other words, the restaurateur does not need to worry about the impact of the order amount on their delivery time.

9 Conclusion

In conclusion, our comprehensive analysis of the data set encompassing 500 orders on the FoodX delivery app provides valuable insights for the aspiring restaurateur. The decision to utilize FoodX as the preferred delivery service for the restaurant is supported by a high customer satisfaction rate of nearly 70%. This endorsement not only ensures the reliability of the delivery service but also signifies a positive customer experience, a crucial factor for a successful food business.

In terms of selecting the restaurant’s location, our analysis suggests that Zones A and C emerge as the most favorable areas, considering their optimal delivery times. This information aids in strategic decision-making regarding the establishment of the restaurant, aligning with the goal of providing timely and efficient food delivery services to customers.

Furthermore, the concern about the impact of location on customer satisfaction with food and delivery services is alleviated by our findings. It appears that customers do not significantly associate the restaurant’s location with their satisfaction levels, allowing the restaurateur greater flexibility in choosing the establishment site.

For the selection of cuisine, our analysis recommends Continental cuisine as a safe and popular option due to its familiarity with local tastes. Alternatively, French cuisine presents a promising choice with a low displeasing level of reception, offering an opportunity to diversify without sacrificing customer satisfaction. However, caution is advised against North and South Indian cuisines, as our data suggests they may not resonate as well with the local customer base.

In determining the restaurant class, an Ordinary-class establishment is identified as the most suitable choice for receiving orders through a delivery app. This aligns with the preferences and expectations of FoodX customers, ensuring a seamless integration with the delivery platform.

Finally, the restaurateur can take comfort in the fact that the order amount does not significantly impact delivery times. This insight allows for a more streamlined and efficient operational strategy, prioritizing customer satisfaction without compromising on order volume.

Armed with these informed decisions, the aspiring restaurateur can embark on the journey of opening a successful restaurant, confident in the choices made based on our meticulous data analysis.