1. Introduction

The hospitality industry is a broad category of fields within service industry that includes lodging, event planning, theme parks, transportation, cruise line, and additional fields within the tourism industry. The hospitality industry is a multibillion-dollar industry that depends on the availability of leisure time and disposable income. A hospitality unit such as a restaurant, hotel, or an amusement park consists of multiple groups such as facility maintenance and direct operations (servers, housekeepers, porters, kitchen workers, bartenders, management, marketing, and human resources etc.).

Usage rate, or its inverse “vacancy rate”, is an important variable for the hospitality industry. Just as a factory owner would wish a productive asset to be in use as much as possible (as opposed to having to pay fixed costs while the factory is not producing), so do restaurants, hotels, and theme parks seek to maximize the number of customers they “process” in all sectors. This led to formation of services with the aim to increase usage rate provided by hotel consolidators. Information about required or offered products are brokered on business networks used by vendors as well as purchasers.

2. Overview of the Study

Our field study concerns room prices which are made available through Airbnb Services in the region of Alpes Maritime.The Alpes-Maritimes department is surrounded by the departments of Var in the southwest, Alpes-de-Haute-Provence in the north-west, Italy, and the Mediterranean Sea to the south. It surrounds the Principality of Monaco on the west, north, and east.

3. An empirical field study of Airbnb Services

3.1 Overview

The specific objective of this Study was to investigate the pricing strategy employed by hosts in a different locale. This study analyzed room prices at Alpes Maritime,France. Our goal was to compare prices of rooms based on various factors like overall satisfaction of previous customers, their reviews, neighbourhood and other factors. Airbnb provides roomns to customers at affordable prices and desired neighbourhood( A subregion of the city or search area for which the survey is carried out).Our study is primarily focussed on services by Airbnb in Alpes Maritime region of France.

Accordingly, we construct the following hypothesis:

Hypothesis H1: The average prices of rooms are dependent on variables like overall satisfaction, review, no. of bedrooms, borough, minstay etc.

3.2 Data

