Reading the data file

setwd("~/Desktop/5 SRM Kashish Mukheja/Downoad content")
air<-read.csv(paste("SixAirlinesDataV2.csv",sep=""))
View(air)

Summary statistics

summary(air)
##       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

Structure of dataset

str(air)
## 'data.frame':    458 obs. of  18 variables:
##  $ Airline            : Factor w/ 6 levels "AirFrance","British",..: 2 2 2 2 2 2 2 2 2 2 ...
##  $ Aircraft           : Factor w/ 2 levels "AirBus","Boeing": 2 2 2 2 2 2 2 2 2 2 ...
##  $ FlightDuration     : num  12.25 12.25 12.25 12.25 8.16 ...
##  $ TravelMonth        : Factor w/ 4 levels "Aug","Jul","Oct",..: 2 1 4 3 1 4 3 1 4 4 ...
##  $ IsInternational    : Factor w/ 2 levels "Domestic","International": 2 2 2 2 2 2 2 2 2 2 ...
##  $ SeatsEconomy       : int  122 122 122 122 122 122 122 122 122 122 ...
##  $ SeatsPremium       : int  40 40 40 40 40 40 40 40 40 40 ...
##  $ PitchEconomy       : int  31 31 31 31 31 31 31 31 31 31 ...
##  $ PitchPremium       : int  38 38 38 38 38 38 38 38 38 38 ...
##  $ WidthEconomy       : int  18 18 18 18 18 18 18 18 18 18 ...
##  $ WidthPremium       : int  19 19 19 19 19 19 19 19 19 19 ...
##  $ PriceEconomy       : int  2707 2707 2707 2707 1793 1793 1793 1476 1476 1705 ...
##  $ PricePremium       : int  3725 3725 3725 3725 2999 2999 2999 2997 2997 2989 ...
##  $ PriceRelative      : num  0.38 0.38 0.38 0.38 0.67 0.67 0.67 1.03 1.03 0.75 ...
##  $ SeatsTotal         : int  162 162 162 162 162 162 162 162 162 162 ...
##  $ PitchDifference    : int  7 7 7 7 7 7 7 7 7 7 ...
##  $ WidthDifference    : int  1 1 1 1 1 1 1 1 1 1 ...
##  $ PercentPremiumSeats: num  24.7 24.7 24.7 24.7 24.7 ...

Creating dummy indicator variables for Airline

air$airline_code[air$Airline=="British"]<-1
air$airline_code[air$Airline=="Virgin"]<-2
air$airline_code[air$Airline=="Delta"]<-3
air$airline_code[air$Airline=="Jet"]<-4
air$airline_code[air$Airline=="Singapore"]<-5
air$airline_code[air$Airline=="AirFrance"]<-6
View(air)
library(psych)
describe(air$airline_code)
##    vars   n mean  sd median trimmed  mad min max range skew kurtosis   se
## X1    1 458 2.89 1.9      2    2.74 1.48   1   6     5 0.46     -1.3 0.09

Creating dummy indicator variables for Aircraft

air$Aircraft_code[air$Aircraft=="AirBus"]<-1
air$Aircraft_code[air$Aircraft=="Boeing"]<-2
View(air)

Creating dummy indicator variables for Aircraft

1:-For flight duration less than or equal to 4 hours,the flight is “short haul” and denoted by 1
2:-For flight duration greater than 4 hours and less than or equal to 8 hours,the flight is “medium haul” and denoted by 2
3:-For flight duration greater than 8 hours,the flight is “long haul” and denoted by 3

air$fd[air$FlightDuration<=4]<-1
air$fd[air$FlightDuration>4 &air$FlightDuration<=8]<-2
air$fd[air$FlightDuration>8]<-3
View(air)

Creating a dummy variable for TravelMonth

air$monthnum[air$TravelMonth=="Jul"]<-7
air$monthnum[air$TravelMonth=="Aug"]<-8
air$monthnum[air$TravelMonth=="Sep"]<-9
air$monthnum[air$TravelMonth=="Oct"]<-10

Creating dummy variable for IsInternational

air$intnum[air$IsInternational=="International"]<-1
air$intnum[air$IsInternational=="Domestic"]<-0

Viewing the dataframe

