Statistics Homework
year,quarter,crude,gas,airfare 1995,1,26.87,1.70,466.61 1995,2,28.55,1.82,463.1 1995,3,25.88,1.76,446.56 1995,4,26.03,1.67,446.09 1996,1,28.31,1.70,433.97 1996,2,30.84,1.91,418.76 1996,3,31.36,1.84,406.36 1996,4,34.63,1.84,417.57 1997,1,31.38,1.83,421.47 1997,2,26.71,1.79,429.63 1997,3,26.36,1.79,416.66 1997,4,25.95,1.72,432.98 1998,1,19.63,1.55,447.05 1998,2,18.12,1.55,439.35 1998,3,17.30,1.50,458.52 1998,4,15.76,1.43,459.02 1999,1,15.78,1.37,478.4 1999,2,22.18,1.62,471.5 1999,3,28.07,1.73,449.56 1999,4,32.58,1.78,449.5 2000,1,37.62,1.96,472.87 2000,2,36.92,2.13,468.11 2000,3,40.12,2.10,461.18 2000,4,38.67,2.05,465.06 2001,1,32.67,1.95,469.52 2001,2,32.12,2.19,439.36 2001,3,30.90,1.95,404.39 2001,4,22.76,1.60,403.72 2002,1,25.76,1.55,425.88 2002,2,31.84,1.85,420.51 2002,3,34.24,1.85,398.72 2002,4,33.41,1.86,406.25 2003,1,39.66,2.07,412.32 2003,2,33.37,1.99,407.4 2003,3,35.40,2.07,401.36 2003,4,35.82,1.96,407.69 2004,1,39.63,2.11,406.61 2004,2,42.92,2.43,388.15 2004,3,48.54,2.38,371.56 2004,4,49.62,2.42,371.71 2005,1,50.93,2.41,371 2005,2,56.55,2.69,375.19 2005,3,68.72,3.09,366.14 2005,4,62.48,2.87,380.57 2006,1,65.40,2.80,385.07 2006,2,75.32,3.37,400.58 2006,3,75.02,3.33,387.14 2006,4,62.99,2.67,375.15 2007,1,62.09,2.76,368.29 2007,2,72.00,3.48,371.6 2007,3,80.78,3.27,373.84 2007,4,93.41,3.36,373.59 2008,1,100.55,3.48,371.41 2008,2,128.18,4.16,377.33 2008,3,122.96,4.20,390.36 2008,4,58.28,2.56,390.96 2009,1,45.46,2.12,351.05 2009,2,64.23,2.59,332.96 2009,3,73.51,2.84,338.19 2009,4,80.27,2.86,352.43 2010,1,82.59,2.98,358.74 2010,2,81.57,3.08,371.95 2010,3,80.23,2.98,370.05 2010,4,87.75,3.13,363.44 2011,1,100.96,3.54,378.77 2011,2,115.46,4.03,389.7 2011,3,107.67,3.83,378.32 2011,4,110.66,3.54,388.42 2012,1,112.97,3.77,386.73 2012,2,105.44,3.88,398.86 2012,3,100.83,3.80,377.33 2012,4,100.65,3.61,387.83 2013,1,101.40,3.66,386.33 2013,2,100.08,3.70,385.19 2013,3,105.32,3.64,396.36 2013,4,94.65,3.35,390.07 2014,1,95.41,3.45,384.83 2014,2,99.33,3.70,394.96 2014,3,94.23,3.52,396.22 2014,4,71.87,2.89,397.9 2015,1,47.05,2.30,391.32 2015,2,56.49,2.68,384.79 2015,3,45.72,2.61,371.72 Project: Regression A week of adventure often starts at the airport or in the family car. Any news about falling gasoline or air ticket prices is therefore good news. Crude oil is used to make both gasoline and jet fuel. Sometimes we hear big news that the price of crude is going down, but the price at the pump seems stubbornly to stay the same. News reporters tell us, however, that as the price of crude goes down, the less gasoline will eventually cost at the pump. These same reporters exclaim that it is only a matter of time before plane fares begin to plummet as well. Does history confirm these claims? In this project, you will do the following. · Use linear regression to fit a model between an explanatory and response variable. · Comment on the success of the regression, interpret results, and draw conclusions. About the Data The data comes from two sources. We will combine the two sources of data in order to look for a relationship in the price of gas to the price of a plane ticket. The United States Department of Transportation provides average prices of an airplane tickets in US dollars, adjusted for inflation1. The United States Energy Information Administration provides data on the price of crude, diesel, and gasoline in US dollars, adjusted for inflation2. We combine the data into a single data file so that we can look for relationships with our software. The data file”gasticket.csv” has the following columns. · year—the year the price was determined · quarter—the quarter in the years the price was determined (January through March is the first quarter, for example.) · crude—the average price of crude oil during the quarterly period · gas—the average retail price of gas in the US during the quarterly period · airfare—the average price of a plane ticket during the quarterly period Questions 1. It is often stated in the news that the price of crude oil has a direct impact on the price of gasoline at the pump. Investigate this claim by performing a simple linear regression of gasoline prices on the price of crude oil. Plot the data in a scatter with the regression line plotted in the same plot. 2. Find the coefficient of determination (R-Square). (Round your answer to three decimal places.) 3. Use your plot and the coefficient of determination to help explain why you either agree or disagree with the news reporter's claim 4. It is often claimed that falling crude oil prices reduce airline fuel consumption costs, and should thus herald in much lower airline ticket prices. Investigate this claim using a simple regression of airline ticket prices on the price of crude oil. Plot the data in a scatter with the regression line plotted in the same plot. 5. Find the coefficient of determination. 6. Interpret and discuss, comparing your findings for the two claims. Note: Airlines often purchase fuel in bulk at fixed prices for future use, negotiating prices long into the future. This is called fuel hedging. Some airlines take the gamble by not hedging, in order to take advantage of falling prices, but other airlines may choose to hedge. The complexity of competitive forces may seem to obscure the relationships between factors like fuel and ticket prices. So, to use regression, it is important for an investigator to learn more about the subject being studied, and not just look at the numbers in isolation.