This is a mini project which in detail tries to understand the Airline Industry with the help of data And fundamentally tries to research on this Question: What factors explain the difference in price between an economy ticket and a premium-economy airline ticket?

Premium Economy Vs Economy Ticket Pricing by Airlines: Premium Economy is found mostly on international flights and, compared to standard Economy, offers about 5-7 inches of extra legroom as well as additional amenities, which can include: 1-2 extra inches of seat width. 2-3 extra inches of seat recline. Adjustable headrests, legrests, or lumbar support.

The following data analysis shall help understand the relative pricing between an economy ticket and premium economy airline ticket.

#Read the data into R

setwd("C:/Users/GOWRI/Desktop/iim_internship/Week_3/Mini_Project")
Airlines <- read.csv(file="SixAirlinesDataV2.csv",head=TRUE,sep=",")
View(Airlines)
# Summarize the data to understand the mean, median, standard deviation of each variable in the Airline Dataset.

library(psych)

summaryOfAirlines <- describe(Airlines)
AirlineSum <- summaryOfAirlines[ c(3,4,5,8,9)]
AirlineSum
##                        mean      sd  median   min     max
## Airline*               3.01    1.65    2.00  1.00    6.00
## Aircraft*              1.67    0.47    2.00  1.00    2.00
## FlightDuration         7.58    3.54    7.79  1.25   14.66
## TravelMonth*           2.56    1.17    3.00  1.00    4.00
## IsInternational*       1.91    0.28    2.00  1.00    2.00
## SeatsEconomy         202.31   76.37  185.00 78.00  389.00
## SeatsPremium          33.65   13.26   36.00  8.00   66.00
## PitchEconomy          31.22    0.66   31.00 30.00   33.00
## PitchPremium          37.91    1.31   38.00 34.00   40.00
## WidthEconomy          17.84    0.56   18.00 17.00   19.00
## WidthPremium          19.47    1.10   19.00 17.00   21.00
## PriceEconomy        1327.08  988.27 1242.00 65.00 3593.00
## PricePremium        1845.26 1288.14 1737.00 86.00 7414.00
## PriceRelative          0.49    0.45    0.36  0.02    1.89
## SeatsTotal           235.96   85.29  227.00 98.00  441.00
## PitchDifference        6.69    1.76    7.00  2.00   10.00
## WidthDifference        1.63    1.19    1.00  0.00    4.00
## PercentPremiumSeats   14.65    4.84   13.21  4.71   24.69
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

To understand the factors affecting the difference in pricing of economy and premium economy, as relative pricing is the difference between the prices of economy and premium economy, we shall visualize the factors affecting it.

# Effect of Airline on relative pricing.

library(lattice)

boxplot(Airlines$PriceRelative ~Airlines$Airline , 
       xlab = "Airline", ylab ="Relative Pricing", main = "Effect of Airlines on relative pricing.")

# Here, we can see that Airfrance and Delta do not have a major difference in the pricing relatively to it's premium economy and economy class while Jet Airways has the maximum difference and Airline being a strong factor.
# Effect of Aircraft on relative pricing.

library(lattice)

boxplot(Airlines$PriceRelative ~Airlines$Aircraft , 
       xlab = "Aircraft", ylab ="Relative Pricing", main = "Effect of Aircraft on relative pricing.")

# Here, we can see that Airbus and Boeing do not have a major difference in the pricing relatively to it's premium economy and economy class which shows statistically less significant on relative pricing.
# Effect of Flight Duration on relative pricing.

library(car)
## 
## Attaching package: 'car'
## The following object is masked from 'package:psych':
## 
##     logit
scatterplot(Airlines$PriceRelative~Airlines$FlightDuration,spread=FALSE, smoother.args=list(lty=2), pch=19,
            main="Scatterplot of Relative pricing vs. Flight Duration ",
            xlab="Flight Duration",
            ylab="Relative Pricing")

# Here, we can see that there is a positive correlation between relative pricing and the flight duration, which says as the duration increases, the difference in the prices too increases.
# Effect of Travel month on relative pricing.

library(lattice)

boxplot(Airlines$PriceRelative ~Airlines$TravelMonth , 
       xlab = "Travel Month", ylab ="Relative Pricing", main = "Effect of Travel Month on relative pricing.")

# Here, we can see that travelling months don't play a significant role in the prices of economy and premium economy tickets.
# Effect of Is International on relative pricing.

library(lattice)

