Project Title : Factors Influencing Pricing of Pizzas

NAME: M VIKRANT NARAYAN

EMAIL: vikrant.m.narayan@gmail.com

COLLEGE / COMPANY: Amrita Vishwa VIdyapeetham

1.Introduction

Pizzas are a delicacy that is loved all around the world. The pizza category has been playing a huge role in the food industry for quite some time now. People take their pizzas seriously and it is crucial to find out factors influencing the pricing of pizzas.This paper addresses the following factors influencing the “price of pizza” with respect to the hotel industry in the US. In this paper, we investigate whether the pricing of pizzas vary according to cities and type of outlets.

2. Overview of the Study

Our field study concerns pizza prices in outlets across the US. There are numerous types of pizza and various types of outlets across the country. In this study, we analyse the effect of the pizza type, the type of the outlet and the geography of the outlet on the pricing of pizzas. Our study indicates that there is in fact a significant change in the pricing of pizzas. Our regression analysis reveal that the pricing of pizzas is significantly different across different cities.

3. An empirical field study of pizza prices across US

3.1 Overview

The specific objective of this Study was to investigate the pricing strategy employed by food outlets across the US. This study analyzed pozza prices in numerous cites. Our goal was to compare prices of different pizza types in different cities. The rationale behind this is summarized next.

Pizza is a very popular dish that is loved across the world. There are numerous types of pizza available across numerous cities. This setting provides us an excellent platform for measuring the “price of pizzas”. We empirically study how the mentioned factors influences the pizza prices.

3.2 Data