For this study, we collected data from Tomslee website (http://tomslee.net/airbnb-data-collection-get-the-data). Airbnb provides roomns to customers at affordable prices and desired neighbourhood( A subregion of the city or search area for which the survey is carried out).Our study is primarily focussed on services by Airbnb in Alpes Maritime region of France. Our dataset comprises of following attributes:

room_id:

A unique number identifying an Airbnb listing. The listing has a URL on the Airbnb web site of http://airbnb.com/rooms/room_id

host_id:

A unique number identifying an Airbnb host. The host’s page has a URL on the Airbnb web site of http://airbnb.com/users/show/host_id

room_type:

One of “Entire home/apt”, “Private room”, or “Shared room”

borough:

A subregion of the city or search area for which the survey is carried out. The borough is taken from a shapefile of the city that is obtained independently of the Airbnb web site. For some cities, there is no borough information; for others the borough may be a number.

neighborhood:

As with borough: a subregion of the city or search area for which the survey is carried out. For cities that have both, a neighbourhood is smaller than a borough. For some cities there is no neighbourhood information.

reviews:

The number of reviews that a listing has received. Airbnb has said that 70% of visits end up with a review, so the number of reviews can be used to estimate the number of visits. Note that such an estimate will not be reliable for an individual listing (especially as reviews occasionally vanish from the site), but over a city as a whole it should be a useful metric of traffic.

overall_satisfaction:

The average rating (out of five) that the listing has received from those visitors who left a review.

accommodates:

The number of guests a listing can accommodate.

bedrooms:

The number of bedrooms a listing offers.

price:

The price (in $US) for a night stay. In early surveys, there may be some values that were recorded by month.

minstay:

The minimum stay for a visit, as posted by the host.

latitude and longitude:

The latitude and longitude of the listing as posted on the Airbnb site: this may be off by a few hundred metres.

3.3 Model

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

\[Price= \alpha_0 + \alpha_1 overall_satisfaction + \alpha_2 reviews + \alpha_3 minstay +\alpha_4 bedrooms +\alpha_5 accomodates + \epsilon\]

# Read the data
setwd("C:/Users/SURABHI/Desktop/IIM INTERNSHIP")
hotel <- read.csv(paste("Airnb dataset.csv", sep=""), stringsAsFactors=FALSE)
attach(hotel)
# OLS Model
M1 <- lm(price~overall_satisfaction+reviews+minstay+bedrooms+accommodates, data=hotel)
summary(M1)
## 
## Call:
## lm(formula = price ~ overall_satisfaction + reviews + minstay + 
##     bedrooms + accommodates, data = hotel)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -127.25  -36.14  -13.14   25.87  818.28 
## 
## Coefficients:
##                      Estimate Std. Error t value Pr(>|t|)    
## (Intercept)          -79.7084    45.4598  -1.753  0.08032 .  
## overall_satisfaction  17.4767     9.6566   1.810  0.07109 .  
## reviews               -0.3589     0.2069  -1.735  0.08348 .  
## minstay                5.5889     2.2877   2.443  0.01501 *  
## bedrooms              49.7168     6.4359   7.725 9.46e-14 ***
## accommodates           9.5318     3.5190   2.709  0.00705 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 77.04 on 392 degrees of freedom
##   (601 observations deleted due to missingness)
## Multiple R-squared:  0.4807, Adjusted R-squared:  0.4741 
## F-statistic: 72.58 on 5 and 392 DF,  p-value: < 2.2e-16

We established the effect of various factors on the price of a room with the simplest model. We regressed Price on overall_satisfaction, reviews, minstay, bedrooms, accommodates .We estimated model, using linear regression model.

3.4 Results

We found empirical support for H1. The average room prices are independent of factors : overall_satisfaction with p-value 0.07109>0.05, reviews with p-value 0.08348>0.05. The room prices are dependent on factors: minstay with p-value 0.01501<0.05, bedroom with p-value 9.46e-14<0.05, accommodates with p-value 0.00705<0.05.

4. Conclusion

This paper was motivated by the need for research that could improve our understanding of how various factors as overall satisfaction, reviews, bedrooms, minstay, accommodates etc. influence the pricing strategies in the hospitality industry. The unique contribution of this paper is that we investigated the price premium charged by airbnb in Alpes Maritime. We observed that Airbnb charges price premiums for the number of bedrooms offered, number of guests accomodated by a host and the minimum stay of a visit by a guest.

5. References

http://tomslee.net/airbnb-data-collection-get-the-data https://en.wikipedia.org/wiki/Alpes-Maritimes https://www.luckeyhomes.com/en/cities/nice

Pictures

1- Read dataset in R and visualize length and breadth of dataset

setwd("C:/Users/SURABHI/Desktop/IIM INTERNSHIP")
hotel.df <- read.csv (paste("Airnb dataset.csv", sep=""))
View(hotel.df)
dim(hotel.df)
## [1] 999  13

2- Create descriptive statistics of each variable

minimum of variable

min(hotel.df$reviews) 
## [1] 0
min(hotel.df$overall_satisfaction)
## [1] NA
min(hotel.df$accommodates)
## [1] 1
min(hotel.df$bedrooms)
## [1] NA
min(hotel.df$price)
## [1] 23
min(hotel.df$minstay)
## [1] NA

maximum of variable

max(hotel.df$reviews)
## [1] 199
max(hotel.df$overall_satisfaction)
## [1] NA
max(hotel.df$accommodates)
## [1] 16
max(hotel.df$bedrooms)
## [1] NA
max(hotel.df$price)
## [1] 9502
max(hotel.df$minstay)
## [1] NA

median of variable

median(hotel.df$reviews)
## [1] 2
median(hotel.df$overall_satisfaction)
## [1] NA
median(hotel.df$accommodates)
## [1] 4
median(hotel.df$bedrooms)
## [1] NA
median(hotel.df$price)
## [1] 103
median(hotel.df$minstay)
## [1] NA

standard deviation of variable

sd(hotel.df$reviews)
## [1] 14.17979
sd(hotel.df$overall_satisfaction)
## [1] NA
sd(hotel.df$accommodates)
## [1] 2.120395
sd(hotel.df$bedrooms)
## [1] NA
sd(hotel.df$price)
## [1] 402.755
sd(hotel.df$minstay)
## [1] NA

3- Create one way contingency table for categorical variables in dataset

mytable<- with(hotel.df, table(hotel.df$reviews))
mytable
## 
##   0   1   2   3   4   5   6   7   8   9  10  11  12  13  14  15  16  17 
## 315 171  89  69  49  38  25  25  20  17  23  10  10  14  12   4   8   8 
##  18  19  20  21  23  24  25  26  27  28  29  30  31  32  34  36  38  39 
##   6   7   8   1   4   2   1   4   2   3   2   3   2   3   2   1   4   3 
##  40  41  42  43  45  48  50  51  52  54  57  60  63  67  74  76  78  80 
##   1   2   2   4   1   1   2   2   1   2   1   2   2   1   1   1   1   1 
##  82  88  95  97 140 199 
##   1   1   1   1   1   1
mytable<- with(hotel.df, table(hotel.df$bedrooms))
mytable
## 
##   0   1   2   3   4   5   6   7   8 
## 158 454 227  91  36  20   6   3   1
mytable<- with(hotel.df, table(hotel.df$accommodates))
mytable
## 
##   1   2   3   4   5   6   7   8   9  10  11  12  14  16 
##  10 258  93 342  61 145  14  39   6  16   3   7   3   2
mytable<- with(hotel.df, table(hotel.df$minstay))
mytable
## 
##   1   2   3   4   5   6   7   8   9  10  12  14  15 
## 220 158 195  99  83  35 130   2   1   2   2   7   1
mytable<- with(hotel.df, table(hotel.df$overall_satisfaction))
mytable
## 
##   2   3 3.5   4 4.5   5 
##   1   1  14  49 205 153

4- Create two way contingency table for categorical variables in the dataset

mytable1<- xtabs(~price+bedrooms, data=hotel.df)
mytable1
##       bedrooms
## price   0  1  2  3  4  5  6  7  8
##   23    0  4  0  0  0  0  0  0  0
##   29    0  4  0  0  0  0  0  0  0
##   30    0  1  0  0  0  0  0  0  0
##   31    1  1  0  0  0  0  0  0  0
##   32    0  4  0  0  0  0  0  0  0
##   33    0  1  0  0  0  0  0  0  0
##   34    1  1  0  0  0  0  0  0  0
##   35    1  5  0  0  0  0  0  0  0
##   36    0  1  0  0  0  0  0  0  0
##   37    1  1  0  0  0  0  0  0  0
##   38    1  0  1  0  0  0  0  0  0
##   39    1  0  0  0  0  0  0  0  0
##   40    6  6  0  0  0  0  0  0  0
##   41    2  0  0  0  0  0  0  0  0
##   43    0  4  0  0  0  0  0  0  0
##   45    0  7  1  0  0  0  0  0  0
##   46    6  9  0  0  0  0  0  0  0
##   47    1  2  0  0  0  0  0  0  0
##   48    1  4  0  0  0  0  0  0  0
##   49    2  5  0  0  0  0  0  0  0
##   50    0  2  0  0  0  0  0  0  0
##   52    4 11  0  0  0  0  0  0  0
##   53    1  1  2  0  0  0  0  0  0
##   55    1  0  0  0  0  0  0  0  0
##   56    1  4  1  0  0  0  0  0  0
##   57    5  7  0  0  0  0  0  0  0
##   58   15 28  3  0  0  0  0  0  0
##   59    2  1  0  0  0  0  0  0  0
##   60    3  3  0  0  0  0  0  0  0
##   61    1  3  0  0  0  0  0  0  0
##   62    2  2  0  0  0  0  0  0  0
##   63    3  7  1  0  0  0  0  0  0
##   64    2  2  1  0  0  0  0  0  0
##   65    1  1  1  0  0  0  0  0  0
##   66    1  3  0  0  0  0  0  0  0
##   67    0  6  0  0  0  0  0  0  0
##   68    2  5  0  0  0  0  0  0  0
##   69   10 23  4  0  0  0  0  0  0
##   70    0  2  0  0  0  0  0  0  0
##   71    2  4  0  0  0  0  0  0  0
##   72    1  2  0  0  0  0  0  0  0
##   74    3  4  0  0  0  0  0  0  0
##   75    4  9  0  0  0  0  0  0  0
##   76    1  1  1  0  0  0  0  0  0
##   77    0  1  0  0  0  0  0  0  0
##   78    0  1  1  0  0  0  0  0  0
##   79    2  4  0  0  0  0  0  0  0
##   80   10 20  7  0  0  0  0  0  0
##   81    1  1  0  0  0  0  0  0  0
##   82    0  1  0  0  0  0  0  0  0
##   83    1  1  1  0  0  0  0  0  0
##   84    0  1  0  0  0  0  0  0  0
##   85    0  5  0  0  0  0  0  0  0
##   87    0 19  4  1  0  0  0  0  0
##   89    1  2  1  0  0  0  0  0  0
##   90    2  3  0  0  0  0  0  0  0
##   91    2  9  1  0  0  0  0  0  0
##   92    8 26 10  0  0  0  0  0  0
##   93    2  6  5  2  0  0  0  0  0
##   94    1  1  0  0  0  0  0  0  0
##   96    1  0  0  0  0  0  0  0  0
##   97    0  1  0  0  0  0  0  0  0
##   98    4  9  6  0  0  0  0  0  0
##   99    0  0  1  0  0  0  0  0  0
##   101   1  1  0  0  0  0  0  0  0
##   102   1  1  4  0  0  0  0  0  0
##   103   2 11  2  0  0  0  0  0  0
##   104   7 15  5  0  0  1  0  0  0
##   105   0  0  1  0  0  0  0  0  0
##   106   2  0  0  0  0  0  0  0  0
##   107   0  2  1  0  0  0  0  0  0
##   108   0  1  1  1  0  0  0  0  0
##   109   0  2  4  0  0  0  0  0  0
##   110   0  0  1  0  0  0  0  0  0
##   111   0  1  0  0  0  0  0  0  0
##   112   1  0  0  0  0  0  0  0  0
##   113   0  2  3  0  0  0  0  0  0
##   114   1  8  4  1  0  0  0  0  0
##   115   4 16 15  4  0  0  0  0  0
##   117   0  1  0  0  0  0  0  0  0
##   119   0  0  2  0  0  0  0  0  0
##   121   0  2  1  1  0  0  0  0  0
##   123   0  1  0  0  0  0  0  0  0
##   125   0  2  1  0  0  0  0  0  0
##   126   0  3  2  0  0  0  0  0  0
##   127   2 10  6  1  0  0  0  0  0
##   129   0  0  1  0  0  0  0  0  0
##   130   0  1  0  0  0  0  0  0  0
##   131   0  1  0  0  0  0  0  0  0
##   132   0  2  1  0  0  0  0  0  0
##   133   0  1  0  1  0  0  0  0  0
##   136   0  0  2  0  0  0  0  0  0
##   137   0  2  1  1  0  0  0  0  0
##   138   1  9  9  3  0  0  0  0  0
##   139   0  1  1  1  0  0  0  0  0
##   140   0  0  1  0  0  0  0  0  0
##   143   0  1  0  0  0  0  0  0  0
##   144   1  1  2  1  0  0  0  0  0
##   145   0  2  0  0  0  0  0  0  0
##   148   0  1  1  0  0  0  0  0  0
##   149   0  3 10  3  0  0  0  0  0
##   150   0  1  2  1  0  0  0  0  0
##   153   0  0  1  1  0  0  0  0  0
##   156   0  1  2  1  0  0  0  0  0
##   160   1  1  0  0  1  0  0  0  0
##   161   0  0  2  0  0  0  0  0  0
##   162   0  3  3  1  0  0  0  0  0
##   164   0  0  1  0  0  0  0  0  0
##   165   0  0  0  1  0  0  0  0  0
##   167   0  2  2  1  0  0  0  0  0
##   168   0  0  0  1  0  0  0  0  0
##   171   0  1  3  1  0  0  0  0  0
##   172   0  3  4  0  0  0  0  0  0
##   173   2  8 12  5  1  0  0  0  0
##   180   1  0  0  0  0  0  0  0  0
##   183   0  1  0  1  0  0  0  0  0
##   184   0  1  7  2  0  0  0  0  0
##   185   0  0  1  0  0  0  0  0  0
##   190   0  0  0  1  0  0  0  0  0
##   196   0  1  3  2  0  0  0  0  0
##   197   0  0  0  1  0  0  0  0  0
##   201   0  1  0  1  0  0  0  0  0
##   207   0  0  1  2  1  0  0  0  0
##   208   0  1  2  1  0  0  0  0  0
##   212   0  0  1  0  0  0  0  0  0
##   213   0  1  1  0  0  0  0  0  0
##   214   0  0  2  1  0  0  0  0  0
##   215   0  0  1  0  0  0  0  0  0
##   218   0  1  1  2  0  1  0  0  0
##   225   0  1  2  1  0  0  0  0  0
##   230   0  3  6  4  2  0  0  0  0
##   231   3  2  3  2  1  0  0  0  0
##   247   0  0  0  1  0  0  0  0  0
##   253   0  2  4  0  0  0  0  0  0
##   259   0  0  0  1  0  0  0  0  0
##   265   0  0  0  1  0  0  0  0  0
##   277   0  0  1  0  0  0  0  0  0
##   278   0  0  1  0  0  0  0  0  0
##   287   0  3  1  3  1  1  0  0  0
##   288   0  0  0  1  0  1  0  0  0
##   290   0  0  0  0  1  0  0  0  0
##   300   0  0  0  1  0  0  0  0  0
##   305   0  0  0  0  1  0  0  0  0
##   311   0  0  0  2  0  0  0  0  0
##   316   0  0  1  0  0  0  0  0  0
##   317   0  0  1  0  0  0  0  0  0
##   322   0  0  0  0  1  0  0  0  0
##   330   0  0  0  0  1  0  0  0  0
##   331   0  0  1  0  0  0  0  0  0
##   333   0  0  0  0  1  0  0  0  0
##   345   0  1  2  3  3  4  0  0  0
##   346   0  1  0  1  0  1  0  0  0
##   356   0  0  1  0  0  0  0  0  0
##   363   0  0  0  1  0  0  0  0  0
##   368   0  0  0  0  1  0  0  0  0
##   369   0  0  0  0  2  0  0  0  0
##   374   0  2  0  0  0  0  0  0  0
##   379   0  1  0  0  0  0  0  0  0
##   391   0  0  0  1  0  1  0  0  0
##   403   1  1  2  4  0  0  0  0  0
##   404   0  0  0  0  0  1  0  0  0
##   411   0  0  0  0  1  0  0  0  0
##   426   0  0  1  0  0  1  0  0  0
##   432   0  0  0  1  0  0  0  0  0
##   438   0  0  0  1  1  0  0  0  0
##   443   0  0  0  0  1  1  0  0  0
##   449   0  1  0  0  0  0  0  0  0
##   460   0  1  0  3  1  0  0  0  0
##   461   0  0  0  0  1  0  0  0  0
##   483   0  0  0  1  0  0  0  0  0
##   490   0  0  1  0  0  0  0  0  0
##   509   0  0  1  0  0  0  0  0  0
##   515   0  0  1  0  0  0  0  0  0
##   518   1  0  2  0  0  0  0  0  0
##   576   2  0  0  2  2  0  1  0  0
##   577   0  0  1  0  0  0  0  0  0
##   599   0  0  0  0  0  1  0  0  0
##   610   0  0  0  1  0  0  0  0  0
##   611   0  1  0  0  0  0  0  0  0
##   633   0  0  0  1  0  0  0  0  0
##   645   0  0  0  0  1  0  0  0  0
##   656   0  0  0  0  0  1  0  0  0
##   683   0  0  0  0  1  0  0  0  0
##   691   0  0  1  0  1  0  1  1  0
##   724   0  0  0  0  0  0  1  0  0
##   749   0  0  0  1  1  0  0  0  0
##   760   0  0  0  1  0  0  0  0  0
##   773   0  0  1  0  0  0  0  0  0
##   800   0  0  0  0  0  1  0  0  0
##   805   0  0  0  1  0  0  0  0  0
##   806   0  0  1  1  0  0  0  0  0
##   822   0  0  0  0  0  0  1  0  0
##   823   0  0  0  0  0  0  0  0  1
##   863   0  0  0  0  0  0  0  1  0
##   864   0  0  0  0  1  0  0  0  0
##   876   0  0  0  0  1  0  0  0  0
##   921   0  0  0  0  1  0  0  0  0
##   979   0  0  1  0  0  0  0  1  0
##   980   0  0  1  0  0  0  0  0  0
##   1035  0  0  0  0  0  0  1  0  0
##   1036  0  0  0  1  1  0  0  0  0
##   1152  0  0  0  0  0  0  1  0  0
##   1261  0  0  0  0  0  1  0  0  0
##   1382  0  0  1  0  0  0  0  0  0
##   1498  0  0  0  0  0  1  0  0  0
##   1612  0  1  0  0  0  0  0  0  0
##   1727  0  0  0  0  0  1  0  0  0
##   2056  0  0  0  0  0  1  0  0  0
##   2073  0  0  0  0  1  0  0  0  0
##   2303  0  0  0  0  1  0  0  0  0
##   3283  0  0  0  1  0  0  0  0  0
##   4607  0  0  1  0  0  0  0  0  0
##   9502  0  0  0  0  1  0  0  0  0
mytable1<- xtabs(~price+accommodates, data=hotel.df)
mytable1
##       accommodates
## price   1  2  3  4  5  6  7  8  9 10 11 12 14 16
##   23    3  0  0  1  0  0  0  0  0  0  0  0  0  0
##   29    0  4  0  0  0  0  0  0  0  0  0  0  0  0
##   30    0  1  0  0  0  0  0  0  0  0  0  0  0  0
##   31    0  2  0  0  0  0  0  0  0  0  0  0  0  0
##   32    0  2  1  1  0  0  0  0  0  0  0  0  0  0
##   33    0  1  0  0  0  0  0  0  0  0  0  0  0  0
##   34    0  2  0  0  0  0  0  0  0  0  0  0  0  0
##   35    2  3  1  0  0  0  0  0  0  0  0  0  0  0
##   36    0  1  0  0  0  0  0  0  0  0  0  0  0  0
##   37    0  2  0  0  0  0  0  0  0  0  0  0  0  0
##   38    0  1  0  0  0  1  0  0  0  0  0  0  0  0
##   39    0  0  1  0  0  0  0  0  0  0  0  0  0  0
##   40    1  8  1  2  0  0  0  0  0  0  0  0  0  0
##   41    0  1  0  1  0  0  0  0  0  0  0  0  0  0
##   43    1  2  1  0  0  0  0  0  0  0  0  0  0  0
##   45    0  5  1  2  0  0  0  0  0  0  0  0  0  0
##   46    0 13  2  0  0  0  0  0  0  0  0  0  0  0
##   47    0  0  1  2  0  0  0  0  0  0  0  0  0  0
##   48    0  2  1  1  1  0  0  0  0  0  0  0  0  0
##   49    0  5  1  1  0  0  0  0  0  0  0  0  0  0
##   50    1  1  0  0  0  0  0  0  0  0  0  0  0  0
##   52    0  9  1  5  0  0  0  0  0  0  0  0  0  0
##   53    0  2  0  2  0  0  0  0  0  0  0  0  0  0
##   55    0  1  0  0  0  0  0  0  0  0  0  0  0  0
##   56    0  3  1  1  0  1  0  0  0  0  0  0  0  0
##   57    0  6  1  4  1  0  0  0  0  0  0  0  0  0
##   58    0 25  6 13  1  1  0  0  0  0  0  0  0  0
##   59    0  1  2  0  0  0  0  0  0  0  0  0  0  0
##   60    0  4  0  2  0  0  0  0  0  0  0  0  0  0
##   61    0  1  1  1  1  0  0  0  0  0  0  0  0  0
##   62    0  2  0  2  0  0  0  0  0  0  0  0  0  0
##   63    0  6  1  4  1  0  0  0  0  0  0  0  0  0
##   64    0  1  0  4  0  0  0  0  0  0  0  0  0  0
##   65    0  2  1  0  0  0  0  0  0  0  0  0  0  0
##   66    0  3  1  0  0  0  0  0  0  0  0  0  0  0
##   67    0  4  0  1  1  0  0  0  0  0  0  0  0  0
##   68    0  2  2  3  0  0  0  0  0  0  0  0  0  0
##   69    0 13  5 17  2  1  0  0  0  0  0  0  0  0
##   70    0  0  1  1  0  0  0  0  0  0  0  0  0  0
##   71    0  4  0  1  0  1  0  0  0  0  0  0  0  0
##   72    0  1  0  2  0  0  0  0  0  0  0  0  0  0
##   74    0  4  0  3  0  0  0  0  0  0  0  0  0  0
##   75    0  4  1  7  0  1  0  0  0  0  0  0  0  0
##   76    0  1  1  1  0  0  0  0  0  0  0  0  0  0
##   77    0  0  0  1  0  0  0  0  0  0  0  0  0  0
##   78    0  0  1  0  0  1  0  0  0  0  0  0  0  0
##   79    0  3  0  3  0  0  0  0  0  0  0  0  0  0
##   80    0  9  5 16  3  4  0  0  0  0  0  0  0  0
##   81    0  1  0  1  0  0  0  0  0  0  0  0  0  0
##   82    0  0  0  1  0  0  0  0  0  0  0  0  0  0
##   83    0  0  1  2  0  0  0  0  0  0  0  0  0  0
##   84    0  1  0  0  0  0  0  0  0  0  0  0  0  0
##   85    0  1  0  4  0  0  0  0  0  0  0  0  0  0
##   87    0  4  3 11  3  2  0  0  1  0  0  0  0  0
##   89    0  1  0  2  1  0  0  0  0  0  0  0  0  0
##   90    0  1  1  2  0  1  0  0  0  0  0  0  0  0
##   91    0  4  2  5  1  0  0  0  0  0  0  0  0  0
##   92    1 11  4 22  2  4  0  0  0  0  0  0  0  0
##   93    0  1  1  5  3  5  0  0  0  0  0  0  0  0
##   94    0  1  0  0  1  0  0  0  0  0  0  0  0  0
##   96    0  0  1  0  0  0  0  0  0  0  0  0  0  0
##   97    0  0  0  0  1  0  0  0  0  0  0  0  0  0
##   98    1  5  1  9  2  1  0  0  0  0  0  0  0  0
##   99    0  0  0  0  0  1  0  0  0  0  0  0  0  0
##   101   0  0  1  1  0  0  0  0  0  0  0  0  0  0
##   102   0  0  1  2  1  2  0  0  0  0  0  0  0  0
##   103   0  5  4  5  1  0  0  0  0  0  0  0  0  0
##   104   0  5  4 16  0  2  0  0  0  0  1  0  0  0
##   105   0  0  0  1  0  0  0  0  0  0  0  0  0  0
##   106   0  1  0  1  0  0  0  0  0  0  0  0  0  0
##   107   0  0  0  2  0  0  1  0  0  0  0  0  0  0
##   108   0  0  1  1  0  1  0  0  0  0  0  0  0  0
##   109   0  2  0  2  0  2  1  0  0  0  0  0  0  0
##   110   0  0  0  0  1  0  0  0  0  0  0  0  0  0
##   111   0  0  0  1  0  0  0  0  0  0  0  0  0  0
##   112   0  0  0  1  0  0  0  0  0  0  0  0  0  0
##   113   0  1  0  1  2  1  0  0  0  0  0  0  0  0
##   114   0  3  1  9  1  0  0  0  0  0  0  0  0  0
##   115   0  6  4 14  4 11  0  0  0  0  0  0  0  0
##   117   0  0  0  1  0  0  0  0  0  0  0  0  0  0
##   119   0  0  0  0  0  2  0  0  0  0  0  0  0  0
##   121   0  1  0  1  0  2  0  0  0  0  0  0  0  0
##   123   0  1  0  0  0  0  0  0  0  0  0  0  0  0
##   125   0  0  0  2  0  1  0  0  0  0  0  0  0  0
##   126   0  2  0  1  0  2  0  0  0  0  0  0  0  0
##   127   0  5  2  8  1  3  0  0  0  0  0  0  0  0
##   129   0  0  0  0  1  0  0  0  0  0  0  0  0  0
##   130   0  0  0  1  0  0  0  0  0  0  0  0  0  0
##   131   0  1  0  0  0  0  0  0  0  0  0  0  0  0
##   132   0  1  0  2  0  0  0  0  0  0  0  0  0  0
##   133   0  0  0  0  0  1  1  0  0  0  0  0  0  0
##   136   0  0  0  2  0  0  0  0  0  0  0  0  0  0
##   137   0  0  1  2  1  0  0  0  0  0  0  0  0  0
##   138   0  4  2  8  2  3  1  1  0  1  0  0  0  0
##   139   0  0  0  1  0  1  0  1  0  0  0  0  0  0
##   140   0  0  0  0  0  0  0  1  0  0  0  0  0  0
##   143   0  0  0  1  0  0  0  0  0  0  0  0  0  0
##   144   0  0  1  2  0  1  1  0  0  0  0  0  0  0
##   145   0  0  0  2  0  0  0  0  0  0  0  0  0  0
##   148   0  1  0  1  0  0  0  0  0  0  0  0  0  0
##   149   0  1  1  7  2  4  0  0  0  1  0  0  0  0
##   150   0  1  0  0  1  2  0  0  0  0  0  0  0  0
##   153   0  0  0  1  1  0  0  0  0  0  0  0  0  0
##   156   0  0  1  1  0  2  0  0  0  0  0  0  0  0
##   160   0  0  1  1  0  0  0  1  0  0  0  0  0  0
##   161   0  0  0  2  0  0  0  0  0  0  0  0  0  0
##   162   0  1  1  4  0  0  0  1  0  0  0  0  0  0
##   164   0  0  0  0  0  1  0  0  0  0  0  0  0  0
##   165   0  0  0  0  0  1  0  0  0  0  0  0  0  0
##   167   0  0  0  3  0  0  0  1  1  0  0  0  0  0
##   168   0  0  0  0  0  1  0  0  0  0  0  0  0  0
##   171   0  0  0  3  1  1  0  0  0  0  0  0  0  0
##   172   0  2  1  1  2  1  0  0  0  0  0  0  0  0
##   173   0  2  4 10  3  8  0  0  1  0  0  0  0  0
##   180   0  1  0  0  0  0  0  0  0  0  0  0  0  0
##   183   0  0  0  1  0  1  0  0  0  0  0  0  0  0
##   184   0  1  0  3  1  3  1  1  0  0  0  0  0  0
##   185   0  0  0  0  0  1  0  0  0  0  0  0  0  0
##   190   0  0  0  0  0  1  0  0  0  0  0  0  0  0
##   196   0  0  1  1  0  4  0  0  0  0  0  0  0  0
##   197   0  0  0  0  0  1  0  0  0  0  0  0  0  0
##   201   0  0  0  0  0  2  0  0  0  0  0  0  0  0
##   207   0  0  0  1  0  2  1  0  0  0  0  0  0  0
##   208   0  0  0  3  0  1  0  0  0  0  0  0  0  0
##   212   0  0  0  0  1  0  0  0  0  0  0  0  0  0
##   213   0  0  0  2  0  0  0  0  0  0  0  0  0  0
##   214   0  0  0  2  0  1  0  0  0  0  0  0  0  0
##   215   0  0  0  0  0  1  0  0  0  0  0  0  0  0
##   218   0  0  0  1  0  1  0  2  0  1  0  0  0  0
##   225   0  0  0  1  0  3  0  0  0  0  0  0  0  0
##   230   0  1  1  5  0  6  0  2  0  0  0  0  0  0
##   231   0  2  0  3  3  1  1  0  0  1  0  0  0  0
##   247   0  0  0  0  0  1  0  0  0  0  0  0  0  0
##   253   0  0  1  5  0  0  0  0  0  0  0  0  0  0
##   259   0  0  0  0  0  1  0  0  0  0  0  0  0  0
##   265   0  0  0  0  0  1  0  0  0  0  0  0  0  0
##   277   0  0  0  1  0  0  0  0  0  0  0  0  0  0
##   278   0  0  0  1  0  0  0  0  0  0  0  0  0  0
##   287   0  2  0  2  0  2  0  1  0  2  0  0  0  0
##   288   0  0  0  0  0  0  0  1  0  0  0  1  0  0
##   290   0  0  0  0  0  0  0  1  0  0  0  0  0  0
##   300   0  0  0  0  0  1  0  0  0  0  0  0  0  0
##   305   0  0  0  0  0  0  0  1  0  0  0  0  0  0
##   311   0  0  0  0  0  0  0  2  0  0  0  0  0  0
##   316   0  0  0  0  0  1  0  0  0  0  0  0  0  0
##   317   0  0  0  0  1  0  0  0  0  0  0  0  0  0
##   322   0  0  0  0  0  0  0  1  0  0  0  0  0  0
##   330   0  0  0  0  0  0  0  1  0  0  0  0  0  0
##   331   0  0  0  0  0  1  0  0  0  0  0  0  0  0
##   333   0  0  0  0  0  0  0  1  0  0  0  0  0  0
##   345   0  0  1  1  0  3  1  3  1  2  0  0  1  0
##   346   0  0  0  1  0  1  0  0  0  1  0  0  0  0
##   356   0  0  0  0  0  1  0  0  0  0  0  0  0  0
##   363   0  0  0  0  1  0  0  0  0  0  0  0  0  0
##   368   0  0  0  0  0  0  0  1  0  0  0  0  0  0
##   369   0  0  0  0  0  1  1  0  0  0  0  0  0  0
##   374   0  0  0  1  0  1  0  0  0  0  0  0  0  0
##   379   0  0  0  1  0  0  0  0  0  0  0  0  0  0
##   391   0  0  0  0  0  1  0  0  1  0  0  0  0  0
##   403   0  1  0  3  0  4  0  0  0  0  0  0  0  0
##   404   0  0  0  0  0  0  0  0  0  1  0  0  0  0
##   411   0  0  0  0  0  0  0  1  0  0  0  0  0  0
##   426   0  0  0  0  1  0  0  0  0  1  0  0  0  0
##   432   0  0  0  0  0  1  0  0  0  0  0  0  0  0
##   438   0  0  0  0  0  0  0  2  0  0  0  0  0  0
##   443   0  0  0  0  0  0  0  1  0  0  0  0  1  0
##   449   0  1  0  0  0  0  0  0  0  0  0  0  0  0
##   460   0  1  0  0  0  2  1  1  0  0  0  0  0  0
##   461   0  0  0  0  0  0  0  1  0  0  0  0  0  0
##   483   0  0  0  0  0  0  1  0  0  0  0  0  0  0
##   490   0  0  0  0  0  1  0  0  0  0  0  0  0  0
##   509   0  0  0  1  0  0  0  0  0  0  0  0  0  0
##   515   0  0  0  0  0  1  0  0  0  0  0  0  0  0
##   518   0  0  1  2  0  0  0  0  0  0  0  0  0  0
##   576   0  1  1  0  0  3  0  0  1  0  0  1  0  0
##   577   0  0  0  0  1  0  0  0  0  0  0  0  0  0
##   599   0  0  0  0  0  0  0  0  0  1  0  0  0  0
##   610   0  0  0  0  0  1  0  0  0  0  0  0  0  0
##   611   0  1  0  0  0  0  0  0  0  0  0  0  0  0
##   633   0  0  0  0  0  1  0  0  0  0  0  0  0  0
##   645   0  0  0  0  0  0  0  1  0  0  0  0  0  0
##   656   0  0  0  0  0  0  0  0  0  1  0  0  0  0
##   683   0  0  0  0  0  0  0  1  0  0  0  0  0  0
##   691   0  0  0  1  0  0  1  0  0  0  0  1  0  1
##   724   0  0  0  0  0  0  0  0  0  0  0  1  0  0
##   749   0  0  0  0  0  1  0  1  0  0  0  0  0  0
##   760   0  0  0  0  0  1  0  0  0  0  0  0  0  0
##   773   0  0  0  1  0  0  0  0  0  0  0  0  0  0
##   800   0  0  0  0  0  0  0  1  0  0  0  0  0  0
##   805   0  0  0  0  0  0  1  0  0  0  0  0  0  0
##   806   0  0  0  1  0  1  0  0  0  0  0  0  0  0
##   822   0  0  0  0  0  0  0  0  0  0  0  1  0  0
##   823   0  0  0  0  0  0  0  0  0  0  0  0  0  1
##   863   0  0  0  0  0  0  0  0  0  0  0  0  1  0
##   864   0  1  0  0  0  0  0  0  0  0  0  0  0  0
##   876   0  0  0  0  0  0  0  1  0  0  0  0  0  0
##   921   0  0  0  0  0  0  0  1  0  0  0  0  0  0
##   979   0  0  0  1  0  0  0  0  0  0  0  1  0  0
##   980   0  0  0  0  1  0  0  0  0  0  0  0  0  0
##   1035  0  0  0  0  0  0  0  0  0  1  0  0  0  0
##   1036  0  0  0  0  0  1  0  1  0  0  0  0  0  0
##   1152  0  0  0  0  0  0  0  0  0  0  0  1  0  0
##   1261  0  0  0  0  0  0  0  0  0  0  1  0  0  0
##   1382  0  0  0  1  0  0  0  0  0  0  0  0  0  0
##   1498  0  0  0  0  0  0  0  0  0  1  0  0  0  0
##   1612  0  1  0  0  0  0  0  0  0  0  0  0  0  0
##   1727  0  0  0  0  0  0  0  0  0  0  1  0  0  0
##   2056  0  0  0  0  0  0  0  0  0  1  0  0  0  0
##   2073  0  0  0  0  0  0  0  1  0  0  0  0  0  0
##   2303  0  0  0  0  0  1  0  0  0  0  0  0  0  0
##   3283  0  0  0  1  0  0  0  0  0  0  0  0  0  0
##   4607  0  0  0  0  1  0  0  0  0  0  0  0  0  0
##   9502  0  0  0  0  0  0  0  1  0  0  0  0  0  0
mytable1<- xtabs(~price+minstay, data=hotel.df)
mytable1
##       minstay
## price   1  2  3  4  5  6  7  8  9 10 12 14 15
##   23    1  2  0  0  0  0  0  0  0  0  0  0  0
##   29    3  0  1  0  0  0  0  0  0  0  0  0  0
##   30    1  0  0  0  0  0  0  0  0  0  0  0  0
##   31    0  1  0  0  0  0  1  0  0  0  0  0  0
##   32    1  2  1  0  0  0  0  0  0  0  0  0  0
##   33    1  0  0  0  0  0  0  0  0  0  0  0  0
##   34    0  2  0  0  0  0  0  0  0  0  0  0  0
##   35    4  1  0  0  0  1  0  0  0  0  0  0  0
##   36    1  0  0  0  0  0  0  0  0  0  0  0  0
##   37    0  1  0  0  0  0  0  0  0  0  0  0  0
##   38    1  0  0  0  0  0  0  0  0  0  0  0  0
##   39    0  0  0  1  0  0  0  0  0  0  0  0  0
##   40    5  3  2  0  1  0  1  0  0  0  0  0  0
##   41    0  0  0  0  0  0  1  0  0  0  1  0  0
##   43    1  1  1  0  0  0  0  0  1  0  0  0  0
##   45    2  3  3  0  0  0  0  0  0  0  0  0  0
##   46    6  4  1  0  2  0  1  0  0  0  0  0  0
##   47    1  0  0  1  0  0  1  0  0  0  0  0  0
##   48    2  0  2  0  0  0  1  0  0  0  0  0  0
##   49    1  0  2  0  1  1  1  0  0  0  0  0  1
##   50    1  0  1  0  0  0  0  0  0  0  0  0  0
##   52    5  1  4  0  1  0  3  0  0  0  0  0  0
##   53    2  0  0  2  0  0  0  0  0  0  0  0  0
##   55    0  0  0  1  0  0  0  0  0  0  0  0  0
##   56    3  0  2  0  0  0  0  0  0  0  0  0  0
##   57    5  2  2  0  1  1  1  0  0  0  0  0  0
##   58   11 12  7  3  2  0  6  0  0  0  0  1  0
##   59    2  1  0  0  0  0  0  0  0  0  0  0  0
##   60    2  0  1  1  0  0  0  0  0  0  0  1  0
##   61    1  1  1  0  0  0  1  0  0  0  0  0  0
##   62    1  0  1  1  1  0  0  0  0  0  0  0  0
##   63    2  1  4  0  1  0  3  0  0  0  0  0  0
##   64    1  0  2  1  0  0  1  0  0  0  0  0  0
##   65    0  0  0  1  1  0  1  0  0  0  0  0  0
##   66    1  0  1  1  1  0  0  0  0  0  0  0  0
##   67    0  3  1  1  0  0  1  0  0  0  0  0  0
##   68    0  3  0  0  2  0  0  0  0  0  0  1  0
##   69   12  6  9  5  2  1  2  0  0  0  0  0  0
##   70    1  0  0  1  0  0  0  0  0  0  0  0  0
##   71    2  2  2  0  0  0  0  0  0  0  0  0  0
##   72    2  0  0  0  1  0  0  0  0  0  0  0  0
##   74    2  0  2  1  1  0  0  0  0  0  0  0  0
##   75    3  5  3  1  0  0  0  0  0  0  0  0  0
##   76    1  0  2  0  0  0  0  0  0  0  0  0  0
##   77    0  1  0  0  0  0  0  0  0  0  0  0  0
##   78    0  1  0  0  0  0  1  0  0  0  0  0  0
##   79    3  1  0  0  0  0  1  0  0  0  0  0  0
##   80    7  4 10  4  4  1  3  0  0  0  0  0  0
##   81    1  0  0  0  1  0  0  0  0  0  0  0  0
##   83    1  1  0  0  0  0  0  0  0  0  0  0  0
##   84    0  0  0  0  1  0  0  0  0  0  0  0  0
##   85    1  2  1  0  0  0  1  0  0  0  0  0  0
##   87    6  4  3  2  7  0  2  0  0  0  0  0  0
##   89    1  1  1  0  0  0  0  0  0  0  0  0  0
##   90    2  2  0  1  0  0  0  0  0  0  0  0  0
##   91    2  1  5  1  2  0  1  0  0  0  0  0  0
##   92    6 10 12  3  5  3  4  0  0  1  0  0  0
##   93    2  3  5  2  0  0  2  0  0  0  0  0  0
##   94    1  1  0  0  0  0  0  0  0  0  0  0  0
##   96    0  0  0  1  0  0  0  0  0  0  0  0  0
##   97    0  0  0  0  0  0  1  0  0  0  0  0  0
##   98    4  7  3  1  1  2  1  0  0  0  0  0  0
##   99    0  0  0  1  0  0  0  0  0  0  0  0  0
##   101   0  0  0  0  0  0  1  0  0  0  0  0  0
##   102   0  1  2  1  1  1  0  0  0  0  0  0  0
##   103   2  4  3  1  2  1  1  1  0  0  0  0  0
##   104  10  2  7  1  1  1  2  0  0  0  0  0  0
##   105   0  0  0  1  0  0  0  0  0  0  0  0  0
##   106   0  1  0  0  0  0  0  0  0  0  0  0  0
##   107   1  0  1  0  0  1  0  0  0  0  0  0  0
##   108   1  0  0  0  0  1  1  0  0  0  0  0  0
##   109   3  0  0  1  0  1  2  0  0  0  0  0  0
##   110   0  0  0  1  0  0  0  0  0  0  0  0  0
##   111   0  0  1  0  0  0  0  0  0  0  0  0  0
##   112   1  0  0  0  0  0  0  0  0  0  0  0  0
##   113   1  0  0  0  1  1  1  0  0  0  0  0  0
##   114   1  3  3  4  1  1  1  0  0  0  0  0  0
##   115   9  9  7  5  1  4  3  0  0  0  0  0  0
##   117   0  0  0  0  1  0  0  0  0  0  0  0  0
##   119   0  0  1  1  0  0  0  0  0  0  0  0  0
##   121   1  1  2  0  0  0  0  0  0  0  0  0  0
##   123   0  0  1  0  0  0  0  0  0  0  0  0  0
##   125   0  1  0  0  0  0  2  0  0  0  0  0  0
##   126   1  2  0  0  1  0  0  0  0  0  0  0  0
##   127   3  4  4  0  2  0  3  0  0  0  0  0  0
##   129   0  0  0  0  0  0  1  0  0  0  0  0  0
##   130   0  0  1  0  0  0  0  0  0  0  0  0  0
##   131   0  1  0  0  0  0  0  0  0  0  0  0  0
##   132   0  0  1  0  0  0  2  0  0  0  0  0  0
##   133   0  0  1  0  1  0  0  0  0  0  0  0  0
##   136   0  0  1  0  0  0  0  0  0  0  0  0  0
##   137   3  0  0  0  0  0  0  0  0  0  0  0  0
##   138   5  6  5  1  1  1  1  0  0  0  0  0  0
##   139   1  0  0  1  0  0  0  0  0  0  0  0  0
##   140   0  0  0  0  0  0  1  0  0  0  0  0  0
##   143   0  0  0  1  0  0  0  0  0  0  0  0  0
##   144   0  0  1  1  1  1  0  0  0  0  0  0  0
##   145   0  0  0  1  0  0  0  0  0  0  0  0  0
##   148   1  0  0  0  0  0  1  0  0  0  0  0  0
##   149   1  2  6  1  3  0  2  0  0  0  0  0  0
##   150   1  0  2  0  1  0  0  0  0  0  0  0  0
##   153   0  1  1  0  0  0  0  0  0  0  0  0  0
##   156   0  0  0  2  1  0  0  0  0  0  0  0  0
##   160   0  0  0  1  0  0  1  0  0  0  0  0  0
##   161   0  0  1  0  0  1  0  0  0  0  0  0  0
##   162   2  1  1  1  2  0  0  0  0  0  0  0  0
##   164   0  0  0  1  0  0  0  0  0  0  0  0  0
##   165   0  0  1  0  0  0  0  0  0  0  0  0  0
##   167   1  0  2  0  0  0  2  0  0  0  0  0  0
##   168   1  0  0  0  0  0  0  0  0  0  0  0  0
##   171   2  0  1  0  0  0  2  0  0  0  0  0  0
##   172   1  0  0  1  2  1  1  0  0  0  0  0  0
##   173   8  5  6  3  1  1  2  0  0  0  0  0  0
##   180   0  1  0  0  0  0  0  0  0  0  0  0  0
##   183   0  0  0  1  1  0  0  0  0  0  0  0  0
##   184   1  1  2  2  1  1  2  0  0  0  0  0  0
##   190   0  0  0  0  0  0  1  0  0  0  0  0  0
##   196   0  1  2  0  1  1  1  0  0  0  0  0  0
##   197   0  0  0  1  0  0  0  0  0  0  0  0  0
##   201   0  0  1  0  0  0  0  0  0  0  0  0  0
##   207   0  2  0  0  0  1  0  0  0  0  0  0  0
##   208   0  1  1  1  1  0  0  0  0  0  0  0  0
##   212   0  0  0  0  0  0  1  0  0  0  0  0  0
##   213   0  1  1  0  0  0  0  0  0  0  0  0  0
##   214   2  0  0  1  0  0  0  0  0  0  0  0  0
##   215   1  0  0  0  0  0  0  0  0  0  0  0  0
##   218   1  1  1  0  1  0  1  0  0  0  0  0  0
##   225   1  0  1  2  0  0  0  0  0  0  0  0  0
##   230   2  2  2  4  1  1  1  0  0  0  0  0  0
##   231   3  1  0  4  1  1  0  0  0  0  0  0  0
##   253   3  0  1  0  0  0  2  0  0  0  0  0  0
##   259   1  0  0  0  0  0  0  0  0  0  0  0  0
##   265   0  1  0  0  0  0  0  0  0  0  0  0  0
##   277   0  0  0  1  0  0  0  0  0  0  0  0  0
##   287   0  2  3  1  0  0  2  0  0  0  0  0  0
##   288   0  1  0  0  0  0  0  0  0  0  0  0  0
##   290   1  0  0  0  0  0  0  0  0  0  0  0  0
##   300   0  0  0  0  0  0  1  0  0  0  0  0  0
##   305   0  0  1  0  0  0  0  0  0  0  0  0  0
##   311   0  0  0  0  0  0  2  0  0  0  0  0  0
##   316   0  0  0  1  0  0  0  0  0  0  0  0  0
##   317   0  0  0  0  1  0  0  0  0  0  0  0  0
##   322   0  0  0  0  0  0  1  0  0  0  0  0  0
##   330   0  0  0  1  0  0  0  0  0  0  0  0  0
##   331   0  0  0  1  0  0  0  0  0  0  0  0  0
##   333   0  0  0  1  0  0  0  0  0  0  0  0  0
##   345   0  0  3  1  2  2  3  0  0  1  0  1  0
##   346   1  1  0  0  0  0  1  0  0  0  0  0  0
##   356   0  0  0  0  1  0  0  0  0  0  0  0  0
##   363   0  0  0  0  0  0  1  0  0  0  0  0  0
##   368   0  0  1  0  0  0  0  0  0  0  0  0  0
##   369   0  0  0  0  2  0  0  0  0  0  0  0  0
##   374   1  0  0  1  0  0  0  0  0  0  0  0  0
##   379   1  0  0  0  0  0  0  0  0  0  0  0  0
##   391   1  0  0  0  0  0  0  0  0  0  0  1  0
##   403   1  0  3  0  1  1  2  0  0  0  0  0  0
##   426   0  0  1  0  0  0  1  0  0  0  0  0  0
##   432   0  0  1  0  0  0  0  0  0  0  0  0  0
##   438   0  0  1  0  0  0  1  0  0  0  0  0  0
##   443   0  0  1  0  0  0  1  0  0  0  0  0  0
##   449   1  0  0  0  0  0  0  0  0  0  0  0  0
##   460   0  1  1  0  0  0  3  0  0  0  0  0  0
##   461   0  0  0  0  0  0  1  0  0  0  0  0  0
##   483   0  0  0  0  0  0  1  0  0  0  0  0  0
##   490   0  1  0  0  0  0  0  0  0  0  0  0  0
##   509   1  0  0  0  0  0  0  0  0  0  0  0  0
##   515   0  0  0  0  0  0  0  1  0  0  0  0  0
##   518   0  0  1  0  1  0  1  0  0  0  0  0  0
##   576   0  0  0  2  1  0  3  0  0  0  0  0  0
##   577   0  0  0  1  0  0  0  0  0  0  0  0  0
##   599   0  0  0  1  0  0  0  0  0  0  0  0  0
##   610   0  0  0  0  0  0  1  0  0  0  0  0  0
##   611   0  0  0  1  0  0  0  0  0  0  0  0  0
##   633   0  0  1  0  0  0  0  0  0  0  0  0  0
##   645   0  0  0  0  0  0  1  0  0  0  0  0  0
##   656   0  0  0  0  0  0  1  0  0  0  0  0  0
##   683   0  0  0  0  0  0  1  0  0  0  0  0  0
##   691   1  0  1  0  1  0  1  0  0  0  0  0  0
##   724   0  0  0  0  0  0  1  0  0  0  0  0  0
##   749   0  0  0  0  1  0  1  0  0  0  0  0  0
##   760   0  0  0  0  0  0  1  0  0  0  0  0  0
##   773   0  0  0  0  0  0  1  0  0  0  0  0  0
##   800   0  0  0  0  0  0  0  0  0  0  0  1  0
##   805   0  0  0  0  1  0  0  0  0  0  0  0  0
##   806   1  0  0  0  0  0  1  0  0  0  0  0  0
##   822   0  0  0  0  0  0  1  0  0  0  0  0  0
##   823   0  0  0  0  0  0  1  0  0  0  0  0  0
##   863   0  0  1  0  0  0  0  0  0  0  0  0  0
##   864   0  0  0  0  0  0  1  0  0  0  0  0  0
##   876   0  0  0  0  0  0  1  0  0  0  0  0  0
##   921   1  0  0  0  0  0  0  0  0  0  0  0  0
##   979   0  0  1  0  1  0  0  0  0  0  0  0  0
##   980   0  0  1  0  0  0  0  0  0  0  0  0  0
##   1035  0  0  0  0  0  0  1  0  0  0  0  0  0
##   1036  0  0  0  0  0  0  0  0  0  0  1  0  0
##   1152  0  0  0  1  0  0  0  0  0  0  0  0  0
##   1261  0  0  0  0  0  0  1  0  0  0  0  0  0
##   1382  1  0  0  0  0  0  0  0  0  0  0  0  0
##   1498  0  0  0  0  0  0  1  0  0  0  0  0  0
##   1612  1  0  0  0  0  0  0  0  0  0  0  0  0
##   1727  0  0  0  0  0  0  1  0  0  0  0  0  0
##   2056  0  0  0  0  0  0  1  0  0  0  0  0  0
##   2073  0  0  0  0  0  0  0  0  0  0  0  1  0
##   2303  0  0  0  0  0  0  1  0  0  0  0  0  0
##   3283  1  0  0  0  0  0  0  0  0  0  0  0  0
##   4607  1  0  0  0  0  0  0  0  0  0  0  0  0
##   9502  1  0  0  0  0  0  0  0  0  0  0  0  0
mytable1<-xtabs(~price+overall_satisfaction, data=hotel.df)
mytable1
##      overall_satisfaction
## price  2  3 3.5  4 4.5  5
##   23   0  0   1  0   1  1
##   29   0  0   0  2   0  0
##   30   0  0   0  1   0  0
##   31   0  0   0  0   2  0
##   32   0  0   0  2   1  0
##   33   0  0   0  0   1  0
##   34   0  0   0  0   1  0
##   35   0  0   0  0   4  0
##   36   0  0   0  0   0  1
##   37   0  0   1  0   0  0
##   38   0  0   0  0   1  1
##   40   0  0   0  3   4  1
##   41   0  0   0  0   1  0
##   43   0  0   0  1   1  0
##   45   0  0   0  0   1  2
##   46   0  0   1  0   8  2
##   47   0  0   0  0   2  0
##   48   0  0   0  1   3  0
##   49   0  0   1  1   2  0
##   50   0  0   0  1   0  1
##   52   0  0   0  1   4  2
##   53   0  0   0  1   1  0
##   55   0  0   0  0   1  0
##   56   0  0   0  1   1  0
##   57   0  0   0  0   5  3
##   58   0  0   1  1  13 11
##   59   0  0   0  0   1  0
##   60   0  0   0  0   1  1
##   61   0  0   0  1   1  0
##   62   0  0   0  1   2  0
##   63   0  0   1  2   4  2
##   64   0  0   0  0   1  1
##   65   0  0   0  1   1  0
##   66   0  0   0  1   3  0
##   67   0  0   0  0   1  2
##   68   0  0   0  1   3  3
##   69   0  0   0  4  10  5
##   70   0  0   0  0   1  0
##   71   0  0   0  1   1  1
##   72   0  0   0  0   1  0
##   74   0  0   0  1   0  2
##   75   0  0   0  0   6  4
##   79   0  0   0  0   1  1
##   80   0  0   0  0   7  9
##   83   0  0   0  0   2  0
##   84   0  0   0  0   1  0
##   85   0  0   0  0   2  1
##   87   0  0   1  0   1  8
##   89   0  0   0  0   0  1
##   90   1  1   0  0   0  0
##   91   0  0   0  0   5  2
##   92   0  0   0  2  13  8
##   93   0  0   1  1   4  4
##   94   0  0   0  0   1  0
##   98   0  0   0  1   8  4
##   101  0  0   0  0   1  0
##   102  0  0   0  1   4  0
##   103  0  0   0  0   0  7
##   104  0  0   1  1   5  4
##   106  0  0   0  0   1  1
##   107  0  0   1  0   1  0
##   109  0  0   0  0   1  1
##   110  0  0   0  0   1  0
##   113  0  0   1  0   0  1
##   114  0  0   0  0   5  1
##   115  0  0   0  0   9  5
##   117  0  0   0  0   0  1
##   119  0  0   0  0   1  0
##   121  0  0   0  0   0  1
##   123  0  0   0  0   0  1
##   127  0  0   0  2   2  3
##   130  0  0   0  0   1  0
##   132  0  0   0  0   0  1
##   133  0  0   0  2   0  0
##   138  0  0   0  1   5  4
##   139  0  0   0  0   2  0
##   145  0  0   0  0   0  1
##   149  0  0   0  1   3  4
##   150  0  0   1  0   0  0
##   153  0  0   0  1   0  1
##   156  0  0   0  0   1  0
##   161  0  0   0  0   0  1
##   162  0  0   0  1   4  2
##   167  0  0   0  0   1  0
##   173  0  0   0  3   2  3
##   184  0  0   0  0   0  2
##   185  0  0   0  0   1  0
##   190  0  0   1  0   0  0
##   196  0  0   0  0   2  1
##   207  0  0   0  0   0  1
##   208  0  0   0  0   0  1
##   218  0  0   0  0   1  0
##   225  0  0   0  0   1  1
##   230  0  0   0  1   2  0
##   231  0  0   0  0   1  1
##   253  0  0   0  0   1  1
##   265  0  0   0  0   0  1
##   277  0  0   0  0   0  1
##   287  0  0   1  0   0  2
##   288  0  0   0  0   0  1
##   300  0  0   0  1   0  0
##   305  0  0   0  0   1  0
##   330  0  0   0  0   0  1
##   345  0  0   0  0   2  0
##   346  0  0   0  0   0  2
##   369  0  0   0  0   1  0
##   403  0  0   0  1   0  2
##   404  0  0   0  0   1  0
##   432  0  0   0  0   0  1
##   443  0  0   0  0   0  1
##   518  0  0   0  0   0  1
##   576  0  0   0  0   0  2
##   599  0  0   0  0   0  1
##   749  0  0   0  0   0  1
##   863  0  0   0  0   0  1
##   980  0  0   0  0   1  0

5- Draw a boxplot that belongs to your study

boxplot(hotel.df$price, xlab="price", ylab="", main="PRICE OF ROOMS", horizontal=TRUE)

boxplot(hotel.df$price~ hotel.df$bedrooms, xlab="price", ylab="No. of bedrooms", main="PRICE OF ROOMS", horizontal=TRUE, col=c("red", "blue", "green"))

boxplot(hotel.df$price~ hotel.df$reviews, xlab="price", ylab="Reviews", main="PRICE OF ROOMS", horizontal=TRUE, col=c("red", "blue", "green"))

boxplot(hotel.df$price~ hotel.df$overall_satisfaction, xlab="price", ylab="Overall Satisfaction", main="PRICE OF ROOMS", horizontal=TRUE, col=c("red", "blue", "green"))

boxplot(hotel.df$price~ hotel.df$accommodates, xlab="price", ylab="Accomodations", main="PRICE OF ROOMS", horizontal=TRUE, col=c("red", "blue", "green"))

6- Draw histogram for your suitable data fields

hist(hotel.df$price, main="PRICE FREQUENCY",xlab = "price of rooms",breaks = 25, xlim= c(0,3000), col="green")

7- Draw suitable plot for your data analysis.

plot(x= hotel.df$price, y=hotel.df$bedrooms, col="blue", main="bedrooms v/s price", xlab = "price", ylab = "number of bedrooms")

plot(x= hotel.df$price, y=hotel.df$overall_satisfaction, col="blue", main="overall satisfaction v/s price", xlab = "price", ylab = "Overall Satisfaction")

plot(x= hotel.df$price, y=hotel.df$minstay, col="blue", main="minstay v/s price", xlab = "price", ylab = "Minstay")

8- Create a correlation matrix

new_data<- hotel.df[,6:11]
r=cor(new_data)
r
##                          reviews overall_satisfaction accommodates
## reviews               1.00000000                   NA   -0.1539512
## overall_satisfaction          NA                    1           NA
## accommodates         -0.15395117                   NA    1.0000000
## bedrooms                      NA                   NA           NA
## price                -0.09723858                   NA    0.3146828
## minstay                       NA                   NA           NA
##                      bedrooms       price minstay
## reviews                    NA -0.09723858      NA
## overall_satisfaction       NA          NA      NA
## accommodates               NA  0.31468282      NA
## bedrooms                    1          NA      NA
## price                      NA  1.00000000      NA
## minstay                    NA          NA       1

9- Visualize your correlation matrix using corrgram

library(corrgram)
corrgram(hotel.df, order = T, text.panel=panel.txt,
         lower.panel = panel.shade,
         upper.panel = panel.pie, main="Corrgram of all variables")

10- Create a scatterplot matrix for your dataset

library(car)
scatterplotMatrix(formula=~host_id+reviews+overall_satisfaction+price,cex=0.6,data = hotel.df,diagonal="histogram")

11- Run a suitable test to check your hypothesis for your suitable

Null Hypothesis - There is no correlation between the price and minstay

cor.test(hotel.df$price,hotel.df$minstay)
## 
##  Pearson's product-moment correlation
## 
## data:  hotel.df$price and hotel.df$minstay
## t = 3.1192, df = 933, p-value = 0.001869
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.03772307 0.16463048
## sample estimates:
##       cor 
## 0.1015901

Since p<0.05 hence we reject the null hypothesis.

Null Hypothesis - There is no correlation between the price and overall satisfaction

cor.test(hotel.df$price,hotel.df$overall_satisfaction)
## 
##  Pearson's product-moment correlation
## 
## data:  hotel.df$price and hotel.df$overall_satisfaction
## t = 3.0573, df = 421, p-value = 0.002375
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.05277439 0.23936118
## sample estimates:
##       cor 
## 0.1473787

Since p>0.05 hence we accept the null hypothesis.

Null Hypothesis - There is no correlation between the price and reviews

cor.test(hotel.df$price,hotel.df$reviews)
## 
##  Pearson's product-moment correlation
## 
## data:  hotel.df$price and hotel.df$reviews
## t = -3.085, df = 997, p-value = 0.002092
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.15830792 -0.03542814
## sample estimates:
##         cor 
## -0.09723858

Since p>0.05 hence we accept the null hypothesis.

Null Hypothesis - There is no correlation between the price and bedrooms

cor.test(hotel.df$price,hotel.df$bedrooms)
## 
##  Pearson's product-moment correlation
## 
## data:  hotel.df$price and hotel.df$bedrooms
## t = 12.649, df = 994, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.3175707 0.4246391
## sample estimates:
##       cor 
## 0.3723431

Since p<0.05 hence we reject the null hypothesis.

Null Hypothesis - There is no correlation between the price and accommodates

cor.test(hotel.df$price,hotel.df$accommodates)
## 
##  Pearson's product-moment correlation
## 
## data:  hotel.df$price and hotel.df$accommodates
## t = 10.468, df = 997, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.2576882 0.3694952
## sample estimates:
##       cor 
## 0.3146828

Since p<0.05 hence we reject the null hypothesis.

12- Run a t-test to analyse your hypothesis

t.test(hotel.df$price,hotel.df$minstay)
## 
##  Welch Two Sample t-test
## 
## data:  hotel.df$price and hotel.df$minstay
## t = 14.133, df = 998.07, p-value < 2.2e-16
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  155.0829 205.0945
## sample estimates:
##  mean of x  mean of y 
## 183.547548   3.458824
t.test(hotel.df$price,hotel.df$overall_satisfaction)
## 
##  Welch Two Sample t-test
## 
## data:  hotel.df$price and hotel.df$overall_satisfaction
## t = 14.045, df = 998, p-value < 2.2e-16
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  153.9618 203.9726
## sample estimates:
##  mean of x  mean of y 
## 183.547548   4.580378
t.test(hotel.df$price,hotel.df$reviews)
## 
##  Welch Two Sample t-test
## 
## data:  hotel.df$price and hotel.df$reviews
## t = 13.89, df = 1000.5, p-value < 2.2e-16
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  152.0863 202.1279
## sample estimates:
## mean of x mean of y 
## 183.54755   6.44044
t.test(hotel.df$price,hotel.df$bedrooms)
## 
##  Welch Two Sample t-test
## 
## data:  hotel.df$price and hotel.df$bedrooms
## t = 14.287, df = 998.02, p-value < 2.2e-16
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  157.0461 207.0570
## sample estimates:
##  mean of x  mean of y 
## 183.547548   1.495984
t.test(hotel.df$price,hotel.df$accommodates)
## 
##  Welch Two Sample t-test
## 
## data:  hotel.df$price and hotel.df$accommodates
## t = 14.077, df = 998.06, p-value < 2.2e-16
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  154.3747 204.3861
## sample estimates:
##  mean of x  mean of y 
## 183.547548   4.167167

13-## Regression Model

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

\[Price= \alpha_0 + \alpha_1 overall_satisfaction + \alpha_2 reviews + \alpha_3 minstay +\alpha_4 bedrooms +\alpha_5 accomodates + \epsilon\]

# Read the data
setwd("C:/Users/SURABHI/Desktop/IIM INTERNSHIP")
hotel <- read.csv(paste("Airnb dataset.csv", sep=""), stringsAsFactors=FALSE)
attach(hotel)
# OLS Model
M1 <- lm(price~overall_satisfaction+reviews+minstay+bedrooms+accommodates, data=hotel)
summary(M1)
## 
## Call:
## lm(formula = price ~ overall_satisfaction + reviews + minstay + 
##     bedrooms + accommodates, data = hotel)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -127.25  -36.14  -13.14   25.87  818.28 
## 
## Coefficients:
##                      Estimate Std. Error t value Pr(>|t|)    
## (Intercept)          -79.7084    45.4598  -1.753  0.08032 .  
## overall_satisfaction  17.4767     9.6566   1.810  0.07109 .  
## reviews               -0.3589     0.2069  -1.735  0.08348 .  
## minstay                5.5889     2.2877   2.443  0.01501 *  
## bedrooms              49.7168     6.4359   7.725 9.46e-14 ***
## accommodates           9.5318     3.5190   2.709  0.00705 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 77.04 on 392 degrees of freedom
##   (601 observations deleted due to missingness)
## Multiple R-squared:  0.4807, Adjusted R-squared:  0.4741 
## F-statistic: 72.58 on 5 and 392 DF,  p-value: < 2.2e-16