boxplot(Airlines$PriceRelative ~Airlines$IsInternational , 
       xlab = "Is International", ylab ="Relative Pricing", main = "Effect of is International on relative pricing.")

# Here, we can see that is International plays a significant role in the prices of economy and premium economy tickets, where the difference maximum being in International flights rather than domestic flights.
# Effect of  pitch on Relative pricing.

library(car)

scatterplotMatrix(formula = ~ Airlines$PriceRelative + Airlines$PitchEconomy + Airlines$PitchPremium + Airlines$PitchDifference , cex=0.6,
          data=Airlines, main = " Effect of pitch on relative pricing.")
## Warning in smoother(x, y, col = col[2], log.x = FALSE, log.y = FALSE,
## spread = spread, : could not fit positive part of the spread

# We can see that Pitch economy has a negative correlation, while pitch premium and pitch difference have a positive correlation with relative pricing.
# Effect of width on Relative pricing.

library(car)

scatterplotMatrix(formula = ~ Airlines$PriceRelative + Airlines$WidthEconomy + Airlines$WidthPremium + Airlines$WidthDifference , cex=0.6,
          data=Airlines, main = "Effect of width on relative pricing." )

# We can see that width economy has a linear correlation, while width premium and width difference have a positive correlation with relative pricing.
# Effect of seats on Relative pricing.

library(car)

scatterplotMatrix(formula = ~ Airlines$PriceRelative + Airlines$SeatsEconomy + Airlines$SeatsPremium + Airlines$SeatsTotal , cex=0.6,
          data=Airlines, main = "Effect of seats on relative pricing." )

# We can see that seats economy and seats total have a linear correlation, while seats premium  has a negative correlation with relative pricing.
library(car)

scatterplot(Airlines$PriceRelative~Airlines$PercentPremiumSeats,spread=FALSE, smoother.args=list(lty=2), pch=19,
            main="Scatterplot of Relative price vs Percent of Premium seats ",
            xlab="Percent of Premium seats",
            ylab="Relative price")

# We can see that Percent Premium Seats has a negative correlation with relative pricing.
# Effect of variables on relative pricing.

# Draw a Corrgram

library("corrgram") 
## Warning: replacing previous import by 'magrittr::%>%' when loading
## 'dendextend'
corrgram(Airlines, order=FALSE, lower.panel=panel.shade,
         upper.panel=panel.pie, text.panel=panel.txt,
         main="Corrgram of Airlines variables")

# Create a Variance-Covariance Matrix.
# creating a subset of numeric values.

