The purpose of this analysis is to determine what factors explain the difference in price between an economy ticket and a premium-economy airline ticket.
summary(airlines)
## Airline Aircraft FlightDuration TravelMonth
## AirFrance: 74 AirBus:151 Min. : 1.250 Aug:127
## British :175 Boeing:307 1st Qu.: 4.260 Jul: 75
## Delta : 46 Median : 7.790 Oct:127
## Jet : 61 Mean : 7.578 Sep:129
## Singapore: 40 3rd Qu.:10.620
## Virgin : 62 Max. :14.660
## IsInternational SeatsEconomy SeatsPremium PitchEconomy
## Domestic : 40 Min. : 78.0 Min. : 8.00 Min. :30.00
## International:418 1st Qu.:133.0 1st Qu.:21.00 1st Qu.:31.00
## Median :185.0 Median :36.00 Median :31.00
## Mean :202.3 Mean :33.65 Mean :31.22
## 3rd Qu.:243.0 3rd Qu.:40.00 3rd Qu.:32.00
## Max. :389.0 Max. :66.00 Max. :33.00
## PitchPremium WidthEconomy WidthPremium PriceEconomy
## Min. :34.00 Min. :17.00 Min. :17.00 Min. : 65
## 1st Qu.:38.00 1st Qu.:18.00 1st Qu.:19.00 1st Qu.: 413
## Median :38.00 Median :18.00 Median :19.00 Median :1242
## Mean :37.91 Mean :17.84 Mean :19.47 Mean :1327
## 3rd Qu.:38.00 3rd Qu.:18.00 3rd Qu.:21.00 3rd Qu.:1909
## Max. :40.00 Max. :19.00 Max. :21.00 Max. :3593
## PricePremium PriceRelative SeatsTotal PitchDifference
## Min. : 86.0 Min. :0.0200 Min. : 98 Min. : 2.000
## 1st Qu.: 528.8 1st Qu.:0.1000 1st Qu.:166 1st Qu.: 6.000
## Median :1737.0 Median :0.3650 Median :227 Median : 7.000
## Mean :1845.3 Mean :0.4872 Mean :236 Mean : 6.688
## 3rd Qu.:2989.0 3rd Qu.:0.7400 3rd Qu.:279 3rd Qu.: 7.000
## Max. :7414.0 Max. :1.8900 Max. :441 Max. :10.000
## WidthDifference PercentPremiumSeats
## Min. :0.000 Min. : 4.71
## 1st Qu.:1.000 1st Qu.:12.28
## Median :1.000 Median :13.21
## Mean :1.633 Mean :14.65
## 3rd Qu.:3.000 3rd Qu.:15.36
## Max. :4.000 Max. :24.69
describe(airlines)
## vars n mean sd median trimmed mad min
## Airline* 1 458 3.01 1.65 2.00 2.89 1.48 1.00
## Aircraft* 2 458 1.67 0.47 2.00 1.71 0.00 1.00
## FlightDuration 3 458 7.58 3.54 7.79 7.57 4.81 1.25
## TravelMonth* 4 458 2.56 1.17 3.00 2.58 1.48 1.00
## IsInternational* 5 458 1.91 0.28 2.00 2.00 0.00 1.00
## SeatsEconomy 6 458 202.31 76.37 185.00 194.64 85.99 78.00
## SeatsPremium 7 458 33.65 13.26 36.00 33.35 11.86 8.00
## PitchEconomy 8 458 31.22 0.66 31.00 31.26 0.00 30.00
## PitchPremium 9 458 37.91 1.31 38.00 38.05 0.00 34.00
## WidthEconomy 10 458 17.84 0.56 18.00 17.81 0.00 17.00
## WidthPremium 11 458 19.47 1.10 19.00 19.53 0.00 17.00
## PriceEconomy 12 458 1327.08 988.27 1242.00 1244.40 1159.39 65.00
## PricePremium 13 458 1845.26 1288.14 1737.00 1799.05 1845.84 86.00
## PriceRelative 14 458 0.49 0.45 0.36 0.42 0.41 0.02
## SeatsTotal 15 458 235.96 85.29 227.00 228.73 90.44 98.00
## PitchDifference 16 458 6.69 1.76 7.00 6.76 0.00 2.00
## WidthDifference 17 458 1.63 1.19 1.00 1.53 0.00 0.00
## PercentPremiumSeats 18 458 14.65 4.84 13.21 14.31 2.68 4.71
## max range skew kurtosis se
## Airline* 6.00 5.00 0.61 -0.95 0.08
## Aircraft* 2.00 1.00 -0.72 -1.48 0.02
## FlightDuration 14.66 13.41 -0.07 -1.12 0.17
## TravelMonth* 4.00 3.00 -0.14 -1.46 0.05
## IsInternational* 2.00 1.00 -2.91 6.50 0.01
## SeatsEconomy 389.00 311.00 0.72 -0.36 3.57
## SeatsPremium 66.00 58.00 0.23 -0.46 0.62
## PitchEconomy 33.00 3.00 -0.03 -0.35 0.03
## PitchPremium 40.00 6.00 -1.51 3.52 0.06
## WidthEconomy 19.00 2.00 -0.04 -0.08 0.03
## WidthPremium 21.00 4.00 -0.08 -0.31 0.05
## PriceEconomy 3593.00 3528.00 0.51 -0.88 46.18
## PricePremium 7414.00 7328.00 0.50 0.43 60.19
## PriceRelative 1.89 1.87 1.17 0.72 0.02
## SeatsTotal 441.00 343.00 0.70 -0.53 3.99
## PitchDifference 10.00 8.00 -0.54 1.78 0.08
## WidthDifference 4.00 4.00 0.84 -0.53 0.06
## PercentPremiumSeats 24.69 19.98 0.71 0.28 0.23
par(mfrow=c(1,2))
boxplot(SeatsEconomy~Airline,data=airlines,col=c("yellow","red","blue","green","grey","purple"),main="Economy Seats vs Airlines",ylab="Airlines",xlab="Number of Seats",horizontal=TRUE)
boxplot(SeatsPremium~Airline,data=airlines,col=c("yellow","red","blue","green","grey","purple"),main="Premium Economy Seats vs Airlines",ylab="Airlines",xlab="Number of Seats",horizontal=TRUE)
par(mfrow=c(1,1))
aggregate(airlines$SeatsEconomy,by=list(Airlines=airlines$Airline),median)
## Airlines x
## 1 AirFrance 200
## 2 British 243
## 3 Delta 126
## 4 Jet 138
## 5 Singapore 184
## 6 Virgin 198
aggregate(airlines$SeatsPremium,list(Airlines=airlines$Airline),median)
## Airlines x
## 1 AirFrance 24
## 2 British 40
## 3 Delta 20
## 4 Jet 16
## 5 Singapore 28
## 6 Virgin 38
Its clear from the above plots and tables that the number of Premium economy seats are way less than the economy seats in any given airline.Therefore, number of seats may be a possible contributor to the difference in ticket prices.
cor(airlines[, c(6,7,14)])
## SeatsEconomy SeatsPremium PriceRelative
## SeatsEconomy 1.000000000 0.62505659 0.003956939
## SeatsPremium 0.625056587 1.00000000 -0.097196009
## PriceRelative 0.003956939 -0.09719601 1.000000000
par(mfrow=c(1,3))
plot(airlines$PitchPremium ,airlines$PitchEconomic,cex=0.5, main = "Economic Pitch vs Premium Pitch",ylab = "Economic Pitch",xlab = "Premium Economic Pitch",col="red")
boxplot(airlines$PitchEconomy,col="yellow",main="Economic Seat Pitch",ylab= "Seat Pitch(inches)", xlab="Economic Seats")
boxplot(airlines$PitchPremium,col="green",main="Premium Economic Seat Pitch",ylab="Seat Pitch(inches)",xlab="Premium Economic Seats")
par(mfrow=c(1,1))
The Plot represents the difference in the pitch (in inches) of the the economic and premium economic seats. As is clear the premium economic seat pitches are way longer than that of the corresponding economic seat pitches.
The second plot is a boxplot of The Economic Seat Pitch median and outliers. The median is:
median(airlines$PitchEconomy)
## [1] 31
The third is a boxplot that shows the median of the Premium Economic Seat Pitch.The median is:
median(airlines$PitchPremium)
## [1] 38
From the above analysis, its clear that the Premium Economic Seat Pitch is larger than the Economic Seat Pitch. Thus, pitch may be a possible contributer to the Difference in prices.
cor(airlines[, c(8,9,14)])
## PitchEconomy PitchPremium PriceRelative
## PitchEconomy 1.0000000 -0.5506062 -0.4230220
## PitchPremium -0.5506062 1.0000000 0.4175391
## PriceRelative -0.4230220 0.4175391 1.0000000
par(mfrow=c(1,3))
plot(airlines$WidthPremium ,airlines$WidthEconomic,cex=0.5, main = "Economic Width vs Premium Width",ylab = "Economic Width",xlab = "Premium Economic Width",col="red")
boxplot(airlines$WidthEconomy,col="yellow",main="Economic Seat Width",ylab= "Seat Width(inches)", xlab="Economic Seats")
boxplot(airlines$WidthPremium,col="green",main="Premium Economic Seat Width",ylab="Seat Width(inches)",xlab="Premium Economic Seats")
par(mfrow=c(1,1))
The Plot represents the difference in the width (in inches) of the the economic and premium economic seats. As is clear the premium economic seat width are way longer than that of the corresponding economic seat pitches.
The second plot is a boxplot of The Economic Seat Width median and outliers. The median is:
median(airlines$WidthEconomy)
## [1] 18
The third is a boxplot that shows the median of the Premium Economic Seat Width.The median is:
median(airlines$WidthPremium)
## [1] 19
From the above analysis, its clear that the Premium Economic Seat Width is larger than the Economic Seat Width. Thus, Width may be a possible contributer to the Difference in prices.
cor(airlines[, c(10,11,14)])
## WidthEconomy WidthPremium PriceRelative
## WidthEconomy 1.00000000 0.08191873 -0.04396116
## WidthPremium 0.08191873 1.00000000 0.50424759
## PriceRelative -0.04396116 0.50424759 1.00000000
First lets see the distribution of ticket price among the two categories.
par(mfrow=c(1,2))
hist(airlines$PriceEconomy,breaks = 20,col="grey", main = "Economy Ticket Prices",ylab = "Frequency",xlab = "Ticket Price")
hist(airlines$PricePremium,breaks = 20,col="grey", main = "Premium Economy Ticket Prices",ylab = "Frequency",xlab = "Ticket Price")
par(mfrow=c(1,1))
As is clear from the above two histograms, a Large number of premium economic seats are much more expensive than the economic seats.
For a clear view of it, here’s a plot between the Ticket prices.
plot(airlines$PriceEconomy,airlines$PricePremium,
cex=0.8,main = "Ticket Prices", ylab="Premium Economic Ticket Price",xlab="Economic Ticket Price",col="blue")
abline(h=mean(airlines$PricePremium), col="dark blue", lty="dotted")
abline(v=mean(airlines$PriceEconomy), col="dark blue", lty="dotted")
abline(lm(airlines$PricePremium ~ airlines$PriceEconomy),col="green")
The horizontal line is the mean line of Premium Economic ticket price. The vertical line represents the mean of Economic ticket price. The green line is the best fit line between the two.
Lets also analyse how the prices vary with the month of travel.
First lets check it out for economic seats.
barchart(PriceEconomy ~ TravelMonth, data=airlines,
col=c("gray95", "gray50"),main="Economic Ticket Price",
ylab="Price",xlab="Travel Month")
Now for premium economic seats.
barchart(PricePremium ~ TravelMonth, data=airlines,
col=c("gray95", "gray50"),main="Premium Economic Ticket Price",
ylab="Price",xlab="Travel Month")
A correlation Matrix is a good way to anayle the strength of dependencies.
cor(airlines[,c(6:14,18)])
## SeatsEconomy SeatsPremium PitchEconomy PitchPremium
## SeatsEconomy 1.000000000 0.625056587 0.14412692 0.119221250
## SeatsPremium 0.625056587 1.000000000 -0.03421296 0.004883123
## PitchEconomy 0.144126924 -0.034212963 1.00000000 -0.550606241
## PitchPremium 0.119221250 0.004883123 -0.55060624 1.000000000
## WidthEconomy 0.373670252 0.455782883 0.29448586 -0.023740873
## WidthPremium 0.102431959 -0.002717527 -0.53929285 0.750259029
## PriceEconomy 0.128167220 0.113642176 0.36866123 0.050384550
## PricePremium 0.177000928 0.217612376 0.22614179 0.088539147
## PriceRelative 0.003956939 -0.097196009 -0.42302204 0.417539056
## PercentPremiumSeats -0.330935223 0.485029771 -0.10280880 -0.175487414
## WidthEconomy WidthPremium PriceEconomy PricePremium
## SeatsEconomy 0.37367025 0.102431959 0.12816722 0.17700093
## SeatsPremium 0.45578288 -0.002717527 0.11364218 0.21761238
## PitchEconomy 0.29448586 -0.539292852 0.36866123 0.22614179
## PitchPremium -0.02374087 0.750259029 0.05038455 0.08853915
## WidthEconomy 1.00000000 0.081918728 0.06799061 0.15054837
## WidthPremium 0.08191873 1.000000000 -0.05704522 0.06402004
## PriceEconomy 0.06799061 -0.057045224 1.00000000 0.90138870
## PricePremium 0.15054837 0.064020043 0.90138870 1.00000000
## PriceRelative -0.04396116 0.504247591 -0.28856711 0.03184654
## PercentPremiumSeats 0.22714172 -0.183312058 0.06532232 0.11639097
## PriceRelative PercentPremiumSeats
## SeatsEconomy 0.003956939 -0.33093522
## SeatsPremium -0.097196009 0.48502977
## PitchEconomy -0.423022038 -0.10280880
## PitchPremium 0.417539056 -0.17548741
## WidthEconomy -0.043961160 0.22714172
## WidthPremium 0.504247591 -0.18331206
## PriceEconomy -0.288567110 0.06532232
## PricePremium 0.031846537 0.11639097
## PriceRelative 1.000000000 -0.16156556
## PercentPremiumSeats -0.161565556 1.00000000
A visual correlation is of course easy to understand.
corrgram(airlines[,c(6:14,18)], order=FALSE, lower.panel=panel.shade,
upper.panel=panel.pie, text.panel=panel.txt,
main="Corrgram of store variables")
Let the hypothesis be: The difference of prices of economic and premium economic seats is affected by percentage of premium seats, difference in pitch and difference in width of the seats.
cor.test(airlines$PriceRelative,airlines$PitchDifference)
##
## Pearson's product-moment correlation
##
## data: airlines$PriceRelative and airlines$PitchDifference
## t = 11.331, df = 456, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## 0.3940262 0.5372817
## sample estimates:
## cor
## 0.4687302
The p-value<0.05. This implies that Pitch difference is significantly correlated with relative price of tickets.
cor.test(airlines$PriceRelative,airlines$WidthDifference)
##
## Pearson's product-moment correlation
##
## data: airlines$PriceRelative and airlines$WidthDifference
## t = 11.869, df = 456, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## 0.4125388 0.5528218
## sample estimates:
## cor
## 0.4858024
The p-value<0.05. This implies that Width difference is significantly correlated with relative price of tickets.
A visual measure of correlation help in undersatnding.
scatterplotMatrix(formula = ~ PriceRelative + PitchDifference + WidthDifference + PercentPremiumSeats, cex=0.6,
data=airlines, diagonal="density")
Let the regressiomn equation be:
PriceRelative = b0 + b1PercentPremiumSeats + b2PitchDifference + b3WidthDifference+ ??
Now the analysis:
m1<-lm(PriceRelative~ PercentPremiumSeats + PitchDifference + WidthDifference,data = airlines)
summary(m1)
##
## Call:
## lm(formula = PriceRelative ~ PercentPremiumSeats + PitchDifference +
## WidthDifference, data = airlines)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.88643 -0.29471 -0.05005 0.19013 1.17157
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.031508 0.097220 -0.324 0.746
## PercentPremiumSeats -0.005764 0.003971 -1.451 0.147
## PitchDifference 0.064596 0.016171 3.994 7.56e-05 ***
## WidthDifference 0.104782 0.024813 4.223 2.92e-05 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.3882 on 454 degrees of freedom
## Multiple R-squared: 0.2627, Adjusted R-squared: 0.2579
## F-statistic: 53.93 on 3 and 454 DF, p-value: < 2.2e-16
From the regression, it can be observed that Percentage of premium seats has no significant(p>0.05) affect on the relative difference in prices of the two categories.
Whereas Pitch difference and Width difference are significant enough(p<0.05).
The coefficients of the equation are:
m1$coefficients
## (Intercept) PercentPremiumSeats PitchDifference
## -0.031508119 -0.005764216 0.064596209
## WidthDifference
## 0.104781532
The confidence intervals are:
confint(m1)
## 2.5 % 97.5 %
## (Intercept) -0.22256544 0.159549200
## PercentPremiumSeats -0.01356861 0.002040183
## PitchDifference 0.03281620 0.096376213
## WidthDifference 0.05601923 0.153543836
coefplot(m1,predictors=c("PercentPremiumSeats","PitchDifference","WidthDifference"))
Its clear from the graph that Percentage of Premium Seats is not significant as it passes through zero.
The actual relative price are:
airlines$PriceRelative
## [1] 0.38 0.38 0.38 0.38 0.67 0.67 0.67 1.03 1.03 0.75 0.75 0.56 0.26 0.52
## [15] 0.52 0.52 0.38 0.38 0.38 0.34 0.34 0.34 0.33 0.33 0.33 0.35 0.33 0.33
## [29] 0.34 0.34 0.34 0.42 0.42 0.42 0.42 0.65 0.65 0.65 0.24 0.24 0.24 0.24
## [43] 0.17 0.17 0.17 0.08 0.08 0.08 0.52 0.52 0.52 1.03 0.36 0.36 0.36 0.34
## [57] 0.34 0.34 0.21 0.21 0.61 0.73 0.73 0.73 0.73 0.39 0.39 0.39 0.39 0.26
## [71] 0.26 0.26 0.10 0.09 0.08 0.07 0.07 0.07 0.04 0.04 0.03 1.07 1.07 1.07
## [85] 1.07 0.40 0.40 0.40 0.40 0.48 0.48 0.48 0.48 0.33 0.33 0.33 0.26 0.09
## [99] 0.49 0.49 0.49 0.49 0.91 0.91 0.91 0.91 0.47 0.47 0.47 1.27 1.27 0.36
## [113] 0.06 0.10 0.10 0.04 0.11 0.11 0.08 0.09 0.05 0.05 0.11 0.14 0.17 0.16
## [127] 0.15 0.07 0.17 0.18 0.14 0.13 0.16 0.18 0.18 0.25 0.20 0.26 0.19 0.23
## [141] 0.23 0.30 0.30 0.30 0.25 0.29 0.29 0.29 0.40 0.31 0.33 0.13 0.10 0.09
## [155] 0.06 1.82 1.82 1.82 1.82 1.73 1.73 1.73 1.38 0.97 0.97 0.97 0.97 0.91
## [169] 0.91 0.91 0.91 0.84 0.56 0.51 0.51 0.51 0.51 0.50 0.49 0.40 0.40 0.40
## [183] 0.40 0.26 0.46 0.46 0.38 0.38 0.38 0.30 1.08 1.08 1.08 1.08 1.03 1.03
## [197] 1.03 1.03 0.84 0.84 0.84 0.49 0.49 0.41 0.41 0.41 0.41 0.26 0.10 0.10
## [211] 0.10 1.56 1.17 0.63 0.08 0.08 0.08 0.08 0.08 0.08 0.08 0.08 0.08 0.08
## [225] 0.08 0.07 0.07 0.07 0.07 0.07 0.04 0.03 0.03 0.03 0.03 0.03 0.03 0.03
## [239] 0.03 1.13 1.13 0.26 0.45 0.45 0.45 0.36 0.36 0.36 0.36 0.98 0.98 0.98
## [253] 0.33 0.33 0.33 0.33 0.36 0.36 0.36 1.13 0.42 0.42 0.42 0.40 0.40 0.40
## [267] 0.80 0.07 0.07 0.07 1.11 1.11 0.91 0.20 0.80 0.17 0.17 0.17 0.21 0.57
## [281] 0.14 0.14 0.12 0.12 0.12 0.11 0.11 0.11 0.11 0.11 0.11 0.10 0.10 0.10
## [295] 0.09 0.09 0.08 0.08 0.08 0.07 0.07 0.05 0.05 0.05 0.04 0.04 0.04 1.50
## [309] 0.96 0.82 0.42 0.42 0.40 0.38 1.11 0.83 0.83 0.77 0.60 0.60 0.60 0.55
## [323] 0.48 0.48 0.13 0.13 0.13 0.13 0.13 0.13 0.10 0.10 0.10 0.10 0.09 0.09
## [337] 0.09 0.09 0.36 0.36 0.36 0.08 0.07 0.07 0.07 0.07 0.04 0.04 0.04 0.03
## [351] 0.03 0.03 0.03 0.03 0.03 0.03 0.03 0.03 0.03 0.03 0.03 0.03 0.03 0.03
## [365] 0.03 0.03 1.39 1.39 1.39 0.14 0.14 0.14 0.77 0.48 0.48 0.04 0.52 0.37
## [379] 1.89 1.89 1.89 1.87 1.67 1.64 1.53 1.29 1.26 1.26 1.26 1.11 1.11 1.11
## [393] 1.09 1.06 1.04 1.04 0.91 0.81 0.79 0.74 0.74 0.74 0.74 0.50 0.17 1.64
## [407] 1.64 1.44 0.56 0.99 0.99 0.99 0.99 0.99 0.99 0.99 0.99 0.61 0.61 0.61
## [421] 0.61 0.61 0.61 0.61 0.61 1.16 1.16 0.08 0.08 0.07 0.07 0.07 0.04 0.04
## [435] 0.04 0.04 0.03 0.03 0.02 1.71 1.68 1.68 1.30 1.30 1.30 1.30 1.22 1.07
## [449] 0.77 0.77 0.77 0.65 0.60 0.58 0.45 0.45 0.38 0.12
Price predicted by the OLS model are:
options(digits=2)
fitted(m1)
## 1 2 3 4 5 6 7 8 9 10
## 0.3831 0.3831 0.3831 0.3831 0.3831 0.3831 0.3831 0.3831 0.3831 0.3831
## 11 12 13 14 15 16 17 18 19 20
## 0.3831 0.3831 0.3831 0.3831 0.3831 0.3831 0.3831 0.3831 0.3831 0.3831
## 21 22 23 24 25 26 27 28 29 30
## 0.3831 0.3831 0.3831 0.3831 0.3831 0.3831 0.3831 0.3831 0.3831 0.3831
## 31 32 33 34 35 36 37 38 39 40
## 0.3831 0.3831 0.3831 0.3831 0.3831 0.3831 0.3831 0.3831 0.3831 0.3831
## 41 42 43 44 45 46 47 48 49 50
## 0.3831 0.3831 0.3831 0.3831 0.3831 0.3831 0.3831 0.3831 0.3831 0.3831
## 51 52 53 54 55 56 57 58 59 60
## 0.3831 0.3900 0.3900 0.3900 0.3900 0.3900 0.3900 0.3900 0.3900 0.3900
## 61 62 63 64 65 66 67 68 69 70
## 0.3900 0.6163 0.6163 0.6163 0.6163 0.6163 0.6163 0.6163 0.6163 0.6163
## 71 72 73 74 75 76 77 78 79 80
## 0.6163 0.6163 0.6163 0.0446 0.0446 0.0446 0.0446 0.0446 0.0446 0.0446
## 81 82 83 84 85 86 87 88 89 90
## 0.0446 0.4175 0.4175 0.4175 0.4175 0.4175 0.4175 0.4175 0.4175 0.9363
## 91 92 93 94 95 96 97 98 99 100
## 0.9363 0.9363 0.9363 0.9363 0.9363 0.9363 0.9363 0.0028 0.4369 0.4369
## 101 102 103 104 105 106 107 108 109 110
## 0.4369 0.4369 0.4369 0.4369 0.4369 0.4369 0.4369 0.4369 0.4369 0.4369
## 111 112 113 114 115 116 117 118 119 120
## 0.4369 0.4369 0.4369 0.4369 0.4369 0.4369 0.4369 0.4369 0.4369 0.4369
## 121 122 123 124 125 126 127 128 129 130
## 0.4369 0.4369 0.4369 0.4369 0.4369 0.4369 0.4369 0.4369 0.4369 0.4369
## 131 132 133 134 135 136 137 138 139 140
## 0.4369 0.4369 0.4369 0.4369 0.4369 0.4369 0.4369 0.4369 0.4369 0.4369
## 141 142 143 144 145 146 147 148 149 150
## 0.4369 0.4369 0.4369 0.4369 0.4369 0.4369 0.4369 0.4369 0.4369 0.4390
## 151 152 153 154 155 156 157 158 159 160
## 0.4369 0.0787 0.0787 0.0787 0.0787 0.6484 0.6484 0.6484 0.6484 0.6484
## 161 162 163 164 165 166 167 168 169 170
## 0.6484 0.6484 0.6484 0.6487 0.6487 0.6487 0.6487 0.6484 0.6484 0.6484
## 171 172 173 174 175 176 177 178 179 180
## 0.6484 0.6484 0.6484 0.6487 0.6487 0.6487 0.6487 0.6484 0.6484 0.6484
## 181 182 183 184 185 186 187 188 189 190
## 0.6484 0.6484 0.6484 0.6484 0.6542 0.6542 0.6542 0.6542 0.6542 0.6542
## 191 192 193 194 195 196 197 198 199 200
## 0.6542 0.6542 0.6542 0.6542 0.6542 0.6542 0.6542 0.6542 0.6542 0.6542
## 201 202 203 204 205 206 207 208 209 210
## 0.6542 0.6542 0.6542 0.6542 0.6542 0.6542 0.6542 0.6542 0.6542 0.6542
## 211 212 213 214 215 216 217 218 219 220
## 0.6542 0.3888 0.3888 0.3888 0.3888 0.3888 0.3888 0.3888 0.3888 0.3888
## 221 222 223 224 225 226 227 228 229 230
## 0.3888 0.3888 0.3888 0.3888 0.3888 0.3888 0.3888 0.3888 0.3888 0.3888
## 231 232 233 234 235 236 237 238 239 240
## 0.3888 0.3888 0.3888 0.3888 0.3888 0.3888 0.3888 0.3888 0.3888 0.4511
## 241 242 243 244 245 246 247 248 249 250
## 0.4511 0.4511 0.4511 0.4511 0.4511 0.4511 0.4511 0.4511 0.4511 0.4511
## 251 252 253 254 255 256 257 258 259 260
## 0.4511 0.4511 0.4511 0.4511 0.4511 0.4511 0.4511 0.4511 0.4511 0.4511
## 261 262 263 264 265 266 267 268 269 270
## 0.4511 0.4511 0.4511 0.4511 0.4511 0.4511 0.4511 0.4511 0.4511 0.4511
## 271 272 273 274 275 276 277 278 279 280
## 0.4511 0.4511 0.4511 0.4511 0.4511 0.4511 0.4511 0.4511 0.4511 0.4511
## 281 282 283 284 285 286 287 288 289 290
## 0.0256 0.0256 0.0256 0.0256 0.0256 0.0866 0.0866 0.0866 0.0256 0.0256
## 291 292 293 294 295 296 297 298 299 300
## 0.0256 0.0866 0.0256 0.0256 0.0238 0.0225 0.0225 0.0238 0.0238 0.0256
## 301 302 303 304 305 306 307 308 309 310
## 0.0238 0.0225 0.0225 0.0256 0.0238 0.0225 0.0256 0.3888 0.3888 0.3888
## 311 312 313 314 315 316 317 318 319 320
## 0.3888 0.3888 0.3888 0.3888 0.3847 0.3847 0.3847 0.3847 0.3847 0.3847
## 321 322 323 324 325 326 327 328 329 330
## 0.3847 0.3847 0.3847 0.3847 0.3847 0.3847 0.3847 0.3847 0.3847 0.3847
## 331 332 333 334 335 336 337 338 339 340
## 0.3847 0.3847 0.3847 0.3847 0.3847 0.3847 0.3847 0.3847 0.4948 0.4948
## 341 342 343 344 345 346 347 348 349 350
## 0.4948 0.4948 0.4948 0.4948 0.4948 0.4948 0.4948 0.4948 0.4948 0.4948
## 351 352 353 354 355 356 357 358 359 360
## 0.4948 0.4948 0.4948 0.4958 0.4958 0.4958 0.4958 0.4948 0.4948 0.4948
## 361 362 363 364 365 366 367 368 369 370
## 0.4958 0.4958 0.4948 0.4948 0.4948 0.4948 0.4645 0.4645 0.4645 0.4645
## 371 372 373 374 375 376 377 378 379 380
## 0.4645 0.4645 0.4645 0.4645 0.4645 0.4645 0.4645 0.4645 0.9677 0.9677
## 381 382 383 384 385 386 387 388 389 390
## 0.9677 0.9677 0.9677 0.9677 0.9677 0.9677 0.9677 0.9677 0.9677 0.9677
## 391 392 393 394 395 396 397 398 399 400
## 0.9677 0.9677 0.9677 0.9677 0.9677 0.9677 0.9677 0.9677 0.9677 0.9677
## 401 402 403 404 405 406 407 408 409 410
## 0.9677 0.9677 0.9677 0.9677 0.9677 0.5080 0.5080 0.5080 0.5080 0.4046
## 411 412 413 414 415 416 417 418 419 420
## 0.4046 0.4046 0.4046 0.4046 0.4046 0.4046 0.4046 0.4046 0.4046 0.4046
## 421 422 423 424 425 426 427 428 429 430
## 0.4046 0.4046 0.4046 0.4046 0.4046 0.4095 0.4095 0.4095 0.4095 0.4095
## 431 432 433 434 435 436 437 438 439 440
## 0.4095 0.4095 0.4095 0.4095 0.4095 0.4095 0.4095 0.4095 0.4095 1.0064
## 441 442 443 444 445 446 447 448 449 450
## 1.0064 1.0064 1.0064 1.0064 1.0064 1.0064 1.0064 1.0064 1.0064 1.0064
## 451 452 453 454 455 456 457 458
## 1.0064 1.0064 1.0064 1.0064 1.0064 1.0064 1.0064 1.0064
predictedPrice=data.frame(fitted(m1))
actualPrice=data.frame(airlines$PriceRelative)
priceComparision=cbind(actualPrice,predictedPrice)
priceComparision
## airlines.PriceRelative fitted.m1.
## 1 0.38 0.3831
## 2 0.38 0.3831
## 3 0.38 0.3831
## 4 0.38 0.3831
## 5 0.67 0.3831
## 6 0.67 0.3831
## 7 0.67 0.3831
## 8 1.03 0.3831
## 9 1.03 0.3831
## 10 0.75 0.3831
## 11 0.75 0.3831
## 12 0.56 0.3831
## 13 0.26 0.3831
## 14 0.52 0.3831
## 15 0.52 0.3831
## 16 0.52 0.3831
## 17 0.38 0.3831
## 18 0.38 0.3831
## 19 0.38 0.3831
## 20 0.34 0.3831
## 21 0.34 0.3831
## 22 0.34 0.3831
## 23 0.33 0.3831
## 24 0.33 0.3831
## 25 0.33 0.3831
## 26 0.35 0.3831
## 27 0.33 0.3831
## 28 0.33 0.3831
## 29 0.34 0.3831
## 30 0.34 0.3831
## 31 0.34 0.3831
## 32 0.42 0.3831
## 33 0.42 0.3831
## 34 0.42 0.3831
## 35 0.42 0.3831
## 36 0.65 0.3831
## 37 0.65 0.3831
## 38 0.65 0.3831
## 39 0.24 0.3831
## 40 0.24 0.3831
## 41 0.24 0.3831
## 42 0.24 0.3831
## 43 0.17 0.3831
## 44 0.17 0.3831
## 45 0.17 0.3831
## 46 0.08 0.3831
## 47 0.08 0.3831
## 48 0.08 0.3831
## 49 0.52 0.3831
## 50 0.52 0.3831
## 51 0.52 0.3831
## 52 1.03 0.3900
## 53 0.36 0.3900
## 54 0.36 0.3900
## 55 0.36 0.3900
## 56 0.34 0.3900
## 57 0.34 0.3900
## 58 0.34 0.3900
## 59 0.21 0.3900
## 60 0.21 0.3900
## 61 0.61 0.3900
## 62 0.73 0.6163
## 63 0.73 0.6163
## 64 0.73 0.6163
## 65 0.73 0.6163
## 66 0.39 0.6163
## 67 0.39 0.6163
## 68 0.39 0.6163
## 69 0.39 0.6163
## 70 0.26 0.6163
## 71 0.26 0.6163
## 72 0.26 0.6163
## 73 0.10 0.6163
## 74 0.09 0.0446
## 75 0.08 0.0446
## 76 0.07 0.0446
## 77 0.07 0.0446
## 78 0.07 0.0446
## 79 0.04 0.0446
## 80 0.04 0.0446
## 81 0.03 0.0446
## 82 1.07 0.4175
## 83 1.07 0.4175
## 84 1.07 0.4175
## 85 1.07 0.4175
## 86 0.40 0.4175
## 87 0.40 0.4175
## 88 0.40 0.4175
## 89 0.40 0.4175
## 90 0.48 0.9363
## 91 0.48 0.9363
## 92 0.48 0.9363
## 93 0.48 0.9363
## 94 0.33 0.9363
## 95 0.33 0.9363
## 96 0.33 0.9363
## 97 0.26 0.9363
## 98 0.09 0.0028
## 99 0.49 0.4369
## 100 0.49 0.4369
## 101 0.49 0.4369
## 102 0.49 0.4369
## 103 0.91 0.4369
## 104 0.91 0.4369
## 105 0.91 0.4369
## 106 0.91 0.4369
## 107 0.47 0.4369
## 108 0.47 0.4369
## 109 0.47 0.4369
## 110 1.27 0.4369
## 111 1.27 0.4369
## 112 0.36 0.4369
## 113 0.06 0.4369
## 114 0.10 0.4369
## 115 0.10 0.4369
## 116 0.04 0.4369
## 117 0.11 0.4369
## 118 0.11 0.4369
## 119 0.08 0.4369
## 120 0.09 0.4369
## 121 0.05 0.4369
## 122 0.05 0.4369
## 123 0.11 0.4369
## 124 0.14 0.4369
## 125 0.17 0.4369
## 126 0.16 0.4369
## 127 0.15 0.4369
## 128 0.07 0.4369
## 129 0.17 0.4369
## 130 0.18 0.4369
## 131 0.14 0.4369
## 132 0.13 0.4369
## 133 0.16 0.4369
## 134 0.18 0.4369
## 135 0.18 0.4369
## 136 0.25 0.4369
## 137 0.20 0.4369
## 138 0.26 0.4369
## 139 0.19 0.4369
## 140 0.23 0.4369
## 141 0.23 0.4369
## 142 0.30 0.4369
## 143 0.30 0.4369
## 144 0.30 0.4369
## 145 0.25 0.4369
## 146 0.29 0.4369
## 147 0.29 0.4369
## 148 0.29 0.4369
## 149 0.40 0.4369
## 150 0.31 0.4390
## 151 0.33 0.4369
## 152 0.13 0.0787
## 153 0.10 0.0787
## 154 0.09 0.0787
## 155 0.06 0.0787
## 156 1.82 0.6484
## 157 1.82 0.6484
## 158 1.82 0.6484
## 159 1.82 0.6484
## 160 1.73 0.6484
## 161 1.73 0.6484
## 162 1.73 0.6484
## 163 1.38 0.6484
## 164 0.97 0.6487
## 165 0.97 0.6487
## 166 0.97 0.6487
## 167 0.97 0.6487
## 168 0.91 0.6484
## 169 0.91 0.6484
## 170 0.91 0.6484
## 171 0.91 0.6484
## 172 0.84 0.6484
## 173 0.56 0.6484
## 174 0.51 0.6487
## 175 0.51 0.6487
## 176 0.51 0.6487
## 177 0.51 0.6487
## 178 0.50 0.6484
## 179 0.49 0.6484
## 180 0.40 0.6484
## 181 0.40 0.6484
## 182 0.40 0.6484
## 183 0.40 0.6484
## 184 0.26 0.6484
## 185 0.46 0.6542
## 186 0.46 0.6542
## 187 0.38 0.6542
## 188 0.38 0.6542
## 189 0.38 0.6542
## 190 0.30 0.6542
## 191 1.08 0.6542
## 192 1.08 0.6542
## 193 1.08 0.6542
## 194 1.08 0.6542
## 195 1.03 0.6542
## 196 1.03 0.6542
## 197 1.03 0.6542
## 198 1.03 0.6542
## 199 0.84 0.6542
## 200 0.84 0.6542
## 201 0.84 0.6542
## 202 0.49 0.6542
## 203 0.49 0.6542
## 204 0.41 0.6542
## 205 0.41 0.6542
## 206 0.41 0.6542
## 207 0.41 0.6542
## 208 0.26 0.6542
## 209 0.10 0.6542
## 210 0.10 0.6542
## 211 0.10 0.6542
## 212 1.56 0.3888
## 213 1.17 0.3888
## 214 0.63 0.3888
## 215 0.08 0.3888
## 216 0.08 0.3888
## 217 0.08 0.3888
## 218 0.08 0.3888
## 219 0.08 0.3888
## 220 0.08 0.3888
## 221 0.08 0.3888
## 222 0.08 0.3888
## 223 0.08 0.3888
## 224 0.08 0.3888
## 225 0.08 0.3888
## 226 0.07 0.3888
## 227 0.07 0.3888
## 228 0.07 0.3888
## 229 0.07 0.3888
## 230 0.07 0.3888
## 231 0.04 0.3888
## 232 0.03 0.3888
## 233 0.03 0.3888
## 234 0.03 0.3888
## 235 0.03 0.3888
## 236 0.03 0.3888
## 237 0.03 0.3888
## 238 0.03 0.3888
## 239 0.03 0.3888
## 240 1.13 0.4511
## 241 1.13 0.4511
## 242 0.26 0.4511
## 243 0.45 0.4511
## 244 0.45 0.4511
## 245 0.45 0.4511
## 246 0.36 0.4511
## 247 0.36 0.4511
## 248 0.36 0.4511
## 249 0.36 0.4511
## 250 0.98 0.4511
## 251 0.98 0.4511
## 252 0.98 0.4511
## 253 0.33 0.4511
## 254 0.33 0.4511
## 255 0.33 0.4511
## 256 0.33 0.4511
## 257 0.36 0.4511
## 258 0.36 0.4511
## 259 0.36 0.4511
## 260 1.13 0.4511
## 261 0.42 0.4511
## 262 0.42 0.4511
## 263 0.42 0.4511
## 264 0.40 0.4511
## 265 0.40 0.4511
## 266 0.40 0.4511
## 267 0.80 0.4511
## 268 0.07 0.4511
## 269 0.07 0.4511
## 270 0.07 0.4511
## 271 1.11 0.4511
## 272 1.11 0.4511
## 273 0.91 0.4511
## 274 0.20 0.4511
## 275 0.80 0.4511
## 276 0.17 0.4511
## 277 0.17 0.4511
## 278 0.17 0.4511
## 279 0.21 0.4511
## 280 0.57 0.4511
## 281 0.14 0.0256
## 282 0.14 0.0256
## 283 0.12 0.0256
## 284 0.12 0.0256
## 285 0.12 0.0256
## 286 0.11 0.0866
## 287 0.11 0.0866
## 288 0.11 0.0866
## 289 0.11 0.0256
## 290 0.11 0.0256
## 291 0.11 0.0256
## 292 0.10 0.0866
## 293 0.10 0.0256
## 294 0.10 0.0256
## 295 0.09 0.0238
## 296 0.09 0.0225
## 297 0.08 0.0225
## 298 0.08 0.0238
## 299 0.08 0.0238
## 300 0.07 0.0256
## 301 0.07 0.0238
## 302 0.05 0.0225
## 303 0.05 0.0225
## 304 0.05 0.0256
## 305 0.04 0.0238
## 306 0.04 0.0225
## 307 0.04 0.0256
## 308 1.50 0.3888
## 309 0.96 0.3888
## 310 0.82 0.3888
## 311 0.42 0.3888
## 312 0.42 0.3888
## 313 0.40 0.3888
## 314 0.38 0.3888
## 315 1.11 0.3847
## 316 0.83 0.3847
## 317 0.83 0.3847
## 318 0.77 0.3847
## 319 0.60 0.3847
## 320 0.60 0.3847
## 321 0.60 0.3847
## 322 0.55 0.3847
## 323 0.48 0.3847
## 324 0.48 0.3847
## 325 0.13 0.3847
## 326 0.13 0.3847
## 327 0.13 0.3847
## 328 0.13 0.3847
## 329 0.13 0.3847
## 330 0.13 0.3847
## 331 0.10 0.3847
## 332 0.10 0.3847
## 333 0.10 0.3847
## 334 0.10 0.3847
## 335 0.09 0.3847
## 336 0.09 0.3847
## 337 0.09 0.3847
## 338 0.09 0.3847
## 339 0.36 0.4948
## 340 0.36 0.4948
## 341 0.36 0.4948
## 342 0.08 0.4948
## 343 0.07 0.4948
## 344 0.07 0.4948
## 345 0.07 0.4948
## 346 0.07 0.4948
## 347 0.04 0.4948
## 348 0.04 0.4948
## 349 0.04 0.4948
## 350 0.03 0.4948
## 351 0.03 0.4948
## 352 0.03 0.4948
## 353 0.03 0.4948
## 354 0.03 0.4958
## 355 0.03 0.4958
## 356 0.03 0.4958
## 357 0.03 0.4958
## 358 0.03 0.4948
## 359 0.03 0.4948
## 360 0.03 0.4948
## 361 0.03 0.4958
## 362 0.03 0.4958
## 363 0.03 0.4948
## 364 0.03 0.4948
## 365 0.03 0.4948
## 366 0.03 0.4948
## 367 1.39 0.4645
## 368 1.39 0.4645
## 369 1.39 0.4645
## 370 0.14 0.4645
## 371 0.14 0.4645
## 372 0.14 0.4645
## 373 0.77 0.4645
## 374 0.48 0.4645
## 375 0.48 0.4645
## 376 0.04 0.4645
## 377 0.52 0.4645
## 378 0.37 0.4645
## 379 1.89 0.9677
## 380 1.89 0.9677
## 381 1.89 0.9677
## 382 1.87 0.9677
## 383 1.67 0.9677
## 384 1.64 0.9677
## 385 1.53 0.9677
## 386 1.29 0.9677
## 387 1.26 0.9677
## 388 1.26 0.9677
## 389 1.26 0.9677
## 390 1.11 0.9677
## 391 1.11 0.9677
## 392 1.11 0.9677
## 393 1.09 0.9677
## 394 1.06 0.9677
## 395 1.04 0.9677
## 396 1.04 0.9677
## 397 0.91 0.9677
## 398 0.81 0.9677
## 399 0.79 0.9677
## 400 0.74 0.9677
## 401 0.74 0.9677
## 402 0.74 0.9677
## 403 0.74 0.9677
## 404 0.50 0.9677
## 405 0.17 0.9677
## 406 1.64 0.5080
## 407 1.64 0.5080
## 408 1.44 0.5080
## 409 0.56 0.5080
## 410 0.99 0.4046
## 411 0.99 0.4046
## 412 0.99 0.4046
## 413 0.99 0.4046
## 414 0.99 0.4046
## 415 0.99 0.4046
## 416 0.99 0.4046
## 417 0.99 0.4046
## 418 0.61 0.4046
## 419 0.61 0.4046
## 420 0.61 0.4046
## 421 0.61 0.4046
## 422 0.61 0.4046
## 423 0.61 0.4046
## 424 0.61 0.4046
## 425 0.61 0.4046
## 426 1.16 0.4095
## 427 1.16 0.4095
## 428 0.08 0.4095
## 429 0.08 0.4095
## 430 0.07 0.4095
## 431 0.07 0.4095
## 432 0.07 0.4095
## 433 0.04 0.4095
## 434 0.04 0.4095
## 435 0.04 0.4095
## 436 0.04 0.4095
## 437 0.03 0.4095
## 438 0.03 0.4095
## 439 0.02 0.4095
## 440 1.71 1.0064
## 441 1.68 1.0064
## 442 1.68 1.0064
## 443 1.30 1.0064
## 444 1.30 1.0064
## 445 1.30 1.0064
## 446 1.30 1.0064
## 447 1.22 1.0064
## 448 1.07 1.0064
## 449 0.77 1.0064
## 450 0.77 1.0064
## 451 0.77 1.0064
## 452 0.65 1.0064
## 453 0.60 1.0064
## 454 0.58 1.0064
## 455 0.45 1.0064
## 456 0.45 1.0064
## 457 0.38 1.0064
## 458 0.12 1.0064
The difference in seat pitch is an important factor which determines the difference in price of Economy And Premium Economy seats. For every one inch increase in Pitch difference, relative price increases by 0.064 units.
The difference in seat width is an important factor which determines the difference in price of Economy And Premium Economy seats. For every one inch increase in Width difference, relative price increases by 0.10 units.
Our hypothesis:" The difference of prices of economic and premium economic seats is affected by percentage of premium seats, difference in pitch and difference in width of the seats" is wrong as through the regression analysis
“The diffence in prices of economy and premium economy seats is affected by pitch difference and width diffence”.
THANK YOU