Here, we are trying to analyse what factors cause the difference between economy and premium economy pricing in 6 top airlines- British Airways, Delta Airlines, Air France, Singapore Airlines, Virgin Airlines and Jet Airways.
The following data set has been used in this analysis:
setwd("C:\\Users\\Tejajay\\Desktop\\Internship\\3. Data Analytics")
SixAirlines <- read.csv(paste("SixAirlinesData.csv", sep=""))
On average, an airline has 236 seats, out of which around 203 are economy-class seats, and 33 seats are classified as premium-economy. That is, around 14.6% seats are premium-economy.
summary(SixAirlines$SeatsTotal)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 98 166 227 236 279 441
summary(SixAirlines$SeatsEconomy)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 78.0 133.0 185.0 202.3 243.0 389.0
summary(SixAirlines$SeatsPremium)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 8.00 21.00 36.00 33.65 40.00 66.00
mean(SixAirlines$PercentPremiumSeats)
## [1] 14.64541
The average price of an economy seat is USD 1327, while the average price of a premium-economy seat is USD 1845, i.e premium-economy seats are pricier by almost 49%.
summary(SixAirlines$PriceEconomy)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 65 413 1242 1327 1909 3593
summary(SixAirlines$PricePremium)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 86.0 528.8 1737.0 1845.3 2989.0 7414.0
mean(SixAirlines$PriceRelative)*100
## [1] 48.72052
This difference in price can be attributes to enhanced features in premium-economy seats, viz. greater legroom (a.k.a pitch) and wider seats. On average, we see that premium-economy seats have 6.6 inches more legroom than economy seats, and are wider by around 1.6 inches.
mean(SixAirlines$PitchDifference)
## [1] 6.687773
mean(SixAirlines$WidthDifference)
## [1] 1.633188
There are other, more indirect factors that influence this difference in pricing. Some of them are: flight duration, season / month of travel, whether the flight is an international or domestic one, and the make of the aircraft (Boeing or Airbus).
summary(SixAirlines$FlightDuration)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 1.250 4.260 7.790 7.578 10.620 14.660
summary(SixAirlines$TravelMonth)
## Aug Jul Oct Sep
## 127 75 127 129
summary(SixAirlines$Aircraft)
## AirBus Boeing
## 151 307
summary(SixAirlines$IsInternational)
## Domestic International
## 40 418
We will analyse trends for one sample airline, say, British Airlines, to get a decent picture of how pricing changes with respect to different factors.
SixAirlines1 <- SixAirlines[ which(SixAirlines$Airline=='British'), ]
We take a look at the distribution of price difference with regards to difference in legroom and seat width.
pricevspitch <- table(SixAirlines$PriceRelative, SixAirlines$PitchDifference)
barplot(pricevspitch, main = "Price Difference With Respect to Legroom Difference", xlab = "Legroom", ylab = "Price Difference")
pricevswidth <- table(SixAirlines$PriceRelative, SixAirlines$WidthDifference)
barplot(pricevswidth, main = "Price Difference with Respect to Width Difference", xlab = "Width", ylab = "Price Difference")
The following charts describe the changes in pricing based on the duration of the flight (separate for domestic and international flights).
domestic <- SixAirlines[ which(SixAirlines$IsInternational=='Domestic'), ]
pricevsduration <- table(domestic$PriceRelative, domestic$FlightDuration)
barplot(pricevsduration, main = "Price Difference w.r.t Duration- Domestic Flights", xlab = "Duration", ylab = "Price Difference")
international <- SixAirlines[ which(SixAirlines$IsInternational=='International'), ]
pricevsduration2 <- table(international$PriceRelative, international$FlightDuration)
barplot(pricevsduration2, main = "Price Difference w.r.t Duration- International Flights", xlab = "Duration", ylab = "Price Difference")
This plot describes how prices change based on the month of travel (we take a sample for British Airways alone):
pricevsmonth <- table(SixAirlines1$PriceRelative, SixAirlines1$TravelMonth)
barplot(pricevsmonth, main = "Price Difference w.r.t Month of Travel", xlab = "Month", ylab = "Price Difference")
This plot describes how prices change based on the aircraft build (again, this is a sample for British Airways only):
pricevsaircraft <- table(SixAirlines1$PriceRelative, SixAirlines1$Aircraft)
barplot(pricevsaircraft, main = "Price Difference w.r.t Aircraft Build", xlab = "Type of Aircraft", ylab = "Price Difference")