Airline <- Airlines[,c(3,6:18)]
covAirline <-cov(Airline)
covAirline
##                     FlightDuration  SeatsEconomy  SeatsPremium
## FlightDuration          12.5462183    52.9194291    7.57372426
## SeatsEconomy            52.9194291  5832.9154300  633.07060954
## SeatsPremium             7.5737243   633.0706095  175.86521648
## PitchEconomy             0.6817421     7.2117665   -0.29725856
## PitchPremium             0.4477835    11.9637325    0.08508595
## WidthEconomy             0.9014224    15.9105138    3.36977440
## WidthPremium             0.4019845     8.5832800   -0.03954019
## PriceEconomy          1983.5401655  9673.7944684 1489.38359627
## PricePremium          2959.9783043 17413.2541733 3717.36428960
## PriceRelative            0.1932368     0.1361699   -0.58078765
## SeatsTotal              60.4931534  6465.9860396  808.93582602
## PitchDifference         -0.2339587     4.7519660    0.38234451
## WidthDifference         -0.4994380    -7.3272338   -3.40931459
## PercentPremiumSeats      1.0379912  -122.3914537   31.14753127
##                     PitchEconomy PitchPremium WidthEconomy WidthPremium
## FlightDuration         0.6817421   0.44778348   0.90142242   0.40198446
## SeatsEconomy           7.2117665  11.96373253  15.91051379   8.58327998
## SeatsPremium          -0.2972586   0.08508595   3.36977440  -0.03954019
## PitchEconomy           0.4292471  -0.47398546   0.10756500  -0.38766208
## PitchPremium          -0.4739855   1.72639580  -0.01739081   1.08157435
## WidthEconomy           0.1075650  -0.01739081   0.31081765   0.05010845
## WidthPremium          -0.3876621   1.08157435   0.05010845   1.20378776
## PriceEconomy         238.7031905  65.42513354  37.46095191 -61.85450011
## PricePremium         190.8517195 149.85356368 108.11611707  90.47997668
## PriceRelative         -0.1248808   0.24719874  -0.01104335   0.24928593
## SeatsTotal             6.9145079  12.04881848  19.28028819   8.54373979
## PitchDifference       -0.9032326   2.20038126  -0.12495581   1.46923643
## WidthDifference       -0.4952271   1.09896515  -0.26070920   1.15367930
## PercentPremiumSeats   -0.3261739  -1.11655834   0.61321816  -0.97393787
##                      PriceEconomy  PricePremium PriceRelative
## FlightDuration         1983.54017    2959.97830    0.19323683
## SeatsEconomy           9673.79447   17413.25417    0.13616991
## SeatsPremium           1489.38360    3717.36429   -0.58078765
## PitchEconomy            238.70319     190.85172   -0.12488080
## PitchPremium             65.42513     149.85356    0.24719874
## WidthEconomy             37.46095     108.11612   -0.01104335
## WidthPremium            -61.85450      90.47998    0.24928593
## PriceEconomy         976684.06198 1147494.76801 -128.49991725
## PricePremium        1147494.76801 1659293.11947   18.48428836
## PriceRelative          -128.49992      18.48429    0.20302893
## SeatsTotal            11163.17806   21130.61846   -0.44461774
## PitchDifference        -173.27806     -40.99816    0.37207954
## WidthDifference         -99.31545     -17.63614    0.26032928
## PercentPremiumSeats     312.61077     726.01582   -0.35252750
##                        SeatsTotal PitchDifference WidthDifference
## FlightDuration         60.4931534      -0.2339587      -0.4994380
## SeatsEconomy         6465.9860396       4.7519660      -7.3272338
## SeatsPremium          808.9358260       0.3823445      -3.4093146
## PitchEconomy            6.9145079      -0.9032326      -0.4952271
## PitchPremium           12.0488185       2.2003813       1.0989652
## WidthEconomy           19.2802882      -0.1249558      -0.2607092
## WidthPremium            8.5437398       1.4692364       1.1536793
## PriceEconomy        11163.1780647    -173.2780570     -99.3154520
## PricePremium        21130.6184629     -40.9981558     -17.6361404
## PriceRelative          -0.4446177       0.3720795       0.2603293
## SeatsTotal           7274.9218656       5.1343105     -10.7365484
## PitchDifference         5.1343105       3.1036138       1.5941922
## WidthDifference       -10.7365484       1.5941922       1.4143885
## PercentPremiumSeats   -91.2439224      -0.7903844      -1.5871560
##                     PercentPremiumSeats
## FlightDuration                1.0379912
## SeatsEconomy               -122.3914537
## SeatsPremium                 31.1475313
## PitchEconomy                 -0.3261739
## PitchPremium                 -1.1165583
## WidthEconomy                  0.6132182
## WidthPremium                 -0.9739379
## PriceEconomy                312.6107669
## PricePremium                726.0158229
## PriceRelative                -0.3525275
## SeatsTotal                  -91.2439224
## PitchDifference              -0.7903844
## WidthDifference              -1.5871560
## PercentPremiumSeats          23.4493343
#Transform covariance to correlation matrix
covCorrAirline <- cov2cor(covAirline)
covCorrAirline
##                     FlightDuration SeatsEconomy SeatsPremium PitchEconomy
## FlightDuration          1.00000000  0.195621187  0.161236400   0.29377174
## SeatsEconomy            0.19562119  1.000000000  0.625056587   0.14412692
## SeatsPremium            0.16123640  0.625056587  1.000000000  -0.03421296
## PitchEconomy            0.29377174  0.144126924 -0.034212963   1.00000000
## PitchPremium            0.09621471  0.119221250  0.004883123  -0.55060624
## WidthEconomy            0.45647720  0.373670252  0.455782883   0.29448586
## WidthPremium            0.10343747  0.102431959 -0.002717527  -0.53929285
## PriceEconomy            0.56664039  0.128167220  0.113642176   0.36866123
## PricePremium            0.64873981  0.177000928  0.217612376   0.22614179
## PriceRelative           0.12107501  0.003956939 -0.097196009  -0.42302204
## SeatsTotal              0.20023299  0.992607966  0.715171053   0.12373524
## PitchDifference        -0.03749288  0.035318044  0.016365566  -0.78254993
## WidthDifference        -0.11856070 -0.080670148 -0.216168666  -0.63557430
## PercentPremiumSeats     0.06051625 -0.330935223  0.485029771  -0.10280880
##                     PitchPremium WidthEconomy WidthPremium PriceEconomy
## FlightDuration       0.096214708   0.45647720  0.103437469   0.56664039
## SeatsEconomy         0.119221250   0.37367025  0.102431959   0.12816722
## SeatsPremium         0.004883123   0.45578288 -0.002717527   0.11364218
## PitchEconomy        -0.550606241   0.29448586 -0.539292852   0.36866123
## PitchPremium         1.000000000  -0.02374087  0.750259029   0.05038455
## WidthEconomy        -0.023740873   1.00000000  0.081918728   0.06799061
## WidthPremium         0.750259029   0.08191873  1.000000000  -0.05704522
## PriceEconomy         0.050384550   0.06799061 -0.057045224   1.00000000
## PricePremium         0.088539147   0.15054837  0.064020043   0.90138870
## PriceRelative        0.417539056  -0.04396116  0.504247591  -0.28856711
## SeatsTotal           0.107512784   0.40545860  0.091297500   0.13243313
## PitchDifference      0.950591466  -0.12722421  0.760121272  -0.09952511
## WidthDifference      0.703281797  -0.39320512  0.884149655  -0.08449975
## PercentPremiumSeats -0.175487414   0.22714172 -0.183312058   0.06532232
##                     PricePremium PriceRelative  SeatsTotal PitchDifference
## FlightDuration        0.64873981   0.121075014  0.20023299     -0.03749288
## SeatsEconomy          0.17700093   0.003956939  0.99260797      0.03531804
## SeatsPremium          0.21761238  -0.097196009  0.71517105      0.01636557
## PitchEconomy          0.22614179  -0.423022038  0.12373524     -0.78254993
## PitchPremium          0.08853915   0.417539056  0.10751278      0.95059147
## WidthEconomy          0.15054837  -0.043961160  0.40545860     -0.12722421
## WidthPremium          0.06402004   0.504247591  0.09129750      0.76012127
## PriceEconomy          0.90138870  -0.288567110  0.13243313     -0.09952511
## PricePremium          1.00000000   0.031846537  0.19232533     -0.01806629
## PriceRelative         0.03184654   1.000000000 -0.01156894      0.46873025
## SeatsTotal            0.19232533  -0.011568942  1.00000000      0.03416915
## PitchDifference      -0.01806629   0.468730249  0.03416915      1.00000000
## WidthDifference      -0.01151218   0.485802437 -0.10584398      0.76089108
## PercentPremiumSeats   0.11639097  -0.161565556 -0.22091465     -0.09264869
##                     WidthDifference PercentPremiumSeats
## FlightDuration          -0.11856070          0.06051625
## SeatsEconomy            -0.08067015         -0.33093522
## SeatsPremium            -0.21616867          0.48502977
## PitchEconomy            -0.63557430         -0.10280880
## PitchPremium             0.70328180         -0.17548741
## WidthEconomy            -0.39320512          0.22714172
## WidthPremium             0.88414965         -0.18331206
## PriceEconomy            -0.08449975          0.06532232
## PricePremium            -0.01151218          0.11639097
## PriceRelative            0.48580244         -0.16156556
## SeatsTotal              -0.10584398         -0.22091465
## PitchDifference          0.76089108         -0.09264869
## WidthDifference          1.00000000         -0.27559416
## PercentPremiumSeats     -0.27559416          1.00000000