colnames(air)
##  [1] "Airline"             "Aircraft"            "FlightDuration"     
##  [4] "TravelMonth"         "IsInternational"     "SeatsEconomy"       
##  [7] "SeatsPremium"        "PitchEconomy"        "PitchPremium"       
## [10] "WidthEconomy"        "WidthPremium"        "PriceEconomy"       
## [13] "PricePremium"        "PriceRelative"       "SeatsTotal"         
## [16] "PitchDifference"     "WidthDifference"     "PercentPremiumSeats"
## [19] "airline_code"        "Aircraft_code"       "fd"                 
## [22] "monthnum"            "intnum"

Adding a column “PitchRelative”

air$PitchRelative<-air$PitchDifference/air$PitchEconomy

Adding a column “WidthRelative”

air$WidthRelative<-air$WidthDifference/air$WidthEconomy

Creating a new dataframe airnum from air

airnum<-air[,c(3,6:18,24,25)]
View(airnum)
colnames(airnum)
##  [1] "FlightDuration"      "SeatsEconomy"        "SeatsPremium"       
##  [4] "PitchEconomy"        "PitchPremium"        "WidthEconomy"       
##  [7] "WidthPremium"        "PriceEconomy"        "PricePremium"       
## [10] "PriceRelative"       "SeatsTotal"          "PitchDifference"    
## [13] "WidthDifference"     "PercentPremiumSeats" "PitchRelative"      
## [16] "WidthRelative"

Visualising the data

Histogram for different variables

library(lattice)
histogram(~PriceEconomy,
          data=air,
          type="count",
          nint=10,
          xlab="Economy Price", main="Price of Economy")

histogram(~PricePremium,
          data=air,
          type="count",
          nint=10,
          xlab="Premium Price", main="Price of Premium Economy")

histogram(~PercentPremiumSeats,
          data=air,
          type="count",
          nint=10,
          xlab="PercentPremiumSeats", main="Percentage of Premium Seats")

histogram(~airline_code,
          data=air,
          type="count",
          nint=6,
          xlab="AirlineCode", main="Airline Company")

histogram(~Aircraft_code,
          data=air,
          type="count",
          nint=2,
          xlab="AircraftCode", main="Airbus Vs Boeing")

histogram(~monthnum,
          data=air,
          type="count",
          nint=4,
          xlab="monthnum", main="Month number")

histogram(~intnum,
          data=air,
          type="count",
          nint=4,
          xlab="IsInternational", main="Domestic VS International")

BarPlots and BoxPlots

par(mfrow = c(1,2))
barplot(air$PitchDifference)
boxplot(air$PitchDifference)

par(mfrow = c(1,2))
barplot(air$WidthDifference)
boxplot(air$WidthDifference)

par(mfrow = c(1,2))
barplot(air$PriceRelative)
boxplot(air$PriceRelative)

Scatterplot for PricePremium,PitchPremium and WidthPremium

pairs(formula=~PricePremium+PitchPremium+WidthPremium,data=airnum)

Scatterplot for PriceEconomy,PitchEconomy and WidthEconomy

pairs(formula=~PriceEconomy+PitchEconomy+WidthEconomy,data=airnum)

Scatterplot for PriceRelative,PricePremium and PriceEconomy

pairs(formula=~PriceRelative+PricePremium+PriceEconomy,data=airnum)

Scatterplot for Airline,Aircraft,PricePremium and PercentPremiumSeats

pairs(formula=~Airline+Aircraft+PricePremium+PercentPremiumSeats,data=air)

T-test to check validity of the research question

Ho:-There is no significant difference between the price of Economy and Premium Economy ticket H1:-There is a significant difference between the price of Economy and Premium Economy ticket

t.test(air$PriceEconomy,air$PricePremium)
## 
##  Welch Two Sample t-test
## 
## data:  air$PriceEconomy and air$PricePremium
## t = -6.8304, df = 856.56, p-value = 1.605e-11
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  -667.0831 -369.2793
## sample estimates:
## mean of x mean of y 
##  1327.076  1845.258

We reject the Null Hypothesis,since p-vale<0.05.Hence there is a significant difference between the price of Economy and Prmium Economy tickets.

What factors explain the difference in price between an economy ticket and a Premium Economy airline ticket?

Ho:-There is no significant difference between the pitch of Economy and Pitch of Premium Economy H1:-There is a significant difference between the pitch of Economy and Pitch of Premium Economy

