Assignment 2 - Airline Pricing Analysis

Sameer Mathur

Assignment 2

QUESTION 1

Q1a. Write R code to generate the correlation matrix for the given continuous variables {"Price", "AdvancedBookingDays", "FlyingMinutes", "Capacity", "SeatPitch", "SeatWidth"}

Q1b. Write R code to generate the correlation matrix, along with their significance values, for the given continuous variables {"Price", "AdvancedBookingDays", "FlyingMinutes", "Capacity", "SeatPitch", "SeatWidth"}

Q1c. Write R code to visualize the correlation matrix in Q1b.

Q1e. Write R code to generate the following corrgram. (Hint: This is a repeat of the previous question, where you had flexibility to create the corrgram of YOUR choice. Here, you will need to use package PerformanceAnalytics.)

plot of chunk unnamed-chunk-6

QUESTION 2

Q2a. Test whether the ticket prices of Mumbai to Delhi flights are more than INR 5000.

Q2b. Test whether the ticket prices of morning flights are greater than the afternoon flights

Q2c. Test whether the ticket prices around Diwali is more compared to non-Diwali ticket prices.

Q2d. Test whether the ticket prices on Air India flights are greater than IndiGo flights.

QUESTION 3

Q3a. Run a simple linear regression of airline ticket Price on the Advanced Booking Days. Write R code to output the summary of the model.