After analyzing the data, we can see that the following have a correlation with relative pricing: - Airline - Flightduration - IsInternational - Pitch Economy - Pitch Premium - Pitch Difference - Width Premium - Width Difference - Seats Premium

Factors that are positively correlated with PriceRelative are Airline, Flight duration, IsInternational, PitchPremium, Pitch Difference, WidthPremium, Width Difference and that are negatively correlated with PriceRelative, PitchEconomy, WidthEconomy.

library(car)

scatterplotMatrix(Airlines[,c("PriceRelative","Airline","FlightDuration","IsInternational","PitchEconomy","PitchPremium","PitchDifference","WidthPremium","WidthDifference","SeatsPremium")], 
                  spread=FALSE, smoother.args=list(lty=2),
                  main="Scatter Plot Matrix")
## Warning in smoother(x, y, col = col[2], log.x = FALSE, log.y = FALSE,
## spread = spread, : could not fit smooth

## Warning in smoother(x, y, col = col[2], log.x = FALSE, log.y = FALSE,
## spread = spread, : could not fit smooth

# Articulate a Hypothesis that you could test using a Regression Model. Run T-Tests appropriate, to test your Hypotheses. Fit a Linear Regression Model using lm().

# Null Hypothesis- "The relative price does not depend on IsInternational variable.