t.test(air$PitchPremium,air$PitchEconomy)
## 
##  Welch Two Sample t-test
## 
## data:  air$PitchPremium and air$PitchEconomy
## t = 97.482, df = 671.02, p-value < 2.2e-16
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  6.553067 6.822479
## sample estimates:
## mean of x mean of y 
##  37.90611  31.21834

We reject the Null Hypothesis,since p-vale<0.05.Hence there is a significant difference between the price of Economy and Prmium Economy tickets.

Ho:-There is no significant difference between the width of Economy and width of Premium Economy H1:-There is a significant difference between the width of Economy and width of Premium Economy

t.test(air$WidthPremium,air$WidthEconomy)
## 
##  Welch Two Sample t-test
## 
## data:  air$WidthPremium and air$WidthEconomy
## t = 28.4, df = 678.24, p-value < 2.2e-16
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  1.520276 1.746100
## sample estimates:
## mean of x mean of y 
##  19.47162  17.83843

Checking for significant difference in prices of Economy and Premium Economy in International Flights

Ho:-There is no significant difference between the price of Economy and Premium Economy ticket in International Flights
H1:-There is a significant difference between the price of Economy and Premium Economy ticket in International Flights

t.test(air$PriceEconomy[air$IsInternational=="International"],air$PricePremium[air$IsInternational=="International"])
## 
##  Welch Two Sample t-test
## 
## data:  air$PriceEconomy[air$IsInternational == "International"] and air$PricePremium[air$IsInternational == "International"]
## t = -7.2153, df = 787.46, p-value = 1.267e-12
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  -718.6707 -411.2623
## sample estimates:
## mean of x mean of y 
##  1419.943  1984.909

Since p-vale<0.05, hence there is a significant difference between the price of Economy and Prmium Economy tickets in International Flights.

Checking for significant difference in prices of Economy and Premium Economy in Domestic Flights

Ho:-There is no significant difference between the price of Economy and Premium Economy ticket in Domestic Flights
H1:-There is a significant difference between the price of Economy and Premium Economy ticket in Domestic Flights

t.test(air$PriceEconomy[air$IsInternational=="Domestic"],air$PricePremium[air$IsInternational=="Domestic"],alternative = "less")
## 
##  Welch Two Sample t-test
## 
## data:  air$PriceEconomy[air$IsInternational == "Domestic"] and air$PricePremium[air$IsInternational == "Domestic"]
## t = -1.0009, df = 77.783, p-value = 0.16
## alternative hypothesis: true difference in means is less than 0
## 95 percent confidence interval:
##      -Inf 19.41591
## sample estimates:
## mean of x mean of y 
##   356.625   385.900

Since p-vale>0.05, hence there is no significant difference between the price of Economy and Prmium Economy tickets in Domestic Flights.

Subsetting the data frame to include International Flights only

airint<-subset(air, intnum==1)
airintnum<-airint[,c(3,6:18,24,25)]
colnames(airintnum)
##  [1] "FlightDuration"      "SeatsEconomy"        "SeatsPremium"       
##  [4] "PitchEconomy"        "PitchPremium"        "WidthEconomy"       
##  [7] "WidthPremium"        "PriceEconomy"        "PricePremium"       
## [10] "PriceRelative"       "SeatsTotal"          "PitchDifference"    
## [13] "WidthDifference"     "PercentPremiumSeats" "PitchRelative"      
## [16] "WidthRelative"
View(airint)

Visualisation through corrgram

library(corrgram)
library(ellipse)
## 
## Attaching package: 'ellipse'
## The following object is masked from 'package:graphics':
## 
##     pairs
corrgram(airintnum, order = FALSE, lower.panel = panel.shade, upper.panel = panel.pie, text.panel = panel.txt,main = "Corrgram of Airline for International flights only")

corrgram(airnum, order = FALSE, lower.panel = panel.shade, upper.panel = panel.pie, text.panel = panel.txt,main = "Corrgram of Airline for all flights")

Correlation matrix for {PitchEconomy,PitchPremium,WidthEconomy,WidthPremium,PriceEconomy,PricePremium,PriceRelative,fd}:-