For this study, we collected data from the Kaggle website (https://www.kaggle.com/saisowhit/fork-of-pizza-categories-based-on-city/data). We expected that a comparison of pizza prices of different types of dishes across the country, would explain the pricing strategy that was employed. We focused on seven cities (Philadelphia, New york, Chicago, East Granby, Charleston, Los Angeles and Houston), the most common and popular cities in the dataset.We also limied the analysis to the most common types of dishes in the dataset. It is worth mentioning that the dataset also had other data of numerous cities and dish types, which we ignored in order to restrict the scope of our data collection.

3.3 Model

In order to test Hypothesis , we proposed the following model:

\[Price= \alpha_0 + \alpha_1 City + \alpha_2 Cheese + \alpha_3 Chicken +\alpha_4 Margherita+ alpha_5 White + alpha_6 Hawaiian + alpha_7 Burger + alpha_7 Fries + alpha_8 Steak +\epsilon\] We regressed Price on cities,types and an interaction between types and city. We estimated model, using linear least squares. If there was a “price of pizza” in the market, we expected to find the coefficient of pizza pricing.

3.4 Results

We found empirical support for the hypotheses mentioned at the end of the report. The regression analysis using Ordinary Least Squares yielded \(\alpha_1>0\), with \(p<0.05\)

Size of the Dataset

## [1] 3510
## [1] 21

Most common cities in the dataset

## The following objects are masked _by_ .GlobalEnv:
## 
##     Day, Month, Year
## The following objects are masked from pizza.df:
## 
##     categories, city, country, menus.amountMax, menus.amountMin,
##     menus.currency, menus.dateSeen, menus.description, menus.name,
##     name, priceRangeCurrency, priceRangeMax, priceRangeMin,
##     province
## city
## Philadelphia     New York   Charleston  Los Angeles  East Granby 
##           91           88           73           60           55

Most common provinces in the dataset

## province
##  CA  NJ  FL  PA  IL 
## 256 187 168 166 150

Number of missing values

##         categories               city            country 
##                  0                  0                  0 
##    menus.amountMax    menus.amountMin     menus.currency 
##                562                562                  0 
##     menus.dateSeen  menus.description         menus.name 
##                  0                  0                  0 
##               name priceRangeCurrency      priceRangeMin 
##                  0                  0               1953 
##      priceRangeMax           province 
##               1953                  0

Dividing the Dataset by most common cities in the dataset

Replacing NA with column mean

Summary

Philadelphia

##                                                                                                                                                                                               categories
##  Pizza Place Juniata Park - Feltonville,Pizza Place                                                                                                                                                :26  
##  Pizza Place                                                                                                                                                                                       :18  
##  Deli / Bodega,Mediterranean Restaurants,American Restaurants,Deli / Bodega South Philadelphia,Caterers,Restaurants,Sandwich Shops,Bagels,Italian Restaurants,Delicatessens,Health Food Restaurants:10  
##  Pizza Place,Pizza Restaurants                                                                                                                                                                     :10  
##  Pizza Place,Take Out Restaurants,Restaurants,Pizza,Pizza Place Fairmount - Art Museum                                                                                                             : 8  
##  Locksmiths                                                                                                                                                                                        : 7  
##  (Other)                                                                                                                                                                                           :12  
##            city    country menus.amountMax menus.amountMin 
##  Philadelphia:91   US:91   Min.   : 1.00   Min.   : 1.000  
##  Abington    : 0           1st Qu.: 4.25   1st Qu.: 4.250  
##  Addison     : 0           Median : 7.18   Median : 6.950  
##  Akron       : 0           Mean   : 7.18   Mean   : 6.559  
##  Alachua     : 0           3rd Qu.: 9.25   3rd Qu.: 8.950  
##  Alameda     : 0           Max.   :14.95   Max.   :14.950  
##  (Other)     : 0                                           
##  menus.currency                                       menus.dateSeen
##  Length:91          2016-05-24T02:12:15Z,2016-03-24T10:05:50Z:26    
##  Class :character   2016-03-27T05:31:29Z,2016-07-01T15:03:04Z:18    
##  Mode  :character   2016-03-24T10:03:39Z                     :10    
##                     2016-03-24T10:13:25Z,2017-03-07T09:53:50Z:10    
##                     2016-03-24T09:37:16Z,2016-03-27T18:59:21Z: 8    
##                     2015-07-21T20:33:49Z                     : 7    
##                     (Other)                                  :12    
##                                                                                                                                             menus.description
##                                                                                                                                                      :61     
##  Includes fresh sauce and mozzarella cheese.                                                                                                         : 2     
##  (Toppings extra) please mention special when ordering special not to be combined with any other offer one special per order                         : 1     
##  8 oz. topped quality sirloin steak or chicken with salt and pepper on toasted Italian bread.                                                        : 1     
##  8 oz. topped quality sirloin steak or chicken with salt and pepper on toasted Italian bread. Served with french fries and coleslaw and little salad.: 1     
##  An oven blend of pineapple, ham and bacon with cheese and sauce                                                                                     : 1     
##  (Other)                                                                                                                                             :24     
##                  menus.name                            name   
##  Pizza Steak          : 8   Takka Grill                  :26  
##  Pizza Fries          : 7   Valentino Pizza I            :18  
##  Pizza Burger         : 6   Lebel Pizza                  :10  
##  Buffalo Chicken Pizza: 4   Mi Pal's Deli                :10  
##  Chicken Pizza Steak  : 3   Sabatino's Pizza             : 8  
##  Chicken Special Pizza: 2   24 Hour Express Locksmith Inc: 7  
##  (Other)              :61   (Other)                      :12  
##  priceRangeCurrency priceRangeMin    priceRangeMax             province 
##  Length:91          Min.   : 0.000   Min.   :25.00   PA            :87  
##  Class :character   1st Qu.: 4.412   1st Qu.:28.53   Phila         : 3  
##  Mode  :character   Median : 4.412   Median :28.53   Wm Penn Anx W : 1  
##                     Mean   : 4.412   Mean   :28.53   AK            : 0  
##                     3rd Qu.: 4.412   3rd Qu.:28.53   AL            : 0  
##                     Max.   :25.000   Max.   :40.00   Alt De Berwind: 0  
##                                                      (Other)       : 0  
##  Year        Month         Day    
##  15: 8   03     :50   24     :55  
##  16:80   05     :27   27     :18  
##  17: 3   07     : 7   21     : 8  
##          02     : 3   25     : 4  
##          08     : 2   12     : 3  
##          04     : 1   01     : 1  
##          (Other): 1   (Other): 2

Los Angeles

##                                                                              categories
##  Caterers,Restaurants,Italian Restaurants,Pizza,Pizza Place and Italian Restaurant:34  
##  Latin American Restaurant,Bar,Pizza Place,Restaurants                            : 6  
##  Pizza Place                                                                      : 6  
##  American Restaurant,Bar,Bakery                                                   : 5  
##  Restaurant                                                                       : 5  
##  Italian Restaurant,Cocktail Bar,Bar                                              : 2  
##  (Other)                                                                          : 2  
##           city    country menus.amountMax menus.amountMin
##  Los Angeles:60   US:60   Min.   : 5.99   Min.   : 5.99  
##  Abington   : 0           1st Qu.:14.50   1st Qu.:13.00  
##  Addison    : 0           Median :17.28   Median :14.40  
##  Akron      : 0           Mean   :17.28   Mean   :14.40  
##  Alachua    : 0           3rd Qu.:20.99   3rd Qu.:16.50  
##  Alameda    : 0           Max.   :26.99   Max.   :22.00  
##  (Other)    : 0                                          
##  menus.currency                                       menus.dateSeen
##  Length:60          2016-06-08T16:09:56Z                     :34    
##  Class :character   2015-10-23T03:34:35Z,2016-03-24T10:16:18Z: 6    
##  Mode  :character   2016-06-14T02:33:07Z                     : 6    
##                     2015-10-23T03:57:26Z                     : 5    
##                     2016-08-03T21:10:38Z                     : 4    
##                     2016-06-08T16:29:55Z                     : 1    
##                     (Other)                                  : 4    
##                                                                                   menus.description
##                                                                                            :39     
##  Any slice from above pizzas, fountain drink and choice of side salad or cup of soup       : 1     
##  Blend of grilled vegetables, oregano, Roma tomato, zucchini, pepper, asparagus, and onions: 1     
##  Cajun shrimp with tomato sauce, parmesan cheese and fresh oregano                         : 1     
##  Canadian bacon, pineapple.                                                                : 1     
##  Caramelized onion, pancetta, and swiss cheese baked with 2 eggs on top.                   : 1     
##  (Other)                                                                                   :16     
##                                            menus.name
##  Bbq Pork Pizza                                 : 2  
##  Four Season of Pizza                           : 2  
##  Italiano Four Seasons Pizza (quanttro Stagioni): 2  
##  Philly White Chicken Pizza                     : 2  
##  Positano Chicken Pizza                         : 2  
##  Primo Alfredo White Pizza                      : 2  
##  (Other)                                        :48  
##                     name    priceRangeCurrency priceRangeMin
##  North End Pizzeria   :34   Length:60          Min.   : 0   
##  Bamboo Restaurant    : 6   Class :character   1st Qu.:25   
##  Bravo Pizza Hollywood: 6   Mode  :character   Median :25   
##  Culina               : 5                      Mean   :25   
##  The Brentwood        : 5                      3rd Qu.:25   
##  Toscana              : 2                      Max.   :50   
##  (Other)              : 2                                   
##  priceRangeMax           province  Year        Month         Day    
##  Min.   :30.00   Wla         :34   15:11   06     :41   08     :35  
##  1st Qu.:41.47   Brentwood   : 7   16:48   10     :11   23     :11  
##  Median :41.47   Bicentennial: 6   17: 1   08     : 6   03     : 6  
##  Mean   :41.47   CA          : 6           03     : 1   14     : 6  
##  3rd Qu.:41.47   Los Feliz   : 6           07     : 1   16     : 1  
##  Max.   :55.00   Arco-plaza  : 1           01     : 0   29     : 1  
##                  (Other)     : 0           (Other): 0   (Other): 0

Houston

##                                                                           categories
##  Restaurant                                                                    :11  
##  Deli / Bodega Fairbanks - Northwest Crossing,Delicatessens                    : 4  
##  Pizza Place and Italian Restaurant Meyerland Area,Restaurants                 : 2  
##  Restaurant Management & Consultants,Caribbean Restaurant,Caribbean Restaurants: 2  
##  Bar,Beer Garden,Sports Bar,Sports Bar, Bar, and Beer Garden                   : 1  
##  Bar,Cocktail Bar,Bar and Cocktail Bar Washington Avenue - Memorial Park       : 1  
##  (Other)                                                                       : 2  
##        city    country menus.amountMax menus.amountMin menus.currency    
##  Houston :23   US:23   Min.   : 6.29   Min.   : 6.29   Length:23         
##  Abington: 0           1st Qu.:10.75   1st Qu.:10.49   Class :character  
##  Addison : 0           Median :13.00   Median :12.50   Mode  :character  
##  Akron   : 0           Mean   :13.11   Mean   :12.75                     
##  Alachua : 0           3rd Qu.:14.99   3rd Qu.:14.45                     
##  Alameda : 0           Max.   :19.00   Max.   :19.00                     
##  (Other) : 0                                                             
##                                    menus.dateSeen
##  2016-04-24T00:00:00Z                     :7     
##  2016-07-26T00:00:00Z                     :5     
##  2016-06-10T22:54:59Z                     :4     
##  2016-04-20T11:35:04Z                     :2     
##  2016-06-08T16:11:12Z                     :2     
##  2016-03-22T04:10:34Z,2016-05-24T01:54:14Z:1     
##  (Other)                                  :2     
##                                                                                                                               menus.description
##                                                                                                                                        :16     
##  Banana pepper, pepperoni, onion, tomato, feta cheese                                                                                  : 1     
##  Braised short rib, thin red onions, fresh baby arugula, BBQ aioli, smoked gouda                                                       : 1     
##  Caramelized onions, oyster mushrooms, portabella mushrooms, brie cheese, mozzarella cheese                                            : 1     
##  Choose any of your own toppings to make it your own                                                                                   : 1     
##  Our beef cheesesteak grilled with onions and spicy pepperoni, layered with plenty of melting mozzarella. topped with homemade marinara: 1     
##  (Other)                                                                                                                               : 2     
##                     menus.name                              name   
##  Breakfast Pizza         : 2   The Union Kitchen (memorial Dr):11  
##  Bbq Chicken Pizza       : 1   Citiline Deli 7                : 4  
##  Calabash Island Pizza   : 1   Calabash Island Eats           : 2  
##  Calabash Pizza          : 1   La Fresca Pizza                : 2  
##  Chicken Alfredo Pizza   : 1   Brixx                          : 1  
##  Chicken Florentine Pizza: 1   Lucky's Pub                    : 1  
##  (Other)                 :16   (Other)                        : 2  
##  priceRangeCurrency priceRangeMin    priceRangeMax  
##  Length:23          Min.   : 0.000   Min.   :25.00  
##  Class :character   1st Qu.: 0.000   1st Qu.:25.00  
##  Mode  :character   Median : 0.000   Median :30.00  
##                     Mean   : 2.174   Mean   :29.35  
##                     3rd Qu.: 0.000   3rd Qu.:30.00  
##                     Max.   :25.000   Max.   :40.00  
##                                                     
##                 province  Year        Month        Day   
##  Bunker Hill Village:11   15: 0   04     :9   24     :7  
##  TX                 : 8   16:23   06     :7   10     :5  
##  Bammel             : 4   17: 0   07     :6   26     :5  
##  AK                 : 0           03     :1   08     :2  
##  AL                 : 0           01     :0   20     :2  
##  Alt De Berwind     : 0           02     :0   18     :1  
##  (Other)            : 0           (Other):0   (Other):1

East Granby

##                                                                              categories
##  American Restaurant,Italian Restaurant,American Restaurant and Italian Restaurant:55  
##  Adult Entertainers,American Restaurant,Bar,Strip Club                            : 0  
##  American Italian                                                                 : 0  
##  American Restaurant                                                              : 0  
##  American Restaurant and Asian Restaurant                                         : 0  
##  American Restaurant and Bar,American Restaurant,Bar                              : 0  
##  (Other)                                                                          : 0  
##           city    country menus.amountMax menus.amountMin
##  East Granby:55   US:55   Min.   : 9.00   Min.   : 8.70  
##  Abington   : 0           1st Qu.:12.22   1st Qu.:11.45  
##  Addison    : 0           Median :17.75   Median :12.50  
##  Akron      : 0           Mean   :16.96   Mean   :15.02  
##  Alachua    : 0           3rd Qu.:19.85   3rd Qu.:17.75  
##  Alameda    : 0           Max.   :20.50   Max.   :20.50  
##  (Other)    : 0                                          
##  menus.currency                  menus.dateSeen
##  Length:55          2016-03-21T00:12:51Z:55    
##  Class :character   2015-07-21T20:33:49Z: 0    
##  Mode  :character   2015-09-28T05:16:13Z: 0    
##                     2015-09-28T23:27:58Z: 0    
##                     2015-10-19T16:02:51Z: 0    
##                     2015-10-19T23:22:23Z: 0    
##                     (Other)             : 0    
##                                                                            menus.description
##                                                                                     : 6     
##  Canadian bacon, pineapple and mozzarella cheese.                                   : 4     
##  Chili chips, tomato, lettuce, jalapeno peppers, black olives and mozzarella cheese.: 4     
##  Fresh boneless chicken in buffalo sauce with scallions and fresh tomatoes.         : 4     
##  Fresh chicken morsels and roasted peppers.                                         : 4     
##  Fresh tomato, spinach, eggplant, feta cheese, olives, fresh garlic and olive oil.  : 4     
##  (Other)                                                                            :29     
##                          menus.name                             name   
##  Bbq Chicken Pizza            : 1   J & G Restaurant              :55  
##  Bbq Chicken Pizza (large)    : 1   'l Bistro                     : 0  
##  Bbq Chicken Pizza (medium)   : 1   24 Hour Express Locksmith Inc : 0  
##  Bbq Chicken Pizza (small)    : 1   7 Day 24 Hours Emergency Locks: 0  
##  Buffalo Chicken Pizza        : 1   Abo's Pizza                   : 0  
##  Buffalo Chicken Pizza (large): 1   Abyssinia Chinese             : 0  
##  (Other)                      :49   (Other)                       : 0  
##  priceRangeCurrency priceRangeMin priceRangeMax           province 
##  Length:55          Min.   :25    Min.   :40    CT            :55  
##  Class :character   1st Qu.:25    1st Qu.:40    AK            : 0  
##  Mode  :character   Median :25    Median :40    AL            : 0  
##                     Mean   :25    Mean   :40    Alt De Berwind: 0  
##                     3rd Qu.:25    3rd Qu.:40    AR            : 0  
##                     Max.   :25    Max.   :40    Arco-plaza    : 0  
##                                                 (Other)       : 0  
##  Year        Month         Day    
##  15: 0   03     :55   21     :55  
##  16:55   01     : 0   01     : 0  
##  17: 0   02     : 0   02     : 0  
##          04     : 0   03     : 0  
##          05     : 0   04     : 0  
##          06     : 0   05     : 0  
##          (Other): 0   (Other): 0

Charleston

##                                                                                             categories
##  Pizza Place,Pizza                                                                               :64  
##  bar drinks,cakes desserts,food catering,service staff,Restaurant,Brewery,New American Restaurant: 6  
##  Pizza,Take Out Restaurants,Restaurants                                                          : 3  
##  Adult Entertainers,American Restaurant,Bar,Strip Club                                           : 0  
##  American Italian                                                                                : 0  
##  American Restaurant                                                                             : 0  
##  (Other)                                                                                         : 0  
##          city    country menus.amountMax menus.amountMin
##  Charleston:73   US:73   Min.   : 5.99   Min.   : 5.99  
##  Abington  : 0           1st Qu.:10.99   1st Qu.:10.99  
##  Addison   : 0           Median :11.58   Median :11.58  
##  Akron     : 0           Mean   :11.58   Mean   :11.58  
##  Alachua   : 0           3rd Qu.:11.58   3rd Qu.:11.58  
##  Alameda   : 0           Max.   :21.49   Max.   :21.49  
##  (Other)   : 0                                          
##  menus.currency                  menus.dateSeen
##  Length:73          2016-05-09T18:09:50Z:32    
##  Class :character   2016-12-31T18:03:52Z:32    
##  Mode  :character   2015-11-06T10:22:52Z: 3    
##                     2016-10-18T05:35:05Z: 3    
##                     2016-08-21T00:00:00Z: 2    
##                     2016-04-24T00:00:00Z: 1    
##                     (Other)             : 0    
##                                                                                       menus.description
##                                                                                                :18     
##  Alfredo sauce, grilled chicken, broccoli, garlic, mozzarella cheese topped with alfredo sauce.: 4     
##  Alfredo sauce, ricotta, mozzarella and oregano topped with alfredo sauce.                     : 4     
##  Artichoke hearts, black olives, garlic and mozzarella cheese.                                 : 4     
##  Green peppers, onions, eggplant, broccoli, mushrooms, black olives, red peppers and tomatoes. : 4     
##  Onions, b.b.q. chicken, mozzarella cheese, topped with bacon and b.b.q. sauce.                : 4     
##  (Other)                                                                                       :35     
##                                  menus.name
##  B.b.q. Madness Stuffed Pizza         : 2  
##  B.b.q. Madness Thin Crust Pizza      : 2  
##  Bacon Cheeseburger Stuffed Pizza     : 2  
##  Bacon Cheeseburger Thin Crust Pizza  : 2  
##  Bellablanca Gourmet Pizza (reg Crust): 2  
##  Bellablanca Gourmet Stuffed Pizza    : 2  
##  (Other)                              :61  
##                              name    priceRangeCurrency priceRangeMin
##  Sicilia's Pizzeria            :64   Length:73          Min.   :25   
##  Southend Brewery & Smokehouse : 6   Class :character   1st Qu.:25   
##  Papa John's Pizza             : 3   Mode  :character   Median :25   
##  'l Bistro                     : 0                      Mean   :25   
##  24 Hour Express Locksmith Inc : 0                      3rd Qu.:25   
##  7 Day 24 Hours Emergency Locks: 0                      Max.   :25   
##  (Other)                       : 0                                   
##  priceRangeMax           province  Year        Month         Day    
##  Min.   :40    WV            :64   15: 3   05     :32   09     :32  
##  1st Qu.:40    SC            : 6   16:70   12     :32   31     :32  
##  Median :40    Saint Andrews : 3   17: 0   10     : 3   06     : 3  
##  Mean   :40    AK            : 0           11     : 3   18     : 3  
##  3rd Qu.:40    AL            : 0           08     : 2   21     : 2  
##  Max.   :40    Alt De Berwind: 0           04     : 1   24     : 1  
##                (Other)       : 0           (Other): 0   (Other): 0

Chicago

##                                                                             categories
##  Italian Restaurant,Restaurant,Italian Restaurant Streeterville                  :4   
##  Restaurant                                                                      :4   
##  American Restaurant,Restaurant,Bowling Alley,Bowling Alleys,Sports Bar          :2   
##  Pizza Place,Italian Restaurants,Pizza,Caterers,Hamburgers & Hot Dogs,Restaurants:2   
##  Seafood Restaurant                                                              :1   
##  wich Place                                                                      :1   
##  (Other)                                                                         :0   
##        city    country menus.amountMax  menus.amountMin 
##  Chicago :14   US:14   Min.   : 1.750   Min.   : 1.750  
##  Abington: 0           1st Qu.: 8.126   1st Qu.: 8.126  
##  Addison : 0           Median :10.496   Median :10.496  
##  Akron   : 0           Mean   :10.003   Mean   :10.003  
##  Alachua : 0           3rd Qu.:12.000   3rd Qu.:12.000  
##  Alameda : 0           Max.   :14.750   Max.   :14.750  
##  (Other) : 0                                            
##  menus.currency                                       menus.dateSeen
##  Length:14          2016-04-24T00:00:00Z                     :6     
##  Class :character   2016-08-17T16:57:32Z                     :2     
##  Mode  :character   2016-08-20T00:00:00Z                     :2     
##                     2015-11-02T15:30:17Z                     :1     
##                     2016-01-12T23:21:20Z                     :1     
##                     2016-01-12T23:21:20Z,2016-01-27T13:33:07Z:1     
##                     (Other)                                  :1     
##                                                                     menus.description
##                                                                              :9      
##  arugula, pecorino, balsamic drizzle                                         :1      
##  Choose Cheese or Pepperoni                                                  :1      
##  Pepperoni, marinara sauce, provolone cheese, mushrooms and italian seasoning:1      
##  roasted piquillo peppers, french feta cheese                                :1      
##  truffle butter, wild mushrooms                                              :1      
##  (Other)                                                                     :0      
##                            menus.name                           name  
##  Pizza Margherita               :2    Francesca's On Chestnut     :4  
##  Pizza Schiacchiata Alla Toscana:2    The Boarding House          :4  
##  Cheese Pizza                   :1    Angie's Restaurant Pizzeria :2  
##  Cheese Stuffed Pizza           :1    Kings Chicago - Lincoln Park:2  
##  Chicago Pizza                  :1    Potbelly Sandwich Shop      :1  
##  Kids Pizza                     :1    The Shrimp Shack            :1  
##  (Other)                        :6    (Other)                     :0  
##  priceRangeCurrency priceRangeMin   priceRangeMax             province
##  Length:14          Min.   : 0.00   Min.   :25.00   IL            :6  
##  Class :character   1st Qu.:24.93   1st Qu.:40.00   Ontario Street:4  
##  Mode  :character   Median :25.00   Median :41.14   Forest View   :2  
##                     Mean   :24.91   Mean   :42.27   Fort Dearborn :2  
##                     3rd Qu.:29.50   3rd Qu.:48.07   AK            :0  
##                     Max.   :31.00   Max.   :50.00   AL            :0  
##                                                     (Other)       :0  
##  Year        Month        Day   
##  15: 1   04     :6   24     :6  
##  16:13   08     :4   12     :2  
##  17: 0   01     :2   17     :2  
##          07     :1   20     :2  
##          11     :1   02     :1  
##          02     :0   11     :1  
##          (Other):0   (Other):0

New york

##                                              categories       city   
##  Restaurant                                       :28   New York:88  
##  Restaurant,Italian Restaurant                    :11   Abington: 0  
##  Burger Joint and Cupcake Shop                    : 9   Addison : 0  
##  Pizza Place                                      : 5   Akron   : 0  
##  American Restaurant,American Restaurant Rose Hill: 4   Alachua : 0  
##  Italian Restaurant                               : 4   Alameda : 0  
##  (Other)                                          :27   (Other) : 0  
##  country menus.amountMax  menus.amountMin  menus.currency    
##  US:88   Min.   :  1.00   Min.   :  1.00   Length:88         
##          1st Qu.: 12.95   1st Qu.: 10.95   Class :character  
##          Median : 15.46   Median : 14.00   Mode  :character  
##          Mean   : 15.46   Mean   : 14.47                     
##          3rd Qu.: 16.00   3rd Qu.: 15.95                     
##          Max.   :118.99   Max.   :118.99                     
##                                                              
##               menus.dateSeen
##  2016-08-22T00:00:00Z:15    
##  2016-06-06T16:14:03Z:11    
##  2016-08-21T00:00:00Z:11    
##  2015-11-26T19:06:01Z: 9    
##  2016-06-16T23:12:24Z: 5    
##  2015-11-02T16:45:38Z: 4    
##  (Other)             :33    
##                                                menus.description
##                                                         :54     
##  Mozzarella, fontina, sauteed spinach, two eggs         : 2     
##  Mozzarella, Prosciutto di Parma, tomato one egg        : 2     
##  Tomato, Cheese                                         : 2     
##  Acorn, delicata, mozzarella, goat cheese, truffle honey: 1     
##  Artichokes, fresh tomatoes and parmesan cheese.        : 1     
##  (Other)                                                :26     
##             menus.name                           name   
##  Margherita Pizza: 7   Gran Morsi                  :11  
##  Pepperoni Pizza : 3   Lil' Frankie's              :11  
##  Brunch Pizza    : 2   Burgers & Cupcakes          : 9  
##  Cheese Pizza    : 2   Bodrum Turkish Mediterranean: 7  
##  Marinara Pizza  : 2   Little Italy Pizza Deli     : 5  
##  Pizza           : 2   Tavola                      : 5  
##  (Other)         :70   (Other)                     :40  
##  priceRangeCurrency priceRangeMin    priceRangeMax              province 
##  Length:88          Min.   :  0.00   Min.   : 25.00   Nyc           :42  
##  Class :character   1st Qu.:  0.00   1st Qu.: 30.00   Manhattan     :35  
##  Mode  :character   Median : 25.00   Median : 40.00   Manhattanville: 4  
##                     Mean   : 24.52   Mean   : 47.89   G P O         : 3  
##                     3rd Qu.: 31.00   3rd Qu.: 50.00   NY            : 2  
##                     Max.   :347.00   Max.   :666.00   New York City : 1  
##                                                       (Other)       : 1  
##  Year        Month         Day    
##  15:16   08     :30   22     :16  
##  16:64   06     :22   21     :13  
##  17: 8   11     :14   06     :12  
##          10     : 7   26     : 9  
##          04     : 4   16     : 5  
##          05     : 4   20     : 5  
##          (Other): 7   (Other):28

New Dataset with the above cities

pizzacity <- rbind(p,la,ho,EG,ch,chig,ny)

Distribution of Data over Day, Month and Year

categories

Average maximum pricing of dishes by their types

Cheese

mean(pizzacity$menus.amountMax[pizzacity$Cheese=="1"])
## [1] 11.13449

Chicken

mean(pizzacity$menus.amountMax[pizzacity$Chicken=="1"])
## [1] 13.40135

Margherita

mean(pizzacity$menus.amountMax[pizzacity$Margherita=="1"])
## [1] 13.67919

Hawaiian

mean(pizzacity$menus.amountMax[pizzacity$Hawaiian=="1"])
## [1] 12.41829

White

mean(pizzacity$menus.amountMax[pizzacity$White=="1"])
## [1] 16.05385

Steak

mean(pizzacity$menus.amountMax[pizzacity$Steak=="1"])
## [1] 7.384

Fries

mean(pizzacity$menus.amountMax[pizzacity$Fries=="1"])
## [1] 3.722222

Burger

mean(pizzacity$menus.amountMax[pizzacity$Burger=="1"])
## [1] 5.572727

Average minimum pricing of dishes by their types

Cheese

mean(pizzacity$menus.amountMin[pizzacity$Cheese=="1"])
## [1] 10.58874

Chicken

mean(pizzacity$menus.amountMin[pizzacity$Chicken=="1"])
## [1] 11.94903

Margherita

mean(pizzacity$menus.amountMin[pizzacity$Margherita=="1"])
## [1] 12.9169

Hawaiian

mean(pizzacity$menus.amountMin[pizzacity$Hawaiian=="1"])
## [1] 11.08496

White

mean(pizzacity$menus.amountMin[pizzacity$White=="1"])
## [1] 13.79154

Steak

mean(pizzacity$menus.amountMin[pizzacity$Steak=="1"])
## [1] 7.0965

Fries

mean(pizzacity$menus.amountMin[pizzacity$Fries=="1"])
## [1] 3.722222

Burger

mean(pizzacity$menus.amountMin[pizzacity$Burger=="1"])
## [1] 5.327273

Correlogram

Scatter Plot

Cheese

Chicken

Margherita

Hawaiian

Steak

Burger

Fries

t.test

Chicken

t.test(menus.amountMax~Chicken, data=pizzacity)
## 
##  Welch Two Sample t-test
## 
## data:  menus.amountMax by Chicken
## t = -0.45827, df = 70.29, p-value = 0.6482
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  -2.141591  1.341266
## sample estimates:
## mean in group 0 mean in group 1 
##        13.00119        13.40135

Cheese

t.test(menus.amountMax~Cheese, data = pizzacity)
## 
##  Welch Two Sample t-test
## 
## data:  menus.amountMax by Cheese
## t = 2.2609, df = 38.928, p-value = 0.02943
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  0.2156719 3.8806312
## sample estimates:
## mean in group 0 mean in group 1 
##        13.18264        11.13449

Margherita

t.test(menus.amountMax~Margherita, data = pizzacity)
## 
##  Welch Two Sample t-test
## 
## data:  menus.amountMax by Margherita
## t = -0.75054, df = 21.221, p-value = 0.4612
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  -2.479501  1.163790
## sample estimates:
## mean in group 0 mean in group 1 
##        13.02134        13.67919

White

t.test(menus.amountMax~White, data = pizzacity)
## 
##  Welch Two Sample t-test
## 
## data:  menus.amountMax by White
## t = -2.9453, df = 26.147, p-value = 0.006695
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  -5.3868539 -0.9591972
## sample estimates:
## mean in group 0 mean in group 1 
##        12.88083        16.05385

Hawaiian

t.test(menus.amountMax~Hawaiian, data= pizzacity)
## 
##  Welch Two Sample t-test
## 
## data:  menus.amountMax by Hawaiian
## t = 0.44403, df = 9.1939, p-value = 0.6673
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  -2.617307  3.900838
## sample estimates:
## mean in group 0 mean in group 1 
##        13.06006        12.41829

Burger

t.test(menus.amountMax~Burger, data = pizzacity)
## 
##  Welch Two Sample t-test
## 
## data:  menus.amountMax by Burger
## t = 8.4976, df = 14.471, p-value = 5.294e-07
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  5.749115 9.615291
## sample estimates:
## mean in group 0 mean in group 1 
##       13.254930        5.572727

Fries

t.test(menus.amountMax~Fries, data = pizzacity)
## 
##  Welch Two Sample t-test
## 
## data:  menus.amountMax by Fries
## t = 21.46, df = 75.545, p-value < 2.2e-16
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##   8.650848 10.421100
## sample estimates:
## mean in group 0 mean in group 1 
##       13.258196        3.722222

Steak

t.test(menus.amountMax~Steak, data = pizzacity)
## 
##  Welch Two Sample t-test
## 
## data:  menus.amountMax by Steak
## t = 8.2955, df = 36.319, p-value = 6.646e-10
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  4.500795 7.412495
## sample estimates:
## mean in group 0 mean in group 1 
##        13.34064         7.38400

Regression

Model1

H0: There is no significant difference in the maximum pricing across cities

model <- menus.amountMax ~ city 
 fit <- lm(model, data = pizzacity)
 summary(fit)
## 
## Call:
## lm(formula = model, data = pizzacity)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -14.452  -3.134  -1.452   3.548 103.538 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  10.0647     0.7193  13.991  < 2e-16 ***
## city          0.7696     0.1611   4.778 2.49e-06 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 7.197 on 402 degrees of freedom
## Multiple R-squared:  0.05374,    Adjusted R-squared:  0.05139 
## F-statistic: 22.83 on 1 and 402 DF,  p-value: 2.485e-06

p - value < 0.05. Hence, we can reject the null hypothesis.

Model2

H0: There is no significant difference in the minimum pricing across cities

model2 <- menus.amountMin ~ city 
 fit <- lm(model2, data = pizzacity)
 summary(fit)
## 
## Call:
## lm(formula = model2, data = pizzacity)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -13.713  -2.763  -0.713   2.249 104.277 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)   8.5932     0.6722  12.783  < 2e-16 ***
## city          0.8743     0.1505   5.809 1.28e-08 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 6.725 on 402 degrees of freedom
## Multiple R-squared:  0.07744,    Adjusted R-squared:  0.07514 
## F-statistic: 33.74 on 1 and 402 DF,  p-value: 1.28e-08

p - value < 0.05. Hence, we can reject the null hypothesis.

Model3

H0: There is no significant difference in the maximum pricing across various types

model3 <- menus.amountMax ~  Cheese + Margherita + White + Hawaiian +Burger + Fries + Steak + Chicken
 
 fit <- lm(model3, data = pizzacity)
 summary(fit)
## 
## Call:
## lm(formula = model3, data = pizzacity)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -12.847  -2.734  -0.840   3.143 105.143 
## 
## Coefficients:
##              Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  13.84656    0.43416  31.893  < 2e-16 ***
## Cheese       -1.84878    1.43102  -1.292 0.197136    
## Margherita   -0.16737    1.86719  -0.090 0.928621    
## White         2.20426    1.58867   1.387 0.166075    
## Hawaiian     -1.42827    2.38433  -0.599 0.549500    
## Burger       -7.76962    2.17801  -3.567 0.000405 ***
## Fries       -10.12434    2.38433  -4.246 2.71e-05 ***
## Steak        -6.46893    1.62665  -3.977 8.31e-05 ***
## Chicken       0.03184    1.12786   0.028 0.977494    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 7.033 on 395 degrees of freedom
## Multiple R-squared:  0.1119, Adjusted R-squared:  0.09393 
## F-statistic: 6.222 on 8 and 395 DF,  p-value: 1.384e-07

Plotting the model

library(leaps)
 leap <- regsubsets(model3, data = pizzacity, nbest=1)
 summary(leap)
## Subset selection object
## Call: regsubsets.formula(model3, data = pizzacity, nbest = 1)
## 8 Variables  (and intercept)
##            Forced in Forced out
## Cheese         FALSE      FALSE
## Margherita     FALSE      FALSE
## White          FALSE      FALSE
## Hawaiian       FALSE      FALSE
## Burger         FALSE      FALSE
## Fries          FALSE      FALSE
## Steak          FALSE      FALSE
## Chicken        FALSE      FALSE
## 1 subsets of each size up to 8
## Selection Algorithm: exhaustive
##          Cheese Margherita White Hawaiian Burger Fries Steak Chicken
## 1  ( 1 ) " "    " "        " "   " "      " "    "*"   " "   " "    
## 2  ( 1 ) " "    " "        " "   " "      " "    "*"   "*"   " "    
## 3  ( 1 ) " "    " "        " "   " "      "*"    "*"   "*"   " "    
## 4  ( 1 ) " "    " "        "*"   " "      "*"    "*"   "*"   " "    
## 5  ( 1 ) "*"    " "        "*"   " "      "*"    "*"   "*"   " "    
## 6  ( 1 ) "*"    " "        "*"   "*"      "*"    "*"   "*"   " "    
## 7  ( 1 ) "*"    "*"        "*"   "*"      "*"    "*"   "*"   " "    
## 8  ( 1 ) "*"    "*"        "*"   "*"      "*"    "*"   "*"   "*"
 plot(leap, scale="adjr2")

Model4

H0: There is no significant difference in the minimum pricing across various types

model4 <- menus.amountMin ~  Cheese + Margherita + White + Hawaiian +Burger + Fries + Steak + Chicken
 
 fit <- lm(model4, data = pizzacity)
 summary(fit)
## 
## Call:
## lm(formula = model4, data = pizzacity)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -11.759  -2.259  -0.771   1.807 106.231 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  12.7588     0.4151  30.734  < 2e-16 ***
## Cheese       -1.3863     1.3683  -1.013 0.311589    
## Margherita    0.1581     1.7854   0.089 0.929483    
## White         1.0670     1.5190   0.702 0.482812    
## Hawaiian     -1.6738     2.2798  -0.734 0.463263    
## Burger       -7.0534     2.0825  -3.387 0.000778 ***
## Fries        -9.0366     2.2798  -3.964 8.76e-05 ***
## Steak        -5.5902     1.5554  -3.594 0.000367 ***
## Chicken      -0.3603     1.0784  -0.334 0.738495    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 6.725 on 395 degrees of freedom
## Multiple R-squared:  0.0935, Adjusted R-squared:  0.07514 
## F-statistic: 5.093 on 8 and 395 DF,  p-value: 4.778e-06

Plotting the model

library(leaps)
 leap <- regsubsets(model4, data = pizzacity, nbest=1)
 summary(leap)
## Subset selection object
## Call: regsubsets.formula(model4, data = pizzacity, nbest = 1)
## 8 Variables  (and intercept)
##            Forced in Forced out
## Cheese         FALSE      FALSE
## Margherita     FALSE      FALSE
## White          FALSE      FALSE
## Hawaiian       FALSE      FALSE
## Burger         FALSE      FALSE
## Fries          FALSE      FALSE
## Steak          FALSE      FALSE
## Chicken        FALSE      FALSE
## 1 subsets of each size up to 8
## Selection Algorithm: exhaustive
##          Cheese Margherita White Hawaiian Burger Fries Steak Chicken
## 1  ( 1 ) " "    " "        " "   " "      " "    "*"   " "   " "    
## 2  ( 1 ) " "    " "        " "   " "      " "    "*"   "*"   " "    
## 3  ( 1 ) " "    " "        " "   " "      "*"    "*"   "*"   " "    
## 4  ( 1 ) "*"    " "        " "   " "      "*"    "*"   "*"   " "    
## 5  ( 1 ) "*"    " "        " "   "*"      "*"    "*"   "*"   " "    
## 6  ( 1 ) "*"    " "        "*"   "*"      "*"    "*"   "*"   " "    
## 7  ( 1 ) "*"    " "        "*"   "*"      "*"    "*"   "*"   "*"    
## 8  ( 1 ) "*"    "*"        "*"   "*"      "*"    "*"   "*"   "*"
 plot(leap, scale="adjr2")

Model5

H0: There is no significant difference in the minimum pricing across various types and cities

model5 <- menus.amountMin ~ city + Cheese + Margherita + White + Hawaiian +Burger + Fries + Steak + Chicken
 
 fit <- lm(model5, data = pizzacity)
 summary(fit)
## 
## Call:
## lm(formula = model5, data = pizzacity)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -13.564  -2.167  -1.012   1.921 104.426 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)   9.7990     0.8448  11.599  < 2e-16 ***
## city          0.6808     0.1702   3.999 7.58e-05 ***
## Cheese       -1.4908     1.3433  -1.110  0.26775    
## Margherita   -1.0121     1.7767  -0.570  0.56922    
## White         1.7832     1.5017   1.187  0.23576    
## Hawaiian     -0.9833     2.2444  -0.438  0.66155    
## Burger       -5.1172     2.1007  -2.436  0.01529 *  
## Fries        -6.7575     2.3092  -2.926  0.00363 ** 
## Steak        -3.6659     1.6007  -2.290  0.02254 *  
## Chicken       0.7325     1.0932   0.670  0.50320    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 6.601 on 394 degrees of freedom
## Multiple R-squared:  0.1289, Adjusted R-squared:  0.109 
## F-statistic: 6.476 on 9 and 394 DF,  p-value: 1.311e-08

Plotting the model

library(leaps)
 leap <- regsubsets(model5, data = pizzacity, nbest=1)
 summary(leap)
## Subset selection object
## Call: regsubsets.formula(model5, data = pizzacity, nbest = 1)
## 9 Variables  (and intercept)
##            Forced in Forced out
## city           FALSE      FALSE
## Cheese         FALSE      FALSE
## Margherita     FALSE      FALSE
## White          FALSE      FALSE
## Hawaiian       FALSE      FALSE
## Burger         FALSE      FALSE
## Fries          FALSE      FALSE
## Steak          FALSE      FALSE
## Chicken        FALSE      FALSE
## 1 subsets of each size up to 8
## Selection Algorithm: exhaustive
##          city Cheese Margherita White Hawaiian Burger Fries Steak Chicken
## 1  ( 1 ) "*"  " "    " "        " "   " "      " "    " "   " "   " "    
## 2  ( 1 ) "*"  " "    " "        " "   " "      " "    "*"   " "   " "    
## 3  ( 1 ) "*"  " "    " "        " "   " "      "*"    "*"   " "   " "    
## 4  ( 1 ) "*"  " "    " "        " "   " "      "*"    "*"   "*"   " "    
## 5  ( 1 ) "*"  " "    " "        "*"   " "      "*"    "*"   "*"   " "    
## 6  ( 1 ) "*"  "*"    " "        "*"   " "      "*"    "*"   "*"   " "    
## 7  ( 1 ) "*"  "*"    " "        "*"   " "      "*"    "*"   "*"   "*"    
## 8  ( 1 ) "*"  "*"    "*"        "*"   " "      "*"    "*"   "*"   "*"
 plot(leap, scale="adjr2")

H0: There is no significant difference in the maximum pricing across various types and cities

model6 <- menus.amountMax ~ city + Cheese + Margherita + White + Hawaiian +Burger + Fries + Steak + Chicken
 
 fit <- lm(model6, data = pizzacity)
 summary(fit)
## 
## Call:
## lm(formula = model6, data = pizzacity)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -14.222  -2.718  -0.955   2.839 103.768 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  11.5924     0.8919  12.997  < 2e-16 ***
## city          0.5185     0.1797   2.885 0.004129 ** 
## Cheese       -1.9284     1.4182  -1.360 0.174697    
## Margherita   -1.0586     1.8757  -0.564 0.572828    
## White         2.7497     1.5855   1.734 0.083644 .  
## Hawaiian     -0.9023     2.3695  -0.381 0.703552    
## Burger       -6.2950     2.2178  -2.838 0.004768 ** 
## Fries        -8.3886     2.4379  -3.441 0.000642 ***
## Steak        -5.0034     1.6899  -2.961 0.003255 ** 
## Chicken       0.8641     1.1542   0.749 0.454495    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 6.969 on 394 degrees of freedom
## Multiple R-squared:  0.1303, Adjusted R-squared:  0.1104 
## F-statistic: 6.558 on 9 and 394 DF,  p-value: 9.862e-09

Plotting the model

library(leaps)
 leap <- regsubsets(model6, data = pizzacity, nbest=1)
 summary(leap)
## Subset selection object
## Call: regsubsets.formula(model6, data = pizzacity, nbest = 1)
## 9 Variables  (and intercept)
##            Forced in Forced out
## city           FALSE      FALSE
## Cheese         FALSE      FALSE
## Margherita     FALSE      FALSE
## White          FALSE      FALSE
## Hawaiian       FALSE      FALSE
## Burger         FALSE      FALSE
## Fries          FALSE      FALSE
## Steak          FALSE      FALSE
## Chicken        FALSE      FALSE
## 1 subsets of each size up to 8
## Selection Algorithm: exhaustive
##          city Cheese Margherita White Hawaiian Burger Fries Steak Chicken
## 1  ( 1 ) "*"  " "    " "        " "   " "      " "    " "   " "   " "    
## 2  ( 1 ) "*"  " "    " "        " "   " "      " "    "*"   " "   " "    
## 3  ( 1 ) " "  " "    " "        " "   " "      "*"    "*"   "*"   " "    
## 4  ( 1 ) "*"  " "    " "        " "   " "      "*"    "*"   "*"   " "    
## 5  ( 1 ) "*"  " "    " "        "*"   " "      "*"    "*"   "*"   " "    
## 6  ( 1 ) "*"  "*"    " "        "*"   " "      "*"    "*"   "*"   " "    
## 7  ( 1 ) "*"  "*"    " "        "*"   " "      "*"    "*"   "*"   "*"    
## 8  ( 1 ) "*"  "*"    "*"        "*"   " "      "*"    "*"   "*"   "*"
 plot(leap, scale="adjr2")