# T-Test to check correlation between PriceRelative and Airline.
t.test(Airlines$PriceRelative ~ Airlines$IsInternational)
## 
##  Welch Two Sample t-test
## 
## data:  Airlines$PriceRelative by Airlines$IsInternational
## t = -19.451, df = 446.12, p-value < 2.2e-16
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  -0.4855215 -0.3964139
## sample estimates:
##      mean in group Domestic mean in group International 
##                   0.0847500                   0.5257177
# As p-value=2.2e-16(<0.05).We can easily reject the null hypothesis for IsInternational column.Therefore There is a strong correlation between Relative price and IsInternational.

# Null Hypothesis- "The relative price depends on the Aircraft variable".

# T-Test to check correlation between PriceRelative and Aircraft.
t.test(Airlines$PriceRelative ~ Airlines$Aircraft)
## 
##  Welch Two Sample t-test
## 
## data:  Airlines$PriceRelative by Airlines$Aircraft
## t = -2.6145, df = 363.72, p-value = 0.009306
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  -0.18934647 -0.02678486
## sample estimates:
## mean in group AirBus mean in group Boeing 
##            0.4147682            0.5228339
# As p-value=0.009306(<0.05).We can easily reject the null hypothesis for Aircraft column.Therefore there is no correlation between Relative price and Aircraft.

Regression Model:

The linear model will be:

relative_price = x0 + Airline* x1 + Flightduration * x2 + IsInternational * x3 + Pitch Economy * x4 + Pitch Premium * x5 + Pitch Difference * x6 + Width Premium * x7 + Width Difference * x8 + Seats Premium * x9

# We have variables line Airline and IsInternational which have unique values and We have to convert them into factos.

# converting into integers
Airlines$Airline[Airlines$Res == 0] <- 'AirFrance'
Airlines$Airline[Airlines$Res == 1] <- 'British'
Airlines$Airline[Airlines$Res == 2] <- 'Delta'
Airlines$Airline[Airlines$Res == 3] <- 'Jet'
Airlines$Airline[Airlines$Res == 4] <- 'Singapore'
Airlines$Airline[Airlines$Res == 5] <- 'Virgin'

# convert Airline into factor variable 
Airlines$Airline<- factor(Airlines$Airline)

# converting into integers
Airlines$IsInternational[Airlines$Res == 0] <- 'Domestic'
Airlines$IsInternational[Airlines$Res == 1] <- 'International'

# convert IsInternational into factor variable 
Airlines$IsInternational<- factor(Airlines$IsInternational)

Airlinemodel <- lm(PriceRelative ~Airline
+FlightDuration
+IsInternational
+PitchEconomy
+PitchPremium
+WidthEconomy
+WidthPremium
 ,  data=Airlines)