cor(airnum)
##                     FlightDuration SeatsEconomy  SeatsPremium PitchEconomy
## FlightDuration          1.00000000  0.195621187  0.1612364005   0.29377174
## SeatsEconomy            0.19562119  1.000000000  0.6250565872   0.14412692
## SeatsPremium            0.16123640  0.625056587  1.0000000000  -0.03421296
## PitchEconomy            0.29377174  0.144126924 -0.0342129634   1.00000000
## PitchPremium            0.09621471  0.119221250  0.0048831233  -0.55060624
## WidthEconomy            0.45647720  0.373670252  0.4557828832   0.29448586
## WidthPremium            0.10343747  0.102431959 -0.0027175270  -0.53929285
## PriceEconomy            0.56664039  0.128167220  0.1136421759   0.36866123
## PricePremium            0.64873981  0.177000928  0.2176123761   0.22614179
## PriceRelative           0.12107501  0.003956939 -0.0971960086  -0.42302204
## SeatsTotal              0.20023299  0.992607966  0.7151710528   0.12373524
## PitchDifference        -0.03749288  0.035318044  0.0163655665  -0.78254993
## WidthDifference        -0.11856070 -0.080670148 -0.2161686663  -0.63557430
## PercentPremiumSeats     0.06051625 -0.330935223  0.4850297707  -0.10280880
## PitchRelative          -0.07101777  0.011925020 -0.0001916997  -0.81202273
## WidthRelative          -0.13908982 -0.097433711 -0.2395914386  -0.64215658
##                     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
## PitchRelative        0.933696812  -0.15931401  0.754023245  -0.13266948
## WidthRelative        0.704290220  -0.42485307  0.866984053  -0.09258277
##                     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
## PitchRelative        -0.04727707   0.474976469  0.01064814      0.99836034
## WidthRelative        -0.02662466   0.481628665 -0.12449626      0.76409109
##                     WidthDifference PercentPremiumSeats PitchRelative
## FlightDuration          -0.11856070          0.06051625 -0.0710177724
## SeatsEconomy            -0.08067015         -0.33093522  0.0119250200
## SeatsPremium            -0.21616867          0.48502977 -0.0001916997
## PitchEconomy            -0.63557430         -0.10280880 -0.8120227291
## PitchPremium             0.70328180         -0.17548741  0.9336968121
## WidthEconomy            -0.39320512          0.22714172 -0.1593140096
## WidthPremium             0.88414965         -0.18331206  0.7540232445
## PriceEconomy            -0.08449975          0.06532232 -0.1326694763
## PricePremium            -0.01151218          0.11639097 -0.0472770663
## PriceRelative            0.48580244         -0.16156556  0.4749764693
## SeatsTotal              -0.10584398         -0.22091465  0.0106481421
## PitchDifference          0.76089108         -0.09264869  0.9983603360
## WidthDifference          1.00000000         -0.27559416  0.7703083669
## PercentPremiumSeats     -0.27559416          1.00000000 -0.0911991820
## PitchRelative            0.77030837         -0.09119918  1.0000000000
## WidthRelative            0.99899976         -0.28544425  0.7745541887
##                     WidthRelative
## FlightDuration        -0.13908982
## SeatsEconomy          -0.09743371
## SeatsPremium          -0.23959144
## PitchEconomy          -0.64215658
## PitchPremium           0.70429022
## WidthEconomy          -0.42485307
## WidthPremium           0.86698405
## PriceEconomy          -0.09258277
## PricePremium          -0.02662466
## PriceRelative          0.48162867
## SeatsTotal            -0.12449626
## PitchDifference        0.76409109
## WidthDifference        0.99899976
## PercentPremiumSeats   -0.28544425
## PitchRelative          0.77455419
## WidthRelative          1.00000000

Insight from corrgram of Airline for all flights:-


1.There is a strong positive correlation between PricePremium and FlightDuration.Which means,more is the duration of flight,greater will the price of Premium Economy.
2.There is a positive correlation between PitchEconomy and WidthEconomy.
3.Similarly, there is a positive correlation between PitchPremium and WidthPremium.
4.We can observe a positive correlation between PriceRelative and PitchDifference as well as PriceRelative and WidthDifference

Regression analysis

PricePremium being the dependent variable:-

