Assignment 2 - Airline Pricing Analysis

Sameer Mathur

Questions based on Part 2

Q2a. Write R code to generate the summary statistics of the different variables present in the data frame airline.df.

Q2b. Break-up airline.df by Airline. Write R code to generate the following break-ups by Airline

Airline
Air India    IndiGo       Jet Spice Jet 
       41        80       144        40 

Q2c. Break-up airline.df by Airline and Diwali. Write R code to generate the following break-ups by Airline and Diwali.

           IsDiwali
Airline      0  1
  Air India 25 16
  IndiGo    48 32
  Jet       87 57
  Spice Jet 24 16

Q2d. Write R code to calculate the mean and standard deviation of ticket price and advance booking days for diffrent airline.

Q2e. Write R code to generate the following table.

     Airline IsDiwali NoOfFlights TotalDataRows AveragePrice
1:       Jet        1          30            57     6125.263
2: Spice Jet        1           8            16     5620.500
3:    IndiGo        1          16            32     4480.250
4: Air India        1           8            16     8197.438
5:    IndiGo        0          16            48     5145.708
6:       Jet        0          30            87     5083.966
7: Spice Jet        0           8            24     4744.417
8: Air India        0           9            25     5143.040