# Summary of the model.
summary(Airlinemodel)
## 
## Call:
## lm(formula = PriceRelative ~ Airline + FlightDuration + IsInternational + 
##     PitchEconomy + PitchPremium + WidthEconomy + WidthPremium, 
##     data = Airlines)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -0.8159 -0.1933 -0.0549  0.1009  1.4689 
## 
## Coefficients:
##                               Estimate Std. Error t value Pr(>|t|)    
## (Intercept)                  -0.904967   4.976180  -0.182 0.855775    
## AirlineBritish                0.250299   0.159931   1.565 0.118283    
## AirlineDelta                  0.061917   0.354717   0.175 0.861510    
## AirlineJet                    0.534838   0.140825   3.798 0.000166 ***
## AirlineSingapore              0.322987   0.204182   1.582 0.114390    
## AirlineVirgin                 0.417100   0.326186   1.279 0.201661    
## FlightDuration                0.036153   0.006173   5.856  9.2e-09 ***
## IsInternationalInternational -0.406100   0.399055  -1.018 0.309394    
## PitchEconomy                 -0.055148   0.133621  -0.413 0.680012    
## PitchPremium                  0.085155   0.151506   0.562 0.574361    
## WidthEconomy                 -0.073197   0.078098  -0.937 0.349140    
## WidthPremium                  0.052925   0.222769   0.238 0.812319    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.36 on 446 degrees of freedom
## Multiple R-squared:  0.3772, Adjusted R-squared:  0.3618 
## F-statistic: 24.55 on 11 and 446 DF,  p-value: < 2.2e-16
# The coeffecients of the model.
Airlinemodel$coefficients
##                  (Intercept)               AirlineBritish 
##                  -0.90496697                   0.25029934 
##                 AirlineDelta                   AirlineJet 
##                   0.06191693                   0.53483769 
##             AirlineSingapore                AirlineVirgin 
##                   0.32298704                   0.41709999 
##               FlightDuration IsInternationalInternational 
##                   0.03615307                  -0.40609991 
##                 PitchEconomy                 PitchPremium 
##                  -0.05514750                   0.08515457 
##                 WidthEconomy                 WidthPremium 
##                  -0.07319684                   0.05292480
# The predicted model.
fitted(Airlinemodel)
##             1             2             3             4             5 
##  0.5964366234  0.5964366234  0.5964366234  0.5964366234  0.4485705758 
##             6             7             8             9            10 
##  0.4485705758  0.4485705758  0.3885564831  0.3885564831  0.5693218225 
##            11            12            13            14            15 
##  0.5693218225  0.5693218225  0.5693218225  0.5722140679  0.5722140679 
##            16            17            18            19            20 
##  0.5722140679  0.4847236437  0.4847236437  0.4847236437  0.3975947501 
##            21            22            23            24            25 
##  0.3975947501  0.3975947501  0.3943409740  0.3943409740  0.3943409740 
##            26            27            28            29            30 
##  0.4699008858  0.4699008858  0.4699008858  0.3310731052  0.3310731052 
##            31            32            33            34            35 
##  0.3310731052  0.2920277919  0.2920277919  0.2920277919  0.2920277919 
##            36            37            38            39            40 
##  0.6416279582  0.6416279582  0.6416279582  0.2920277919  0.2920277919 
##            41            42            43            44            45 
##  0.2920277919  0.2920277919  0.3491496392  0.3491496392  0.3491496392 
##            46            47            48            49            50 
##  0.4518243519  0.4518243519  0.4518243519  0.6145131573  0.6145131573 
##            51            52            53            54            55 
##  0.6145131573  0.3885564831  0.5541375340  0.5541375340  0.5541375340 
##            56            57            58            59            60 
##  0.3733721946  0.3733721946  0.3733721946  0.6054748903  0.5892060098 
##            61            62            63            64            65 
##  0.6054748903  0.7154363330  0.7154363330  0.7154363330  0.7154363330 
##            66            67            68            69            70 
##  0.7454433794  0.7454433794  0.7454433794  0.7454433794  0.6821755106 
##            71            72            73            74            75 
##  0.6821755106  0.6821755106  0.7063980661  0.0522112890  0.0619726173 
##            76            77            78            79            80 
##  0.0522112890  0.0504036356  0.0619726173  0.0410038379  0.0608880253 
##            81            82            83            84            85 
##  0.0608880253  0.4004869955  0.4004869955  0.4004869955  0.4004869955 
##            86            87            88            89            90 
##  0.4276017964  0.4276017964  0.4276017964  0.4276017964  0.9539544255 
##            91            92            93            94            95 
##  0.9539544255  0.9539544255  0.9539544255  0.9539544255  0.9539544255 
##            96            97            98            99           100 
##  0.9539544255  0.9539544255  0.0968725799  0.5570297794  0.5570297794 
##           101           102           103           104           105 
##  0.5570297794  0.5570297794  0.5331687546  0.5331687546  0.5331687546 
##           106           107           108           109           110 
##  0.5331687546  0.6264436697  0.6264436697  0.6264436697  0.5570297794 
##           111           112           113           114           115 
##  0.5570297794  0.5570297794  0.3010660589  0.2829895250  0.2829895250 
##           116           117           118           119           120 
##  0.2406904356  0.2710590126  0.2710590126  0.2829895250  0.2497287025 
##           121           122           123           124           125 
##  0.2406904356  0.2406904356  0.2406904356  0.2710590126  0.2197216562 
##           126           127           128           129           130 
##  0.2829895250  0.3162503474  0.2406904356  0.3162503474  0.2197216562 
##           131           132           133           134           135 
##  0.2406904356  0.2829895250  0.3010660589  0.2558747241  0.3162503474 
##           136           137           138           139           140 
##  0.1987528768  0.3010660589  0.1987528768  0.2406904356  0.2197216562 
##           141           142           143           144           145 
##  0.2197216562  0.1987528768  0.1987528768  0.1987528768  0.2829895250 
##           146           147           148           149           150 
##  0.2558747241  0.2016451223  0.2016451223  0.1987528768  0.2406904356 
##           151           152           153           154           155 
##  0.2016451223  0.1642858197  0.1707933719  0.1642858197  0.1707933719 
##           156           157           158           159           160 
##  0.8329338036  0.8329338036  0.8329338036  0.8329338036  0.8629408499 
##           161           162           163           164           165 
##  0.8629408499  0.8629408499  0.8629408499  0.7844886927  0.7844886927 
##           166           167           168           169           170 
##  0.7844886927  0.7844886927  0.8177495151  0.8177495151  0.8177495151 
##           171           172           173           174           175 
##  0.8177495151  0.8025652266  0.8810173839  0.8148572697  0.8148572697 
##           176           177           178           179           180 
##  0.8148572697  0.8148572697  0.8810173839  0.8358260490  0.7031442900 
##           181           182           183           184           185 
##  0.7031442900  0.7031442900  0.7031442900  0.8810173839  0.3721837886 
##           186           187           188           189           190 
##  0.3721837886  0.4144828780  0.4144828780  0.4144828780  0.3721837886 
##           191           192           193           194           195 
##  0.6760294891  0.6760294891  0.6760294891  0.6760294891  0.6640989767 
##           196           197           198           199           200 
##  0.6640989767  0.6640989767  0.6640989767  0.8025652266  0.8025652266 
##           201           202           203           204           205 
##  0.8025652266  0.8358260490  0.8358260490  0.6941060230  0.6941060230 
##           206           207           208           209           210 
##  0.6941060230  0.6941060230  0.6821755106  0.7063980661  0.7063980661 
##           211           212           213           214           215 
##  0.7063980661  0.1915688465  0.1915688465  0.1915688465  0.1492697571 
##           216           217           218           219           220 
##  0.1492697571  0.1492697571  0.1492697571  0.1492697571  0.1492697571 
##           221           222           223           224           225 
##  0.1492697571  0.1492697571  0.1131166892  0.1131166892  0.1131166892 
##           226           227           228           229           230 
##  0.0950401553  0.0950401553  0.1702385364  0.1702385364  0.1702385364 
##           231           232           233           234           235 
##  0.1402314901  0.1799998648  0.1799998648  0.1825305795  0.1825305795 
##           236           237           238           239           240 
##  0.1792768034  0.1792768034  0.1825305795  0.1825305795  0.5299149785 
##           241           242           243           244           245 
##  0.5299149785  0.5299149785  0.5512452885  0.5512452885  0.5512452885 
##           246           247           248           249           250 
##  0.5118384445  0.5118384445  0.5118384445  0.5118384445  0.4637548643 
##           251           252           253           254           255 
##  0.4637548643  0.4637548643  0.5660680463  0.5660680463  0.5660680463 
##           256           257           258           259           260 
##  0.5660680463  0.4908696652  0.4908696652  0.4908696652  0.4756853767 
##           261           262           263           264           265 
##  0.4666471097  0.4666471097  0.4666471097  0.4156712840  0.4156712840 
##           266           267           268           269           270 
##  0.4156712840  0.4756853767  0.4095252625  0.4095252625  0.4095252625 
##           271           272           273           274           275 
##  0.5660680463  0.5660680463  0.5660680463  0.5660680463  0.4756853767 
##           276           277           278           279           280 
##  0.5541375340  0.5541375340  0.5541375340  0.4095252625  0.5541375340 
##           281           282           283           284           285 
##  0.0975956412  0.0965110492  0.1102492150  0.1109722764  0.1113338070 
##           286           287           288           289           290 
##  0.1679274299  0.1679274299  0.1679274299  0.1004878867  0.0965110492 
##           291           292           293           294           295 
##  0.1030186014  0.1679274299  0.0968725799  0.1019340094  0.0419199371 
##           296           297           298           299           300 
##  0.0133589931  0.0245664442  0.0650579005  0.0650579005  0.1102492150 
##           301           302           303           304           305 
##  0.0762653515  0.0082975636  0.0090206250 -0.0003791727  0.0632502471 
##           306           307           308           309           310 
##  0.0079360329 -0.0003791727  0.7264065414  0.7264065414  0.7264065414 
##           311           312           313           314           315 
##  0.7050762314  0.7050762314  0.7264065414  0.7050762314  0.6537188697 
##           316           317           318           319           320 
##  0.6537188697  0.6537188697  0.6537188697  0.5994892679  0.5994892679 
##           321           322           323           324           325 
##  0.5994892679  0.5423674207  0.5423674207  0.5423674207  0.6808336706 
##           326           327           328           329           330 
##  0.6808336706  0.6808336706  0.5000683313  0.5000683313  0.5000683313 
##           331           332           333           334           335 
##  0.2892959456  0.2892959456  0.2892959456  0.2892959456  0.6117813110 
##           336           337           338           339           340 
##  0.6117813110  0.6117813110  0.6117813110  0.2224666002  0.2224666002 
##           341           342           343           344           345 
##  0.2224666002  0.1924595538  0.1682369984  0.2376508887  0.2376508887 
##           346           347           348           349           350 
##  0.2376508887  0.1982440447  0.1682369984  0.1682369984  0.2647656896 
##           351           352           353           354           355 
##  0.2647656896  0.2647656896  0.2647656896  0.2014978208  0.2014978208 
##           356           357           358           359           360 
##  0.2014978208  0.2043900662  0.2615119135  0.2615119135  0.2615119135 
##           361           362           363           364           365 
##  0.3461100923  0.3461100923  0.3518945831  0.3518945831  0.3518945831 
##           366           367           368           369           370 
##  0.3518945831  0.6535584706  0.6535584706  0.6535584706  0.6354819366 
##           371           372           373           374           375 
##  0.6354819366  0.6354819366  0.4756853767  0.4756853767  0.4756853767 
##           376           377           378           379           380 
##  0.4999079322  0.4999079322  0.4999079322  0.9601004470  0.9601004470 
##           381           382           383           384           385 
##  0.9601004470  0.9601004470  0.9601004470  0.9929997388  0.9929997388 
##           386           387           388           389           390 
##  0.9901074933  0.9329856461  0.9329856461  0.9329856461  0.9387701370 
##           391           392           393           394           395 
##  0.9387701370  0.9387701370  0.9929997388  0.9601004470  0.9901074933 
##           396           397           398           399           400 
##  0.9929997388  0.9929997388  0.9329856461  0.9387701370  0.9991457603 
##           401           402           403           404           405 
##  0.9991457603  0.9991457603  0.9991457603  0.9601004470  0.9601004470 
##           406           407           408           409           410 
##  0.1711292438  0.1711292438  0.1711292438  0.1711292438  0.6327500903 
##           411           412           413           414           415 
##  0.6327500903  0.6327500903  0.6327500903  0.3735325938  0.3735325938 
##           416           417           418           419           420 
##  0.3735325938  0.3735325938  0.6085275349  0.6085275349  0.6085275349 
##           421           422           423           424           425 
##  0.6085275349  0.3858246368  0.3858246368  0.3858246368  0.3858246368 
##           426           427           428           429           430 
##  0.3181045840  0.3181045840  0.1192627108  0.1192627108  0.2335064052 
##           431           432           433           434           435 
##  0.2335064052  0.2335064052  0.1521620025  0.1554157786  0.1554157786 
##           436           437           438           439           440 
##  0.1554157786  0.2638749822  0.2638749822  0.3181045840  1.0472293406 
##           441           442           443           444           445 
##  0.9568466709  0.9568466709  1.0472293406  1.0472293406  1.0472293406 
##           446           447           448           449           450 
##  1.0472293406  1.0472293406  0.9568466709  0.9358778915  0.9358778915 
##           451           452           453           454           455 
##  0.9358778915  0.9568466709  0.9358778915  0.9358778915  0.9358778915 
##           456           457           458 
##  0.9358778915  0.9601004470  0.9358778915

Inferences:

The Relative price difference between Economy and Premium Economy tickets is due to the following Factors as an outcome of the data analysis of Airline dataset:

a} Airline company: Lowest relative price difference in Airlines being AirFrance and Delta and highest being Jet Airlines.

b} International or Domestic flight: Domestic flights having low Difference in prices of tickets than International flights.

c} Flight duration: Increase in Flight Duration, increases the Relative price difference.

d} PitchEconomy: As the pitch of Economy class increases, the Relative Price reduces.

e} PitchPremium: As the pitch of Premium Economy class increases, the Relative Price difference increases.

f} PitchDifference: As difference in Pitch increases, the Relative Price difference increases.

g} width Difference: As difference in Width increases,the Relative Price difference increases.