fit1<-lm(PricePremium ~ FlightDuration + WidthDifference + PitchDifference + intnum +SeatsPremium , data = air)
summary(fit1)
## 
## Call:
## lm(formula = PricePremium ~ FlightDuration + WidthDifference + 
##     PitchDifference + intnum + SeatsPremium, data = air)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -2126.4  -624.5    77.1   631.2  4699.9 
## 
## Coefficients:
##                 Estimate Std. Error t value Pr(>|t|)    
## (Intercept)      652.385    252.225   2.587   0.0100 *  
## FlightDuration   176.534     15.670  11.265  < 2e-16 ***
## WidthDifference  332.107     61.367   5.412 1.01e-07 ***
## PitchDifference -415.877     62.318  -6.673 7.33e-11 ***
## intnum          2021.740    338.670   5.970 4.81e-09 ***
## SeatsPremium       7.396      3.801   1.946   0.0523 .  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 921.5 on 452 degrees of freedom
## Multiple R-squared:  0.4939, Adjusted R-squared:  0.4883 
## F-statistic: 88.21 on 5 and 452 DF,  p-value: < 2.2e-16

PriceEconomy being the dependent variable

fit2<-lm(PriceEconomy ~ FlightDuration +WidthDifference + PitchDifference + intnum + SeatsEconomy, data = air)
summary(fit2)
## 
## Call:
## lm(formula = PriceEconomy ~ FlightDuration + WidthDifference + 
##     PitchDifference + intnum + SeatsEconomy, data = air)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -1677.72  -451.00    40.66   458.05  1816.67 
## 
## Coefficients:
##                 Estimate Std. Error t value Pr(>|t|)    
## (Intercept)     1493.074    206.245   7.239 1.95e-12 ***
## FlightDuration    83.062     12.396   6.701 6.18e-11 ***
## WidthDifference  238.459     47.608   5.009 7.87e-07 ***
## PitchDifference -502.240     50.647  -9.917  < 2e-16 ***
## intnum          2751.655    271.104  10.150  < 2e-16 ***
## SeatsEconomy      -1.667      0.506  -3.295  0.00106 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 732.7 on 452 degrees of freedom
## Multiple R-squared:  0.4563, Adjusted R-squared:  0.4503 
## F-statistic: 75.88 on 5 and 452 DF,  p-value: < 2.2e-16

PriceRelative being the dependent variable

fit3<-lm(PriceRelative ~ FlightDuration + WidthDifference + PitchDifference + intnum , data = air)
summary(fit3)
## 
## Call:
## lm(formula = PriceRelative ~ FlightDuration + WidthDifference + 
##     PitchDifference + intnum, data = air)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.82785 -0.24889 -0.06653  0.13341  1.30701 
## 
## Coefficients:
##                  Estimate Std. Error t value Pr(>|t|)    
## (Intercept)     -0.415845   0.092414  -4.500 8.66e-06 ***
## FlightDuration   0.040569   0.006253   6.488 2.29e-10 ***
## WidthDifference  0.089529   0.024166   3.705 0.000238 ***
## PitchDifference  0.152867   0.024902   6.139 1.82e-09 ***
## intnum          -0.627755   0.125854  -4.988 8.71e-07 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.3719 on 453 degrees of freedom
## Multiple R-squared:  0.3246, Adjusted R-squared:  0.3187 
## F-statistic: 54.44 on 4 and 453 DF,  p-value: < 2.2e-16

Inference

Hence we may infer that the model is statistically significant since the p-value<0.05.
1.PricePremium = 176.53FlightDuration + 332.107WidthDifference -415.877PitchDifference -2021.74.89intnum + Intercept
2.PriceEconomy = 83.06FlightDuration + 238.46WidthDifference -502.24PitchDifference -2751.65intnum -1.67SeatsEconomy+Intercept
3.PriceRelative = 0.040569FlightDuration + 0.089529WidthDifference +0.152867PitchDifference +0.627755intnum +Intercept

Conclusion:-
1.We can infer from the plots that
The major aircraft type was Boeing.
The flights which flew most were the British Airline.
Most flights flew in the month of September
Almost 90% of the flights were International.
2.Hence from the overall T-test analysis we may conclude that the there there is a significant difference between the pitch and width of Economy and Premium Economy seats.This justifies why the rates of Premium Economy tickets are higher than Economy tickets mainly in International Flights.